BGP Tables Flashcards
BGP Tables
BGP uses three tables for maintaining a network prefix and the path attributes (PA)
associated with each path for a prefix.
- Adj-RIB-in - show ip bgp neighbor x.x.x.x received-routes
- Loc-RIB - show ip bgp
- Adj-RIB-out - show ip bgp neighbor x.x.x.x advertised-routes
Adj-RIB-in
Contains the Network Layer Reachability Information (NLRI) (network
prefix and prefix-length) and BGP PAs in the original form that they are received
from a BGP peer.
The Adj-RIB-in table is purged after all route policies are processed to save memory.
Loc-RIB
Contains all the NLRIs that originate locally or that came from the
Adj-RIB-in table after passing any inbound route policy processing. Note that BGP
PAs in the Loc-RIB might have been modified by the router’s inbound route policies
for a specific neighbor.
After NLRIs pass the validity and next-hop reachability check, the BGP best path
algorithm selects the best NLRI for a specific prefix. The Loc-RIB table is the table
used for presenting routes to the IP routing table and is the BGP table commonly
referred to as “The BGP table.”
Adj-RIB-out
Contains the NLRIs after outbound route policies have processed.
Different outbound route policies could exist between neighbors, so the Adj-RIB-
out keeps track of the neighbors and the NLRIs for each neighbor.
Outbound route policies could modify PAs for a specific neighbor.
Learned routes from a neighbor before any inbound route policy is applied:
show ip bgp neigbor x.x.x.x received-routes - Adj-RIB-In
BGP table:
show ip bgp - Loc-RIB
Advertised routes to neighbor after applying outbound route policy:
show ip bgp neighbor x.x.x.x advertised-routes - Adj-RIB-Out