peering6.conf.j2 481 B

12345678910111213141516171819202122
  1. define Prefer_BGP_to_OSPF = 160;
  2. filter f_prefer_bgp_to_ospf {
  3. if ! (net ~ {{ ipv6_network }})
  4. then preference = Prefer_BGP_to_OSPF;
  5. accept;
  6. }
  7. template bgp uplink {
  8. local as {{ as }};
  9. import filter f_prefer_bgp_to_ospf;
  10. export where net ~ {{ ipv6_network }};
  11. }
  12. {% if peers is defined %}
  13. {% for peer in peers %}
  14. protocol bgp '{{ peer.name }}' from uplink {
  15. neighbor {{ peer.peer_ipv6|ipaddr('address') }} as {{ peer.as }};
  16. }
  17. {% endfor %}
  18. {% endif %}