Friday, May 18, 2012

BGP RIB-failure and effect on route advertisement

When examining routes advertised to BGP neighbor, notice some routes are tagged with “r”:

rtr1#sh ip bgp neighbor advertised
BGP table version is 1735468, local router ID is
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, x best-external, f RT-Filter, a additional-path
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
r>i10.115.254.0/30            0    100      0 i
*>           21         32768 i
r>i10.115.254.4/30            0    100      0 i
r>i10.115.254.8/30            0    100      0 i

Note this is BGP “RIB-failure”, which indicates BGP fails to install the route in routing table. According to this link, the likely cause is the route is already installed by IGP which has a lower AD.

As shown, for routes already learned via OSPF, BGP encounters RIB-failure

rtr1#sh ip route
Routing entry for
  Known via "ospf 100", distance 110, metric 21, type extern 1
  Last update from on Port-channel22, 2d09h ago
  Routing Descriptor Blocks:
  *, from, 2d09h ago, via Port-channel22
      Route metric is 21, traffic share count is 1

What is the effect on BGP? BGP will not advertise “r” (RIB-failure) routes to peers. In other words, this may be the cause for BGP neighbor not learning networks as expected.

What is the work around? It is common for IGP to co-exist with BGP in an enterprise network, especially to learn certain internal networks via IGP, and use BGP to advertise those networks to other AS. As shown here, the RIB-failure behavior prevents advertisement out.

The solution is to use “network” statements with BGP to advertise. By using “network” statements, networks can be learned from connected routes, from dynamic routing, and from static route sources, BGP will advertise to peers.

router bgp 65000

Check routes advertised out again, RIB-failure is no longer showing for the network, it is now being advertised to BGP peers.

No comments:

Post a Comment