bird.conf 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 local config knobs and additiional configuration (IGP, FFRL, 'n stuff)
  30. include "/etc/bird/local.conf";
  31. {%- if proto == "v4" %}
  32. include "/etc/bird/ff-policy.conf";
  33. include "/etc/bird/bird.d/*.conf";
  34. {%- else %}
  35. include "/etc/bird/ff-policy6.conf";
  36. include "/etc/bird/bird6.d/*.conf";
  37. {%- endif %}