bird6.conf 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. # Do NOT export local unreachable routes for TE purposes
  44. export where proto != "ffho_te";
  45. # Force bird to export device routes learned above to freifunk table
  46. # This is needed as the routing policy on all nodes will force all
  47. # traffic to be routed by this table so we have to make sure even
  48. # locally connected networks are reachable from this table.
  49. device routes yes;
  50. }
  51. #
  52. # Load additiional configuration (IGP, FFRL, ICVPN, 'n stuff)
  53. include "/etc/bird/ff-policy6.conf";
  54. include "/etc/bird/bird6.d/*.conf";