<div dir="ltr">ah okay thanks, I understand now!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno mer 25 mar 2020 alle ore 17:33 Alexander Zubkov <<a href="mailto:green@qrator.net">green@qrator.net</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Than I see no problem. When you have direct protocol off - your router<br>
have nothing imported to the bird's routing table and so nothing is<br>
exported to the bgp peer. A kernel protocol does not import those<br>
routes, from the documentation:<br>
<br>
> Note that routes created by OS kernel itself, namely direct routes representing IP subnets of associated interfaces, are not imported even with learn enabled. You can use Direct protocol to generate these direct routes.<br>
<br>
On Wed, Mar 25, 2020 at 5:21 PM Fabiano D'Agostino<br>
<<a href="mailto:fabiano.dagostino96@gmail.com" target="_blank">fabiano.dagostino96@gmail.com</a>> wrote:<br>
><br>
> Yes, I disabled direct protocol on both routers. The full bird.conf is the following:<br>
> log syslog all;<br>
> ipv4 table master4;<br>
> ipv6 table master6;<br>
> router1 bgp configuration:<br>
> protocol bgp {<br>
>     ipv4 {<br>
>             import all;<br>
>             export all;<br>
>    };<br>
>    local as 1;<br>
>    neighbor 192.168.2.22 as 2;<br>
> }<br>
> protocol device {<br>
> }<br>
> protocol kernel {<br>
>     ipv4 {<br>
>             table master4;<br>
>             import all;<br>
>             export all;<br>
>     };<br>
> }<br>
> protocol static {<br>
>     ipv4;<br>
> }<br>
><br>
><br>
> Il giorno mer 25 mar 2020 alle ore 17:06 Alexander Zubkov <<a href="mailto:green@qrator.net" target="_blank">green@qrator.net</a>> ha scritto:<br>
>><br>
>> Do you disable direct protocol on both router1 and router2?<br>
>> And that is definitely not the full bird config, you do not have a<br>
>> kernel protocol for example.<br>
>><br>
>> On Tue, Mar 24, 2020 at 10:50 PM Fabiano D'Agostino<br>
>> <<a href="mailto:fabiano.dagostino96@gmail.com" target="_blank">fabiano.dagostino96@gmail.com</a>> wrote:<br>
>> ><br>
>> > There is no gateway because they are directly connected. However my network topology is the following:<br>
>> > [pc-a - router1 ]=AS 1 ; [pc-b - router 2]=AS 2;<br>
>> > pc-a:<br>
>> > enp0s3<br>
>> > address 192.168.1.11<br>
>> > gw 192.168.1.1<br>
>> > router1:<br>
>> > enp0s3<br>
>> > address 192.168.1.1<br>
>> > enp0s8<br>
>> > 192.168.2.2<br>
>> ><br>
>> > router1 bgp configuration:<br>
>> > protocol bgp {<br>
>> >     ipv4 {<br>
>> >             import all;<br>
>> >             export all;<br>
>> >    }<br>
>> > local as 1;<br>
>> > neighbor 192.168.2.22 as 2<br>
>> ><br>
>> ><br>
>> > Il giorno mar 24 mar 2020 alle ore 22:40 Alexander Zubkov <<a href="mailto:green@qrator.net" target="_blank">green@qrator.net</a>> ha scritto:<br>
>> >><br>
>> >> There is also no gateway in you "route" output on routes exported from<br>
>> >> bird. Maybe you have some filters that causing it? Could you show your<br>
>> >> config if it is not secret?<br>
>> >><br>
>> >> On Tue, Mar 24, 2020 at 9:53 PM Fabiano D'Agostino<br>
>> >> <<a href="mailto:fabiano.dagostino96@gmail.com" target="_blank">fabiano.dagostino96@gmail.com</a>> wrote:<br>
>> >> ><br>
>> >> > Yes, 'show route', is from Bird. I don't have route-reflector, but just two routers which have a bgp session. Anyway, yes when direct is disabled, the bgp session is established.<br>
>> >> ><br>
>> >> > Il giorno mar 24 mar 2020 alle ore 21:45 Alexander Zubkov <<a href="mailto:green@qrator.net" target="_blank">green@qrator.net</a>> ha scritto:<br>
>> >> >><br>
>> >> >> "show route" looks a little weird, is it from bird? There are also<br>
>> >> >> commonly a protocol and metric shown.<br>
>> >> >> Those are from your route-reflector? Do you have your bgp sessions up<br>
>> >> >> when direct is disabled?<br>
>> >> >><br>
>> >> >> On Tue, Mar 24, 2020 at 9:33 PM Fabiano D'Agostino<br>
>> >> >> <<a href="mailto:fabiano.dagostino96@gmail.com" target="_blank">fabiano.dagostino96@gmail.com</a>> wrote:<br>
>> >> >> ><br>
>> >> >> > Good evening Alexander,<br>
>> >> >> ><br>
>> >> >> > Direct protocol enabled:<br>
>> >> >> > 'route' command:<br>
>> >> >> > Destination Gateway Genmask            Flags Metric iface<br>
>> >> >> > 192.168.1.0      *        255.255.255.0       U       0         enp0s3<br>
>> >> >> > 192.168.1.0      *        255.255.255.0       U       32       enp0s3<br>
>> >> >> > 192.168.2.0      *        255.255.255.0       U       0         enp0s8<br>
>> >> >> > 192.168.2.0      *        255.255.255.0       U        32      enp0s8<br>
>> >> >> > 192.168.4.0      *        255.255.255.0       U        32      enp0s8<br>
>> >> >> > 'show route' command:<br>
>> >> >> > <a href="http://192.168.1.0/24" rel="noreferrer" target="_blank">192.168.1.0/24</a> enp0s3<br>
>> >> >> > <a href="http://192.168.2.0/24" rel="noreferrer" target="_blank">192.168.2.0/24</a>  enp0s8 via 192.168.2.22 on enp0s8<br>
>> >> >> > <a href="http://192.168.4.0/24" rel="noreferrer" target="_blank">192.168.4.0/24</a> via 192.168.2.22 on enp0s8<br>
>> >> >> ><br>
>> >> >> > Direct protocol disabled:<br>
>> >> >> > 'route' command:<br>
>> >> >> > Destination Gateway Genmask            Flags Metric iface<br>
>> >> >> > 192.168.1.0      *        255.255.255.0       U       0         enp0s3<br>
>> >> >> > 192.168.2.0      *        255.255.255.0       U       0         enp0s8<br>
>> >> >> > 'show route' command:<br>
>> >> >> > empty<br>
>> >> >> ><br>
>> >> >> > Thanks,<br>
>> >> >> ><br>
>> >> >> > Fabiano<br>
>> >> >> ><br>
>> >> >> > Il giorno mar 24 mar 2020 alle ore 21:00 Alexander Zubkov <<a href="mailto:green@qrator.net" target="_blank">green@qrator.net</a>> ha scritto:<br>
>> >> >> >><br>
>> >> >> >> I think it would be easier if you showed your route tables in both cases.<br>
>> >> >> >><br>
>> >> >> >> On Tue, Mar 24, 2020 at 8:57 AM Irene Lalioti <<a href="mailto:irene.lalioti@restena.lu" target="_blank">irene.lalioti@restena.lu</a>> wrote:<br>
>> >> >> >> ><br>
>> >> >> >> > Hello guys!<br>
>> >> >> >> ><br>
>> >> >> >> > Just because today we encountered again the same issue with direct, I am very curious on this:<br>
>> >> >> >> ><br>
>> >> >> >> > I totally agree with what you guys explained about the need of the direct protocol. Once we set it then reachability works and all is ok.<br>
>> >> >> >> ><br>
>> >> >> >> > Our big question is why was it working before the moment it lost the BGP session?? In other words: the set up :<br>
>> >> >> >> ><br>
>> >> >> >> > RS - BGP session with the ROUTER - and behind the Router we have Caches.<br>
>> >> >> >> ><br>
>> >> >> >> > Before the router was announcing to the RS(BIRD v2.0.7) the caches and that they are reachable by the router. Without any direct.<br>
>> >> >> >> ><br>
>> >> >> >> > Until one day we lose the bgp session, and we can ping the caches from the RS but not reachable . Once we set it as direct on the bird then all is fine.<br>
>> >> >> >> ><br>
>> >> >> >> > Question is why was it working before without direct ?? :=)<br>
>> >> >> >> ><br>
>> >> >> >> > Many thanks for your time!<br>
>> >> >> >> ><br>
>> >> >> >> > Have a great day all!<br>
>> >> >> >> ><br>
>> >> >> >> > Irene.<br>
>> >> >> >> ><br>
>> >> >> >> > On 23/03/2020 17:07, Fabiano D'Agostino wrote:<br>
>> >> >> >> ><br>
>> >> >> >> > Hi Bernd,<br>
>> >> >> >> > no, the routing "from the kernel" doesn't come via 'learn yes', but via RIB, I mean if I do 'route' it shows the directly connected networks. The problem is that if I use the Direct protocol, the command 'route' shows me two same directly connected networks, one coming from RIB and the other one coming from Bird.<br>
>> >> >> >> > I tried protocol bgp { direct; }, but it doesn't change.<br>
>> >> >> >> ><br>
>> >> >> >> > Thanks,<br>
>> >> >> >> ><br>
>> >> >> >> > Fabiano<br>
>> >> >> >> ><br>
>> >> >> >> > Il giorno lun 23 mar 2020 alle ore 16:15 Bernd Naumann <<a href="mailto:bena@spreadshirt.net" target="_blank">bena@spreadshirt.net</a>> ha scritto:<br>
>> >> >> >> >><br>
>> >> >> >> >> On 23.03.20 16:01, Fabiano D'Agostino wrote:<br>
>> >> >> >> >> > Hi Benedikt,<br>
>> >> >> >> >> > I am just learning Bird and I didn't want to use the Direct protocol<br>
>> >> >> >> >> > because using it I have two same routes in the RIB for the directly<br>
>> >> >> >> >> > connected networks, one coming from the kernel and the second one coming<br>
>> >> >> >> >> > from the direct protocol.<br>
>> >> >> >> >><br>
>> >> >> >> >><br>
>> >> >> >> >> Is the routing "from the kernel" coming via `learn yes;`? If you have no<br>
>> >> >> >> >> need to import "alien" routes, you can disable `learn` and just use<br>
>> >> >> >> >> `direct` and `static` protocol. /* OR if you know that your neighbor is<br>
>> >> >> >> >> directly connected to you can also set 'direct' on the `protocol bgp`. */<br>
>> >> >> >> >><br>
>> >> >> >> >> Bernd<br>
>> >> >> >> >><br>
>> >> >> >> >><br>
>> >> >> >> ><br>
>> >> >> >> > --<br>
>> >> >> >> > Irene Lalioti<br>
>> >> >> >> > Network Engineer<br>
>> >> >> >> > Fondation RESTENA<br>
>> >> >> >> > 2, avenue de l'Université<br>
>> >> >> >> > L-4365 Esch/Alzette<br>
>> >> >> >> ><br>
>> >> >> >> > Tel: +352 424409 1<br>
>> >> >> >> > Fax: +352 422473<br>
</blockquote></div>