bird6.conf 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #
  2. # IPv6 Bird configuration (Salt managed)
  3. #
  4. {%- set node_config = salt['pillar.get']('nodes:' ~ grains['id'], {}) %}
  5. define AS_OWN = 65132;
  6. define LO_IP = {{ salt['ffho_net.get_loopback_ip'](node_config, grains['id'], 'v6') }};
  7. router id {{ salt['ffho_net.get_router_id'](node_config, grains['id']) }};
  8. # this pseudo-protocol watches all interface up/down events
  9. protocol device {
  10. scan time 10;
  11. };
  12. # This pseudo-protocol performs synchronization between BIRD's routing
  13. # tables and the kernel. If your kernel supports multiple routing tables
  14. # (as Linux 2.2.x does), you can run multiple instances of the kernel
  15. # protocol and synchronize different kernel tables with different BIRD tables.
  16. protocol kernel {
  17. scan time 20; # Scan kernel routing table every 20 seconds
  18. {% if 'vpn' in node_config.get ('roles') %}
  19. # Learn host routes set up by VPN server(s) on this machine.
  20. # As there are two VPN hosts it's important to learn an redistribute
  21. # these internally to maintain full reachability.
  22. learn;
  23. import filter {
  24. if net ~ [
  25. fdca:ffee:ff12:a249::/64+, # OPS
  26. fdca:ffee:ff12:a250::/64+, # User-srv
  27. fdca:ffee:ff12:a251::/64+, # Infra-srv
  28. # Compatibility glue, to be REMOVED, when finally renumbered
  29. fdca:ffee:ff12:a254::/64+, # Infra-srv legacy
  30. 2a02:450:1::/60+ # Vega Assignment
  31. ] then {
  32. # Bump perference of learned kernel routes from 10(!) to very high,
  33. # so they "win" in routed election and there's no clash with any
  34. # backup route via OSPF.
  35. preference = 12345;
  36. accept;
  37. }
  38. reject;
  39. };
  40. {% else %}
  41. import none;
  42. {%- endif %}
  43. export all;
  44. # Force bird to export device routes learned above to freifunk table
  45. # This is needed as the routing policy on all nodes will force all
  46. # traffic to be routed by this table so we have to make sure even
  47. # locally connected networks are reachable from this table.
  48. device routes yes;
  49. }
  50. #
  51. # Load additiional configuration (IGP, FFRL, ICVPN, 'n stuff)
  52. include "/etc/bird/ff-policy6.conf";
  53. include "/etc/bird/bird6.d/*.conf";