dn42-ansible/int-bgp.j2
2024-11-21 15:57:14 -08:00

24 lines
725 B
Django/Jinja

template bgp intpeers {
local as OWNAS;
ipv4 {
import where source = RTS_BGP && is_valid_network() && !is_self_net();
export where source = RTS_BGP && is_valid_network() && !is_self_net();
next hop self;
add paths yes;
};
ipv6 {
import where source = RTS_BGP && is_valid_network_v6() && !is_self_net_v6();
export where source = RTS_BGP && is_valid_network_v6() && !is_self_net_v6();
next hop self;
add paths yes;
};
}
{% for host in groups['routers'] %}
{% if host != inventory_hostname %}
protocol bgp int_{{ hostvars[host]['pop_loc'] }} from intpeers {
neighbor {{ hostvars[host]['unicastv6'] }} as OWNAS;
}
{% endif %}
{% endfor %}