2024-11-21 23:57:14 +00:00
|
|
|
template bgp intpeers {
|
|
|
|
local as OWNAS;
|
|
|
|
|
2024-11-25 21:59:58 +00:00
|
|
|
{% if unicastv4 is defined %}
|
2024-11-21 23:57:14 +00:00
|
|
|
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;
|
2024-11-25 21:59:58 +00:00
|
|
|
import table;
|
2024-11-21 23:57:14 +00:00
|
|
|
};
|
2024-11-25 21:59:58 +00:00
|
|
|
{% endif %}
|
2024-11-21 23:57:14 +00:00
|
|
|
|
|
|
|
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;
|
2024-11-25 21:59:58 +00:00
|
|
|
import table;
|
2024-11-21 23:57:14 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
{% 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 %}
|