FRRouting / frr

The FRRouting Protocol Suite
https://frrouting.org/
Other
3.33k stars 1.25k forks source link

BGP learnt route not configured in Kernel #4623

Closed pulkittandon88 closed 4 years ago

pulkittandon88 commented 5 years ago

FRR build and installed over Ubuntu 18.04 VM. Cloned latest version of FRR from git 2 days back.

I am running FRR between 2 VM. BGP neighbourship gets established successfully. When a route is exported by 1 of the VM to the other, the route is present in BGP table. But, I expect that route to get installed in kernel. That is not happening. Any suggestions if I am missing something . ?

Neighbor Info:

pulkitvm2# sho bgp summary

IPv4 Unicast Summary:
BGP router identifier 192.168.201.10, local AS number 65713 vrf-id 0
BGP table version 6
RIB entries 5, using 920 bytes of memory
Peers 1, using 21 KiB of memory

Neighbor        V         AS MsgRcvd MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd
192.168.10.19   4      65712      25      29        0    0    0 00:13:16            1

Self IPv4 Routing table

pulkitvm2# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued route, r - rejected route

K>* 0.0.0.0/0 [0/0] via 192.168.201.254, ens3, 00:18:16
K>* 192.168.10.0/24 [0/0] via 192.168.201.254, ens3, 00:18:16
C>* 192.168.201.0/24 is directly connected, ens3, 00:18:16

BGP route received is "1.2.3.4"

pulkitvm2# show ip bgp
BGP table version is 6, local router ID is 192.168.201.10, vrf id 0
Default local pref 100, local AS 65713
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 0.0.0.0/0        192.168.201.254          0         32768 ?
*> 1.2.3.4/32       192.168.10.19          255             0 65712 ?
*> 192.168.10.0/24  192.168.201.254          0         32768 ?
*> 192.168.201.0/24 0.0.0.0                  0         32768 ?

Displayed  4 routes and 4 total paths

I expected "1.2.3.4/32" route to be present in "show ip route" and in kernel as well.

BGP Config:

router bgp 65713
 bgp router-id 192.168.201.10
 neighbor 192.168.10.19 remote-as 65712
 neighbor 192.168.10.19 ebgp-multihop 255
 !
 address-family ipv4 unicast
  redistribute kernel
  redistribute connected
  redistribute static
 exit-address-family
!

(put "x" in "[ ]" if you already tried following) [x ] Did you check if this is a duplicate issue? I found couple of related issues but the suggestions there did not help me. [x] Did you test it on the latest FRRouting/frr master branch?

pulkittandon88 commented 5 years ago

On further debugging I discovered that if BGP Peers are between different networks, then routes are not added in Kernel. If BGP Peers are in same network, then imported routes are correctly added to the kernel.

Is thr any config which I might be missing ?

pulkittandon88 commented 5 years ago

@donaldsharp any clue ? Can you please help with this ?

ton31337 commented 4 years ago

@pulkittandon88 could you please show show ip bgp 1.2.3.4? And please show debug logs, like: debug zebra rib, debug zebra events.

ton31337 commented 4 years ago

@polychaeta autoclose in 1 week.