bird6.conf.j2 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 static uplink_hostroute {
  7. import all;
  8. export all;
  9. }
  10. protocol direct {
  11. interface "*";
  12. }
  13. protocol kernel {
  14. persist;
  15. device routes;
  16. scan time 20;
  17. import all;
  18. export all;
  19. kernel table 42;
  20. }
  21. protocol device {
  22. scan time 10;
  23. }
  24. template bgp ibgp {
  25. source address {{supernode_mesh_ipv6|ipaddr('address')}};
  26. local as {{supernode_as}};
  27. import all;
  28. export all;
  29. next hop self;
  30. direct;
  31. gateway direct;
  32. }
  33. {% if supernode_uplinks is defined %}
  34. template bgp uplink {
  35. local as {{supernode_uplinks[0].as}};
  36. import all;
  37. export all;
  38. next hop self;
  39. direct;
  40. multihop 64;
  41. }
  42. {% for uplink in supernode_uplinks %}
  43. protocol bgp {{uplink.name}} from uplink {
  44. neighbor {{uplink.address_v6|ipaddr('address')}} as {{uplink.as}};
  45. default bgp_med 2;
  46. }
  47. {% endfor %}
  48. {% endif %}
  49. {% for meshlink in supernode_mesh_backbones %}
  50. protocol bgp {{meshlink.name}} from ibgp {
  51. neighbor {{meshlink.address_v6}} as {{supernode_as}};
  52. default bgp_med 4;
  53. }
  54. {% endfor %}