diff --git a/bird-conf.j2 b/bird-conf.j2 index 6cd6eee..4de7a09 100644 --- a/bird-conf.j2 +++ b/bird-conf.j2 @@ -20,7 +20,11 @@ define OWNNETSETv6 = [fd32:6b0:70a6::/48+]; # Header end # ################################################ +{% if unicastv4 is defined %} router id OWNIP; +{% else %} +router id from "*" -"lo"; +{% endif %} protocol device { scan time 10; @@ -127,7 +131,6 @@ protocol static { template bgp dnpeers { local as OWNAS; path metric 1; - {% if unicastv4 is defined %} ipv4 { import filter { @@ -142,6 +145,7 @@ template bgp dnpeers { export filter { if is_valid_network() && source ~ [RTS_STATIC, RTS_BGP] then accept; else reject; }; import limit 9000 action block; + import table; }; {% endif %} @@ -157,6 +161,7 @@ template bgp dnpeers { }; export filter { if is_valid_network_v6() && source ~ [RTS_STATIC, RTS_BGP] then accept; else reject; }; import limit 9000 action block; + import table; }; } diff --git a/int-bgp.j2 b/int-bgp.j2 index 579ad61..f6121a1 100644 --- a/int-bgp.j2 +++ b/int-bgp.j2 @@ -1,18 +1,22 @@ template bgp intpeers { local as OWNAS; +{% if unicastv4 is defined %} ipv4 { import where source = RTS_BGP && is_valid_network() && !is_self_net(); export where source = RTS_BGP && is_valid_network() && !is_self_net(); next hop self; add paths yes; + import table; }; +{% endif %} ipv6 { import where source = RTS_BGP && is_valid_network_v6() && !is_self_net_v6(); export where source = RTS_BGP && is_valid_network_v6() && !is_self_net_v6(); next hop self; add paths yes; + import table; }; } {% for host in groups['routers'] %}