From 9aedfaf03674904e8cb3716ad6dd9ad03cbed704 Mon Sep 17 00:00:00 2001 From: ace Date: Mon, 25 Oct 2021 14:38:14 +0300 Subject: [PATCH] update config --- templates/bird.conf.j2 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/bird.conf.j2 b/templates/bird.conf.j2 index d49ce0d..d77ed63 100644 --- a/templates/bird.conf.j2 +++ b/templates/bird.conf.j2 @@ -4,21 +4,21 @@ router id {{ bird.bgp.common[inventory_hostname].routerid }}; protocol device { } protocol direct { - disabled; # Disable by default - ipv4; # Connect to default IPv4 table - ipv6; # ... and to default IPv6 table + disabled; + ipv4; + ipv6; } protocol kernel KERNEL4 { - ipv4 { # Connect protocol to IPv4 table by channel + ipv4 { export all; # Export to protocol. default is export none - }; + }; } protocol kernel KERNEL6 { ipv6 { export all; }; } {% for protocol_static in bird.bgp.static %} protocol static {{ protocol_static.name }} { - ipv4; # Again, IPv4 channel with default options + ipv4; {% for network in protocol_static['networks'][inventory_hostname] %} route {{ network.ip }}/{{ network.mask_dash }} via "lo" { bgp_local_pref = {{ network.bgp_local_pref }}; }; {% endfor %} @@ -26,10 +26,10 @@ protocol static {{ protocol_static.name }} { {% endfor %} {% for protocol_bgp in bird.bgp.bgp %} protocol bgp {{ protocol_bgp.name }} { - {% if protocol_bgp.confederation is defined %} +{% if protocol_bgp.confederation is defined %} confederation {{ protocol_bgp.confederation }}; confederation member yes; - {% endif %} +{% endif %} local as {{ protocol_bgp.local_asnum }}; neighbor {{ protocol_bgp.remote_addr }} as {{ protocol_bgp.remote_asnum }}; hold time 30;