<div dir="ltr"><div dir="ltr"><div>Hi,</div><div><br></div><div>What version of bird you are using? There was a path for BGP & VRF applied just recently:</div><div><a href="https://gitlab.labs.nic.cz/labs/bird/commit/e19d08055a4614f03e51ee72617be10946ce7919">https://gitlab.labs.nic.cz/labs/bird/commit/e19d08055a4614f03e51ee72617be10946ce7919</a></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Nov 4, 2018 at 5:01 PM, Semion Lisyansky <span dir="ltr"><<a href="mailto:semionl@gmail.com" target="_blank">semionl@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><div><div>Hi All,<br><br></div>Tried to configure vrf with same own and peer addresses as in global.<br></div>When I ping in vrf, packets go in and out via correct interfaces, <br>but bird bgp sessions are constantly flapping. Only one session to peer with same address exists at each moment<br></div><div></div>As a w/a tried to configure interface per session, but this did not helped.<br></div><div></div><div><br></div>Here is my partial configuration:<br><br><br>protocol device {<br> scan time 2; # Scan interfaces every 2 seconds<br>}<br>protocol direct {<br> interface "br*"; # bridge interfaces<br> interface "swp*"; # router ports<br> interface "bond*"; # Disable by default<br> ipv4; # Connect to default IPv4 table<br> ipv6; # ... and to default IPv6 table<br>}<br><br>protocol kernel {<br> ipv4 { # Connect protocol to IPv4 table by channel<br> table master4; # Default IPv4 table is master4<br> import none; # Import to table, default is import all<br> export all; # Export to protocol. default is export none<br> };<br> learn on; # Learn alien routes from the kernel<br> merge paths yes; <br>}<br><br>protocol bgp bgp3411 {<br> local as 65001; <br> bfd yes;<br> neighbor 191.34.1.3 as 65034;<br># interface "swp2";<br> ipv4 {<br> import all;<br> export all;<br> };<br>}<br><br>protocol bgp bgp3412 {<br> local as 65001;<br> bfd yes;<br> neighbor 192.34.1.3 as 65034;<br># interface "swp1";<br> ipv4 {<br> import all;<br> export all;<br> };<br>}<br><br><br>ipv4 table table_vrf01;<br><br>protocol kernel kernel_vrf01 {<br> vrf "vrf01";<br> kernel table 101;<br> scan time 2;<br> ipv4 {<br> table table_vrf01;<br> import none; # Default is import all <br> export all; # Default is export none <br> };<br> merge paths yes;<br> learn on; # Learn all alien routes from the kernel <br>}<br><br>protocol direct direct_vrf01 {<br> vrf "vrf01";<br> ipv4 { table table_vrf01; }; <br> interface "swp7.101";<br> interface "swp1.201";<br> interface "swp2.301";<br> interface "vrf01";<br>}<br><br>protocol static static_vrf01 {<br> vrf "vrf01";<br> ipv4 { table table_vrf01; }; <br>}<br><br>protocol bgp bgp_vrf01_n1 {<br> vrf "vrf01";<br> local as 65001;<br> graceful restart;<br> neighbor 191.34.1.3 as 65034;<br> ipv4 {<br> table table_vrf01;<br> import none;<br> export none;<br> };<br>}<br><br>protocol bgp bgp_vrf01_n2 {<br> vrf "vrf01";<br> local as 65001;<br> graceful restart;<br> neighbor 192.34.1.3 as 65034;<br> ipv4 {<br> table table_vrf01;<br> import none;<br> export none;<br> };<br>}<br><br><br><br>ip -br link show type vrf<br>vrf01 UP fe:58:94:d2:d8:ee <NOARP,MASTER,UP,LOWER_UP> <br>vrf02 UP 42:2d:8f:bd:87:9f <NOARP,MASTER,UP,LOWER_UP> <br>(mlnx)root@bdg-crf-01:~# ip route show vrf vrf01<br><a href="http://172.1.7.0/24" target="_blank">172.1.7.0/24</a> dev swp7.101 proto kernel scope link src 172.1.7.1 offload <br><a href="http://191.34.1.2/31" target="_blank">191.34.1.2/31</a> dev swp2.301 proto kernel scope link src 191.34.1.2 offload <br><a href="http://192.34.1.2/31" target="_blank">192.34.1.2/31</a> dev swp1.201 proto kernel scope link src 192.34.1.2 offload <br>(mlnx)root@bdg-crf-01:~# ip route show table 101<br>broadcast 172.1.7.0 dev swp7.101 proto kernel scope link src 172.1.7.1 <br><a href="http://172.1.7.0/24" target="_blank">172.1.7.0/24</a> dev swp7.101 proto kernel scope link src 172.1.7.1 offload <br>local 172.1.7.1 dev swp7.101 proto kernel scope host src 172.1.7.1 <br>broadcast 172.1.7.255 dev swp7.101 proto kernel scope link src 172.1.7.1 <br>local 191.34.1.2 dev swp2.301 proto kernel scope host src 191.34.1.2 <br><a href="http://191.34.1.2/31" target="_blank">191.34.1.2/31</a> dev swp2.301 proto kernel scope link src 191.34.1.2 offload <br>local 192.34.1.2 dev swp1.201 proto kernel scope host src 192.34.1.2 <br><a href="http://192.34.1.2/31" target="_blank">192.34.1.2/31</a> dev swp1.201 proto kernel scope link src 192.34.1.2 offload <br><div><div><div><div><div><br><br clear="all"><div><div dir="ltr" class="m_-4259605160455926502gmail_signature">--<br>Semion Lisyansky</div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br></div>