Understanding BGP Routing Tables: Adj-RIBs-In, Loc-RIB, and Adj-RIBs-Out

The Border Gateway Protocol (BGP) is one of the most essential and complex protocols in network routing. Despite its complexity, grasping its core components and functionality can offer significant advantages in managing and troubleshooting network operations. This post will delve into the concepts of Adj-RIBs-In, Loc-RIB, and Adj-RIBs-Out, the critical elements of the BGP Routing Information Base (RIB), and explain a typical route propagation process.

BGP uses a series of routing tables known as Routing Information Bases (RIBs) to manage route information. Let’s break down these critical components:

1. Adj-RIBs-In: These tables hold unedited routing information received from neighboring BGP routers. Simply put, these are all the routes that your BGP neighbors tell you about.

Router# show ip bgp neighbors received-routes

2. Loc-RIB: This is the actual routing information that the router uses. The Loc-RIB is developed from the Adj-RIBs-In, where BGP applies its path selection process to determine the optimal path for each route.

Router# show ip bgp

3. Adj-RIBs-Out: These tables contain the routes the router advertises to its neighbors. Essentially, these are the routes you’re telling your BGP neighbors about.

Router# show ip bgp neighbors advertised-routes

You might wonder what happens if an entry in the Loc-RIB isn’t in the routing table. If no other routing process is involved, the most likely reasons are:

  • Routing Policy: If a routing policy is in place, it may prevent certain routes from being installed in the routing table, despite them being in the Loc-RIB.
  • Next-hop reachability: BGP routes won’t be installed in the routing table if their next-hop IP address is not reachable.

To give a better perspective on how these components interact during route propagation, let’s outline a typical process:

1. Prefix Reception: The local router receives prefixes via eBGP or iBGP into its Adj-RIB-In.

2. Loc-RIB Creation: BGP evaluates all the prefixes in the Adj-RIB-In and applies the BGP path selection algorithm. The best paths are installed in the Loc-RIB, which contains only these optimal paths.

3. Forwarding Table Installation: BGP attempts to install the best prefixes from the Loc-RIB into the router’s forwarding table (i.e., the routing table). This step may fail if the next-hop isn’t reachable or a routing policy blocks the process.

4. Adj-RIBs-Out Population and Advertisement: The best paths are moved to the Adj-RIBs-Out and sent to peers. However, outbound routing policies may filter which routes are actually advertised.

Understanding these steps and concepts is critical to effectively managing and troubleshooting BGP networks. BGP is a nuanced protocol, and various factors can influence its behavior. Yet, by starting with these fundamentals, you can navigate the complexity of BGP with more confidence and clarity.