bird.conf 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #
  2. # IP{{ proto }} 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_primary_ip'](node_config, proto).ip }};
  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. import none;
  19. export filter {
  20. # Do NOT export local unreachable routes for TE purposes
  21. if proto = "ffho_te" then
  22. reject;
  23. # Export routes with source address set to loopback IP
  24. krt_prefsrc = LO_IP;
  25. accept;
  26. };
  27. }
  28. #
  29. # Load additiional configuration (IGP, FFRL, ICVPN, 'n stuff)
  30. {%- if proto == "v4" %}
  31. include "/etc/bird/ff-policy.conf";
  32. include "/etc/bird/bird.d/*.conf";
  33. {%- else %}
  34. include "/etc/bird/ff-policy6.conf";
  35. include "/etc/bird/bird6.d/*.conf";
  36. {%- endif %}