update config

This commit is contained in:
ace 2021-10-25 14:38:14 +03:00
parent 7e97d7e0e1
commit 9aedfaf036
No known key found for this signature in database
GPG Key ID: 2E47CC17BA7F8CF0

View File

@ -4,21 +4,21 @@ router id {{ bird.bgp.common[inventory_hostname].routerid }};
protocol device { protocol device {
} }
protocol direct { protocol direct {
disabled; # Disable by default disabled;
ipv4; # Connect to default IPv4 table ipv4;
ipv6; # ... and to default IPv6 table ipv6;
} }
protocol kernel KERNEL4 { protocol kernel KERNEL4 {
ipv4 { # Connect protocol to IPv4 table by channel ipv4 {
export all; # Export to protocol. default is export none export all; # Export to protocol. default is export none
}; };
} }
protocol kernel KERNEL6 { protocol kernel KERNEL6 {
ipv6 { export all; }; ipv6 { export all; };
} }
{% for protocol_static in bird.bgp.static %} {% for protocol_static in bird.bgp.static %}
protocol static {{ protocol_static.name }} { protocol static {{ protocol_static.name }} {
ipv4; # Again, IPv4 channel with default options ipv4;
{% for network in protocol_static['networks'][inventory_hostname] %} {% for network in protocol_static['networks'][inventory_hostname] %}
route {{ network.ip }}/{{ network.mask_dash }} via "lo" { bgp_local_pref = {{ network.bgp_local_pref }}; }; route {{ network.ip }}/{{ network.mask_dash }} via "lo" { bgp_local_pref = {{ network.bgp_local_pref }}; };
{% endfor %} {% endfor %}
@ -26,10 +26,10 @@ protocol static {{ protocol_static.name }} {
{% endfor %} {% endfor %}
{% for protocol_bgp in bird.bgp.bgp %} {% for protocol_bgp in bird.bgp.bgp %}
protocol bgp {{ protocol_bgp.name }} { protocol bgp {{ protocol_bgp.name }} {
{% if protocol_bgp.confederation is defined %} {% if protocol_bgp.confederation is defined %}
confederation {{ protocol_bgp.confederation }}; confederation {{ protocol_bgp.confederation }};
confederation member yes; confederation member yes;
{% endif %} {% endif %}
local as {{ protocol_bgp.local_asnum }}; local as {{ protocol_bgp.local_asnum }};
neighbor {{ protocol_bgp.remote_addr }} as {{ protocol_bgp.remote_asnum }}; neighbor {{ protocol_bgp.remote_addr }} as {{ protocol_bgp.remote_asnum }};
hold time 30; hold time 30;