<div dir="ltr">It works! Thanks for the tip! <br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, 23 Aug 2021 at 18:06, Alexander Zubkov <<a href="mailto:green@qrator.net">green@qrator.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
You probably need to add "direct" protocol too. Also disabling<br>
recursive gateways might help - they are not needed in your case<br>
because you use "next hop self".<br>
<br>
On Sun, Aug 22, 2021 at 5:30 PM Ooth Gray <<a href="mailto:greyschwinger@gmail.com" target="_blank">greyschwinger@gmail.com</a>> wrote:<br>
><br>
> Hi I'm having troubles in BIRD configuration, and I'm pretty sure it's just a trivial wrong configure issue but I really tried my best >_<<br>
><br>
> Let me give you some background.<br>
><br>
> 1. There are 2 hosts connected by wire (so that they are L2 reachable), one with IPv4 10.22.12.88, and another is 10.22.12.44. Here's one the arp record from "ip neigh sh":<br>
>><br>
>> 10.22.12.88 dev bond0 lladdr f8:6e:ee:8b:cf:90 REACHABLE<br>
><br>
><br>
> 2. Both 2 hosts have some KVM virtual machines, with corresponding routes from host to vm, here's one of the routes from "ip r":<br>
>><br>
>> 10.233.25.178 dev yap35caa1e88854 scope link src 10.22.12.44<br>
><br>
> The 10.233.25.178 is the address of a VM, and the dev yap35caa1e88854 is a tap device connecting eth0 inside the VM.<br>
><br>
> What I want to do is to build routes between these 2 hosts, in order to let VMs on host A be able to connect VMs on host B.<br>
><br>
> Hope I make myself clear.<br>
><br>
> So I'm using BIRD 2.0.3 on Ubuntu 16.04, with the config file as follows:<br>
><br>
>> log syslog all;<br>
>> router id 10.22.12.44;<br>
>><br>
>> protocol device {<br>
>> debug { states };<br>
>> scan time 2;<br>
>> }<br>
>><br>
>> protocol kernel {<br>
>> learn;<br>
>> persist;<br>
>> scan time 10;<br>
>> ipv4 {<br>
>> import all;<br>
>> export all;<br>
>> };<br>
>> }<br>
>><br>
>> protocol bgp {<br>
>> debug { states };<br>
>> local as 65000;<br>
>> neighbor 10.22.12.88 as 65000;<br>
>> source address 10.22.12.44;<br>
>> multihop;<br>
>> ipv4 {<br>
>> export filter {<br>
>> if ( net ~ <a href="http://10.233.0.0/16" rel="noreferrer" target="_blank">10.233.0.0/16</a> ) then {<br>
>> accept;<br>
>> }<br>
>> reject;<br>
>> };<br>
>> import all;<br>
>> next hop self on;<br>
>> gateway recursive;<br>
>> add paths on;<br>
>> };<br>
>> }<br>
><br>
><br>
> But this doesn't work well, the peer BIRD show the info as follows:<br>
><br>
>> bird> show route protocol bgp1<br>
>> Table master4:<br>
>> <a href="http://10.233.25.178/32" rel="noreferrer" target="_blank">10.233.25.178/32</a> unicast [bgp1 18:47:32.910 from 10.22.12.44] * (100/?) [i]<br>
>> via 10.22.12.1 on enp2s0f0 onlink<br>
>> bird> show route export kernel1<br>
>> Table master4:<br>
>> <a href="http://10.233.25.178/32" rel="noreferrer" target="_blank">10.233.25.178/32</a> unicast [bgp1 18:47:32.910 from 10.22.12.44] * (100/?) [i]<br>
>> via 10.22.12.1 on enp2s0f0 onlink<br>
><br>
><br>
> The problem happened on the gateway, I was hoping the routes should have "via 10.22.12.44" instead of "via 10.22.12.1";<br>
><br>
> 10.22.12.1 came from the host default gateway:<br>
>><br>
>> default via 10.22.12.1 dev bond0 onlink<br>
><br>
> But I have no idea how to prevent BIRD from using it.<br>
><br>
> The other information may be helpful is included below:<br>
><br>
>> bird> show protocols all bgp1<br>
>> Name Proto Table State Since Info<br>
>> bgp1 BGP --- up 18:28:46.888 Established<br>
>> BGP state: Established<br>
>> Neighbor address: 10.22.12.88<br>
>> Neighbor AS: 65000<br>
>> Neighbor ID: 10.22.12.88<br>
>> Local capabilities<br>
>> Multiprotocol<br>
>> AF announced: ipv4<br>
>> Route refresh<br>
>> Graceful restart<br>
>> 4-octet AS numbers<br>
>> ADD-PATH<br>
>> RX: ipv4<br>
>> TX: ipv4<br>
>> Enhanced refresh<br>
>> Long-lived graceful restart<br>
>> Neighbor capabilities<br>
>> Multiprotocol<br>
>> AF announced: ipv4<br>
>> Route refresh<br>
>> Graceful restart<br>
>> 4-octet AS numbers<br>
>> Enhanced refresh<br>
>> Long-lived graceful restart<br>
>> Session: internal multihop AS4<br>
>> Source address: 10.22.12.44<br>
>> Hold timer: 117.086/240<br>
>> Keepalive timer: 52.520/80<br>
>> Channel ipv4<br>
>> State: UP<br>
>> Table: master4<br>
>> Preference: 100<br>
>> Input filter: ACCEPT<br>
>> Output filter: (unnamed)<br>
>> Routes: 2 imported, 20 exported<br>
>> Route change stats: received rejected filtered ignored accepted<br>
>> Import updates: 2 0 0 0 2<br>
>> Import withdraws: 0 0 --- 0 0<br>
>> Export updates: 49 6 23 --- 20<br>
>> Export withdraws: 0 --- --- --- 4<br>
>> BGP Next hop: 10.22.12.44<br>
>> IGP IPv4 table: master4<br>
>><br>
>> bird> show route export bgp1<br>
>> Table master4:<br>
>> <a href="http://10.233.25.178/32" rel="noreferrer" target="_blank">10.233.25.178/32</a> unicast [kernel1 18:04:09.483] (10)<br>
>> dev yap35caa1e88854<br>
><br>
><br>
> Please enlighten me with some advice, and I'll appreciate that very much.<br>
><br>
> Thank you!<br>
</blockquote></div>