<div dir="ltr">Yes, I have separate tables for each vrf<br><div><br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">--<br>Semion Lisyansky</div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 5, 2018 at 10:48 AM Alexander Zubkov <<a href="mailto:green@qrator.net">green@qrator.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>> <span class="m_3317570882184056624gmail-m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624gmail-m_5364233734995920222gmail-m_-1504487547263110890gmail-gD">Using bird 2.0.2. Guess it does not include<span class="m_3317570882184056624gmail-m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624gmail-m_5364233734995920222gmail-m_-1504487547263110890gmail-gD"> p</span></span>atch you mentioned </span></span><br><br></div><div>Yes, it is not released yet.</div><div><br></div><div>> <span class="m_3317570882184056624gmail-m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624gmail-m_5364233734995920222gmail-m_-1504487547263110890gmail-gD">The issue is that bird/bgp tries to resolve nexthops for all vrfs only in default.</span></span><br></div><div><br></div><div>I think it depends on your configuration. Do you have separate tables for protocols in different vrfs?<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 5, 2018 at 9:42 AM, 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">Thanks,<span class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-gD"> Alexander<br><br></span></span></div><div><span class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-gD">Using bird 2.0.2. Guess it does not include<span class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-gD"> p</span></span>atch you mentioned <br><br></span></span></div><div><span class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-gD">Have another question: <br></span></span></div><div><span class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-gD">Configured peers in vrf with different addresses but still in overlapping subnets.<br></span></span></div><div><span class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-gD">BGP session are established and some prefixes advertised.<br></span></span></div><div><span class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-gD">The issue is that bird/bgp tries to resolve nexthops for all vrfs only in default.<br><br>ip -4 neigh show vrf vrf01<br>190.34.32.101 dev swp32.101 lladdr 00:00:80:8f:c3:1a REACHABLE<br><br>ip -4 neigh show <br>190.34.32.101 dev swp32 INCOMPLETE<span><br><br>ip route show vrf vrf01<br></span><a href="http://134.0.0.0/24" target="_blank">134.0.0.0/24</a> via 190.34.32.101 dev swp32 proto bird metric 32 <br><br></span></span></div><span class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-qu"><span name="Alexander Zubkov" class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail-gD">.</span></span>--<br><div dir="ltr"><div><div><div dir="ltr" class="m_3317570882184056624m_5364233734995920222gmail-m_-1504487547263110890gmail_signature">Semion Lisyansky</div></div><br></div></div></div></div></div><div class="m_3317570882184056624HOEnZb"><div class="m_3317570882184056624h5"><br><div class="gmail_quote"><div dir="ltr">On Sun, Nov 4, 2018 at 8:11 PM Alexander Zubkov <<a href="mailto:green@qrator.net" target="_blank">green@qrator.net</a>> wrote:<br></div><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>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" target="_blank">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_3317570882184056624m_5364233734995920222m_-1504487547263110890m_2921776557253231228m_-4259605160455926502gmail_signature">--<br>Semion Lisyansky</div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div><br></div>
</blockquote></div>
</div></div></blockquote></div><br></div>
</blockquote></div>