Steps to process BGP Packet
When a Router receives route a BGP UPDATE packet that contains Network Layer Reachability Information (NLRI) Router processed the packet in below order:
– Step 1. BGP checks for the NLRI (prefix received) against any BGP inbound filter configured on the Router.
– Step 2. If the NLRI is not filtered, the prefix installed in the BGP table.
– Step 3. If the Router Routing Table already has the same prefix/prefix-length entry with a lower administrative distance (AD) BGP marks the route received with RIB-Failure.
In this example, routes 2.2.2.2/32 and 3.3.3.3/32 are received via BGP and are installed in the Routing Table.
The outputs show both routes in the BGP table with the use of the show ip bgp:
The Routing Table shows both routes with the command show ip route:
An example of RIB-failure can be seen because of static routes (with lower AD ) configured for the same prefixes
The outputs show static routes added to the configuration and how these override the BGP route in the Routing Table:
RIB-Failure routes marked as r in the BGP table. This is because the routes received via BGP are not in the Routing Table.
BGP still advertises networks in RIB-Failure state on Cisco Routers that run Cisco IOS. We can stop BGP forcefully to advertise RIB-Failure routes by below command:
bgp suppress-inactive
Note: Only the networks in RIB-Failure condition which have a different next-hop in BGP than its same entry in Routing Table are suppressed with the bgp suppress-inactive command.
On Router INB_R2, routes are shown in the BGP table in RIB-Failure condition:
The reason is that Static Routes are configured:
- The Static Route for 1.1.1.1/32 defines a next-hop to 10.1.2.254 which differs from the next-hop received via BGP which is 10.1.2.1
- The Static Route for 3.3.3.3/32 defines a next-hop which is equal to the next-hop received via BGP which is 10.2.3.3
To confirm if next-hop matches between rib-failure routes use below command :
show ip bgp rib-failure
Without bgp suppress-inactive command, even in RIB-Failure state, INB_R2 continues to advertise both networks to Router R4 via BGP since this is the default behavior.
In Router INB_R4, you can see both routes are received via BGP:
With bgp suppress-inactive added to the BGP configuration on Router INB_R2, the routes in RIB-Failure state and with RIB-NH Matches set to No are not advertised anymore:
The next output shows that Router R4 does not receive the route 1.1.1.1/32 via BGP since Router R2 does not advertise it anymore.