BGP Rib Failure
BGP Rib Failure
BGP RIB-Failure is a situation where some routes from the BGP process cannot be
installed in the main routing table due to different reasons::
In such cases, the failed routes are marked with an r> in the list of BGP routes:
R1#sh ip bgp
BGP table version is 9, local router ID is 192.168.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
We can check all RIB-Failure routes on our BGP router with show ip bgp rib-
failure :
If we have a look at the show ip bgp information for each of these network, we will see
the individual RIB-Failure code but not much else:
If we have a look at the routing table as far as each of these networks is concerned, we
can find out th reason for the RIB-Failure:
R1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Each of the three routes is present in the routing table, but one of them is R1’s own IP
address on Loopback0, the other one is learnt via EIGRP and is thus with a better admin
distance, and the the third one is a directly connected network via Fa0/0. Even though the
routes are set to RIB-Failure status, they are actually being advertised to R1’s eBGP
peer, which differs a bit from what is mentioned in Cisco’s BGP FAQ document. The lab
topology is shown below for illustration.
Sample lab for BGP RIB-Failure
In our test scenario R0 is announcing the three relevant networks into the iBGP process
to R1, but R1 has better routes already present for all of them - either from EIGRP
(.30.0/24), or a directly connected one (.1.0./30), or is it a route to its own IP address
(.0.1/32). R1 itself has an eBGP peering session with R2. Let’s have a look at what R2 is
receiving over this eBGP session and whether the RIB-Failure routes are being advertised
and accepted over it:
R2#sh ip bgp
BGP table version is 5, local router ID is 192.168.20.1
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
As we can see, all the RIB-Failure routes are being advertised and accepted normally
over the eBGP peering regardless of their RIB-Failure state. They are not flagged as RIB-
Failure routes on R2 and they are installed in the routing table at R2:
R2#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route