Complete Route Advertisement
The complete BGP route advertisement process must take into account routes that are advertised locally and routes that are received from other BGP neighbors.
Not every prefix in the Loc-RIB is advertised to a BGP peer or installed into the Global RIB when received from a BGP peer.
BGP performs the following route-processing steps:
Step 1 Perform a quick validity check
- This is performed on the route to ensure that a routing loop is not occurring.
- If the router recognizes its AS in the AS-Path or its router-ID (RID) in the IBGP path attributes (Originator/Cluster-ID).
- If no duplicates are found, the NLRI passes the validity check and moves on to the next stage.
Step 2 Store the route in Adj-RIB-In and process Inbound Route Policies
- The NLRI is stored in the Adj-RIB-In table in its original state.
- The inbound route policy is applied based on the neighbor the route was received.
Step 3 Update the Loc-RIB
- The BGP Loc-RIB database is updated with the NLRI after inbound route-policy processing has occurred.
- The Adj-RIB-in is cleared to save memory.
Step 4 Verify Next-Hop Reachability
- Confirm that the next-hop address is resolvable in the global RIB.
- If the next-hop address is not resolvable in the RIB, the NLRI remains but does not process further.
Step 5 Compute the BGP best-path
- Multiple NLRIs (paths) can exist for the same network prefix in the Loc-RIB table.
- BGP only advertises the best path to its neighbors.
- The router must identify the BGP best path and pass only the best-path and its PAs to Step 6.
Step 6 Install the BGP best-path into the Global RIB and advertise to peers
- Install the prefix into the Global RIB using the next-hop IP address from the BGP Loc-RIB table.
- In some occurrences, the route cannot be installed into the Global RIB (a static route that has a lower administrative distance than BGP), which results in a RIB failure.
- A RIB failure does not prevent the advertisement of the NLRI to other BGP neighbors.
- The exact reason for a RIB failure is seen with the command show ip bgp rib-failure.
Step 7 Process Outbound Neighbor Route Policies
- The NLRI is processed through any specific outbound neighbor route policies.
- After processing, if the route was not denied by the outbound policies, the route is stored in the Adj-RIB-Out table for later reference.
Step 8 Advertise the NLRI to BGP peers
- Advertise the NLRI to BGP peers.
- If the NLRI’s next-hop BGP PA is 0.0.0.0, then the next-hop address is changed to the IP address of the BGP session.