Introduction

This document describes how the bgp suppress-inactive command prevents the advertisement of routes that are not installed in the routing information base (RIB); it also describes the interaction between inactive routes and next-hop mismatch.

A rib-failure occurs when Border Gateway Protocol (BGP) tries to install the bestpath prefix into the RIB, but the RIB rejects the BGP route because a route with better administrative distance already exists in the routing table. An inactive BGP route is a route that is not installed in the RIB, but is installed in the BGP table as rib-failure.

Inactive Routes and Next-Hop Mismatch

When you use the bgp suppress-inactive command, it is critical that you understand the impact of next-hop mismatch.

Example Topology

Router 1 (R1) and router 2 (R2) have two parallel links; one links runs BGP AS 65535 and the other link runs Enhanced Interior Gateway Routing Protocol (EIGRP) AS 1. Both BGP and EIGRP are advertising the network 10.1.1.1/32 on R1.

R2 learns about the 10.1.1.1/32 route through both EIGRP and BGP, but installs only the EIGRP route in the routing table because of the lower administrative distance. Since the BGP route is not installed in the R2 routing table, the route appears as a rib-failure in the R2 BGP table. However, R2 advertises the BGP route to router 3 (R3) regardless of the rib-failure.

Show Outputs

For R2, enter the show ip route command in order to determine the current status of the routing table on 10.1.1.1, and enter the show ip bgp command in order to display the entries in the BGP routing table:

Note: The bgp suppress-inactive command suppresses the rib-failed routes only if the next-hop of the BGP rib-failure route is different from the next-hop of same route currently installed in the routing table.

In the RIB-NH Matches column, notice that the RIB next-hop does not match. Because the next-hop for 10.1.1.1/32 route is different in EIGRP and BGP, you are able to suppress the rib-failed route with the bgp suppress-inactive command.

In other words, if the next-hop in the routing table matches the BGP next-hop, the bgp suppress-inactive command does not suppress anymore. That means R3 starts receiving 10.1.1.1/32 route again even if it is RIB failed.

Add Static Route to Match Next-Hop

Add a static route for the prefix in order to match its next-hop in RIB with the next-hop advertised by BGP:

To summarize, the bgp suppress-inactive command lets BGP suppress the inactive route advertisement to the neighbors only if a route is already installed in the routing table with a better administrative distance and only if it has a different next-hop than the BGP next-hop for the same route.

Implication of ECMP on Next-Hop and Inactive Routes

In the previous example, if the routes installed in RIB (from EIGRP) are equal-cost multi-path (ECMP) and if inactive routes are suppressed, you see only a part of the routes that are suppressed.

Run EIGRP on both links between R1 and R2. R2 learns a set of prefixes from R1 as ECMP between the two next hops 192.168.1.1 and 192.168.2.1. For example:

Since the next-hop route is an ECMP on the same two links, you would expect next-hop to match for all prefixes in BGP and R2 to advertise all of them to R3. When you look at the RIB-NH Matches column of the output, some next-hop (NH) matches are yes and others are no.

In Cisco IOS® software, BGP can only pick one next-hop and advertises the best path only with that next-hop (without add-path, multi-path, BGP best-external, or other features).

While RIB installs the EIGRP routes for the destination (note the * in the output), RIB might pick one of the paths as the best path. If that path matches the one for the BGP next-hop, it is reported as yes for next-hop match.

In this example, RIB picked 192.168.1.1 as the next-hop for 10.1.1.1/32 network (note the * on 192.168.1.1 in the output from sh ip route 172.16.1.1), which matches with BGP next-hop's route 172.16.1.1; this is reported as a yes in next-hop match. RIB picked 192.168.2.1 as the next-hop for 10.1.1.5/32, which does not match with the BGP next-hop's route; this is reported as a no in next-hop mismatch.

In summary, the next-hop match is important only if you suppress inactive routes; if there is no match, you see an n/a flag in the RIB-NH Matches column, and R2 advertises all the routes to R3.