bird.conf.j2 655 B

123456789101112131415161718192021222324252627
  1. #
  2. # This file is managed by ansible. Do not edit by hand!
  3. #
  4. protocol direct {
  5. interface "bat*";
  6. interface "peer-*";
  7. interface "lo";
  8. };
  9. template bgp ibgp {
  10. local as {{as}};
  11. import all;
  12. export all;
  13. next hop self;
  14. multihop 64;
  15. };
  16. {% for host in groups['all'] %}
  17. {% if hostvars[host]["inventory_hostname"] != inventory_hostname %}
  18. protocol bgp {{hostvars[host]['inventory_hostname_short']}} from ibgp {
  19. source address {{mesh_ipv4|ipaddr('address')}};
  20. neighbor {{hostvars[host]['mesh_ipv4']|ipaddr('address')}} as {{as}};
  21. default bgp_med 4;
  22. };
  23. {% endif %}
  24. {% endfor %}