radv.conf 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. {%- set node_config = salt['pillar.get']('nodes:' ~ grains['id']) %}
  2. {%- set sites_config = salt['pillar.get']('sites') %}
  3. protocol radv {
  4. # ONLY advertise prefix, IF default route is available
  5. import all;
  6. export all;
  7. trigger ::/0;
  8. rdnss 2a03:2260:2342:f251::53;
  9. {% for site in node_config.get ('sites', []) %}
  10. {%- set iface = 'br-' ~ site %}
  11. {%- set site_config = sites_config.get (site) %}
  12. # {{ site }} / {{ site_config.get ('name') }}
  13. interface "{{ iface }}" {
  14. default lifetime 600 sensitive yes;
  15. prefix {{ site_config.get ('prefix_v6') }} {
  16. preferred lifetime 3600;
  17. };
  18. };
  19. {% endfor %}
  20. {%- for iface, iface_config in node_config.get ('ifaces').items ()|sort %}
  21. {%- if salt['ffho.re_search']('^vlan3\d\d$', iface) %}
  22. {%- set v6_ip = salt['ffho_net.get_node_iface_ips'](node_config, iface, with_mask = True)['v6'][0] %}
  23. {%- set prefix = salt['ffho_net.get_network_address'](v6_ip, with_prefixlen = True) %}
  24. # {{ iface_config.get ('desc', 'L3-Access') }}
  25. interface "{{ iface }}" {
  26. default lifetime 600 sensitive yes;
  27. prefix {{ prefix }} {
  28. preferred lifetime 3600;
  29. };
  30. };
  31. {%- endif %}
  32. {%- endfor %}
  33. }