bird.conf.j2 999 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #
  2. # This file is managed by ansible. Do not edit by hand!
  3. #
  4. log syslog all;
  5. router id {{supernode_mesh_ipv4|ipaddr('address')}};
  6. protocol direct {
  7. interface "*";
  8. };
  9. protocol kernel {
  10. device routes;
  11. import all;
  12. export all;
  13. kernel table 42;
  14. };
  15. protocol device {
  16. scan time 8;
  17. };
  18. template bgp ibgp {
  19. local as {{supernode_as}};
  20. import all;
  21. export all;
  22. next hop self;
  23. multihop 64;
  24. };
  25. {% if supernode_uplinks is defined %}
  26. {% for uplink in supernode_uplinks %}
  27. protocol bgp {{uplink.name}} from ibgp {
  28. source address {{uplink.address}};
  29. neighbor {{uplink.dstaddr}} as {{uplink.as}};
  30. default bgp_med 2;
  31. };
  32. {% endfor %}
  33. {% endif %}
  34. {% for meshlink in supernode_mesh_backbones%}
  35. protocol bgp {{meshlink.name}} from ibgp {
  36. source address {{supernode_mesh_ipv4|ipaddr('address')}};
  37. neighbor {{meshlink.mesh_ip}} as {{supernode_as}};
  38. default bgp_med 4;
  39. };
  40. {% endfor %}