ansible/roles/bird/templates/bird/bird.conf.j2

48 lines
1.4 KiB
Django/Jinja

{{ ansible_header | comment }}
# This is a minimal configuration file, which allows the bird daemon to start
# but will not cause anything else to happen.
#
# Please refer to the documentation in the bird-doc package or BIRD User's
# Guide on http://bird.network.cz/ for more information on configuring BIRD and
# adding routing protocols.
# Change this into your BIRD router ID. It's a world-wide unique identification
# of your router, usually one of router's IPv4 addresses.
router id {{ bird.bgp.ipv4.router_id }};
listen bgp address {{ bird.bgp.ipv4.bind_address }} port 179;
# The Kernel protocol is not a real routing protocol. Instead of communicating
# with other routers in the network, it performs synchronization of BIRD's
# routing tables with the OS kernel.
protocol kernel {
persist;
scan time 60;
import none;
export filter {
if ( net ~ [ {{ bird.bgp.ipv4.network | join(', ') }} ] ) then reject;
accept;
};
}
# The Device protocol is not a real routing protocol. It doesn't generate any
# routes and it only serves as a module for getting information about network
# interfaces from the kernel.
protocol device {
scan time 60;
}
protocol static {
{% for ip in bird.bgp.ipv4.network %}
route {{ ip }} reject;
{% endfor %}
}
protocol bgp zayo {
local as {{ bird.bgp.as }};
neighbor {{ bird.bgp.ipv4.neighbor }} as {{ bird.bgp.remote_as }};
import all;
export all;
}