router id {{ pillar['hosts-inet']['core'][salt['grains.get']('id')] }}; protocol kernel { scan time 10; import none; export all; } protocol device { scan time 10; } {%- set radv_ifaces = pillar.get('radv') and pillar['radv'].get(salt['grains.get']('id')) %} {%- if radv_ifaces %} protocol radv { {%- for iface, conf in radv_ifaces.items() %} interface "{{ iface }}" { min ra interval 3; max ra interval 10; {%- for ctx, subnets in pillar['subnets-inet6'].items() %} {%- set subnet6 = subnets.get(iface) %} {%- if subnet6 %} prefix {{ subnet6 }} { preferred lifetime 20; valid lifetime 60; }; {%- endif %} {%- endfor %} {%- if conf.get('rdnss') %} {%- for value in conf['rdnss'] %} {%- set host = value.split('.')[0] %} {%- set net = value.split('.')[1] %} rdnss {{ pillar['hosts-inet6']['dn42'][net][host] }}; {%- endfor %} {%- endif %} {%- if conf.get('dnssl') %} dnssl { {%- for value in conf['dnssl'] %} domain "{{ value }}"; {%- endfor %} }; {%- endif %} }; {%- endfor %} } {%- endif %} protocol ospf ZW6 { {%- if pillar.get('bgp') %} export filter { reject; }; {%- endif %} area 0 { networks { fd23:42:c3d2:500::/56; 2a02:8106:208:5200::/56; 2a02:8106:211:e900::/56; }; {%- for iface, ips in salt['grains.get']('ip_interfaces').items() %} {%- if iface == 'core' or iface == 'br-core' %} interface "{{ iface }}" { }; {%- else %} {%- for ctx, subnets in pillar['subnets-inet6'].items() %} {%- set subnet = subnets.get(iface) %} {%- if subnet %} stubnet {{ subnet }} {}; {%- endif %} {%- endfor %} {%- endif %} {%- endfor %} {%- if pillar['ospf'].get('stubnets-inet6') %} {%- for stubnet in pillar['ospf']['stubnets-inet6'] %} stubnet {{ stubnet }} {}; {%- endfor %} {%- endif %} }; } protocol static { # Zentralwerk DN42 route fd23:42:c3d2:580::/57 unreachable; # Static Kabeldeutschland route 2a02:8106:208:5200::/56 unreachable; route 2a02:8106:211:e900::/56 unreachable; } {%- if pillar.get('bgp') %} protocol bgp { local as {{ pillar['bgp']['asn'] }}; import all; {%- for host, neighbor in pillar['bgp']['peers-inet6'].items() %} neighbor {{ host }} as {{ neighbor.asn }}; {%- endfor %} export where source=RTS_STATIC; } {%- endif %}