ansible-ffibk/roles/service-bird/templates/bird6.conf.j2

68 lines
1.3 KiB
Text
Raw Normal View History

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() {
2017-09-10 23:56:34 +02:00
return net ~ [
{% for mesh in meshes %}
{% for ula in mesh.ipv6_ula %}
{{ ula | ipaddr('net') }}+{{ "," if not loop.last else "" }}{% endfor %}{{ "," if not loop.last else "" }}
{% endfor %}
];
}
2017-09-10 23:56:34 +02:00
# Protocols
protocol device {
scan time 30;
};
protocol direct mwu_subnets {
{% for mesh in meshes %}
2017-11-06 21:24:56 +01:00
interface "{{ mesh.id }}br";
2017-09-10 23:56:34 +02:00
{% endfor %}
import where is_mwu_self_nets();
2017-09-10 23:56:34 +02:00
};
# Templates
template bgp ibgp_mwu {
local mwu_address as mwu_as;
import keep filtered on;
import all;
export where source = RTS_BGP;
2017-09-10 23:56:34 +02:00
direct;
gateway direct;
};
# Include IPv6 MWU peers
include "mwu_ipv6_peers.con?";
{% if ffmwu_server_type == "gateway" %}
2017-09-10 23:56:34 +02:00
# Include IPv6 ICVPN configuration
include "icvpn_ipv6.con?";
# Include IPv6 FFRL configuration
include "ffrl_ipv6.con?";
{% endif %}