1234567891011121314151617181920212223242526272829303132333435363738394041 |
- {%- set node_config = salt['pillar.get']('nodes:' ~ grains['id']) %}
- {%- set sites_config = salt['pillar.get']('sites') %}
- protocol radv {
- # ONLY advertise prefix, IF default route is available
- import all;
- export all;
- trigger ::/0;
- rdnss 2a03:2260:2342:f251::53;
- {%- if grains.id.startswith('gw') %}
- {% for site in node_config.get ('sites', []) %}
- {%- set iface = 'br-' ~ site %}
- {%- set site_config = sites_config.get (site) %}
- # {{ site }} / {{ site_config.get ('name') }}
- interface "{{ iface }}" {
- default lifetime 600 sensitive yes;
- prefix {{ site_config.get ('prefix_v6') }} {
- preferred lifetime 3600;
- };
- };
- {% endfor %}
- {%- endif %}
- {%- for iface, iface_config in node_config.get ('ifaces').items ()|sort %}
- {%- if salt['ffho.re_search']('^vlan(3\d\d|39\d\d)$', iface) %}
- {%- set v6_ip = salt['ffho_net.get_node_iface_ips'](node_config, iface, with_mask = True)['v6'][0] %}
- {%- set prefix = salt['ffho_net.get_network_address'](v6_ip, with_prefixlen = True) %}
- # {{ iface_config.get ('desc', 'L3-Access') }}
- interface "{{ iface }}" {
- default lifetime 600 sensitive yes;
- prefix {{ prefix }} {
- preferred lifetime 3600;
- };
- };
- {%- endif %}
- {%- endfor %}
- }
|