2017-09-10 23:56:34 +02:00
|
|
|
#
|
|
|
|
# {{ ansible_managed }}
|
|
|
|
#
|
|
|
|
|
|
|
|
# Variables
|
|
|
|
define router_id = {{ bgp_loopback_net | ipaddr('net') | ipaddr(magic) | ipaddr('address') }};
|
|
|
|
define mwu_address = {{ bgp_ipv6_transfer_net | ipaddr('net') | ipaddr(magic) | ipaddr('address') }};
|
|
|
|
define mwu_as = {{ as_private_mwu }};
|
|
|
|
|
|
|
|
# General
|
|
|
|
timeformat protocol iso long;
|
|
|
|
router id router_id;
|
|
|
|
|
|
|
|
# Functions
|
|
|
|
function is_default() {
|
|
|
|
return net ~ [
|
|
|
|
::/0
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
function is_ula() {
|
|
|
|
return net ~ [
|
|
|
|
fc00::/7{48,64}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
function is_mwu_self_nets() {
|
|
|
|
return net ~ [
|
2017-10-06 22:58:00 +02:00
|
|
|
{% for mesh in meshes %}
|
|
|
|
{% for ula in mesh.ipv6_ula %}
|
2017-09-10 23:56:34 +02:00
|
|
|
{{ ula | ipaddr('net') }}+{{ "," if not loop.last else "" }}{% endfor %}{{ "," if not loop.last else "" }}
|
|
|
|
{% endfor %}
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
# Protocols
|
|
|
|
protocol device {
|
|
|
|
scan time 30;
|
|
|
|
};
|
|
|
|
|
|
|
|
protocol direct mwu_subnets {
|
2017-10-06 22:58:00 +02:00
|
|
|
{% for mesh in meshes %}
|
|
|
|
interface "{{ mesh.id }}BR";
|
2017-09-10 23:56:34 +02:00
|
|
|
{% endfor %}
|
|
|
|
import where is_mwu_self_nets();
|
|
|
|
};
|
|
|
|
|
|
|
|
# Templates
|
|
|
|
template bgp ibgp_mwu {
|
|
|
|
local mwu_address as mwu_as;
|
|
|
|
import keep filtered on;
|
|
|
|
import all;
|
|
|
|
export where source = RTS_BGP;
|
|
|
|
direct;
|
|
|
|
gateway direct;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Include IPv6 MWU peers
|
|
|
|
include "mwu_ipv6_peers.con?";
|
|
|
|
|
|
|
|
# Include IPv6 ICVPN configuration
|
|
|
|
include "icvpn_ipv6.con?";
|
|
|
|
|
|
|
|
# Include IPv6 FFRL configuration
|
|
|
|
include "ffrl_ipv6.con?";
|