BGP Database Terminology
Posted by nemith in Juniper, Cisco, BGP, Dec. 9, 2009 at 1:35 p.m.Lately I have seen some confusion on the databases that BGP keeps and how they relate to each other and the routing table. So hopefully this post will help clear that up.
Defined in RFC4721 there are 3 different types RIB (Routing Information Base) databases:
- Adj-RIB-In
- Adj-RIB-Out
- Loc-RIB
For the sake of this post we are going to call the routing table the FIB (Forwarding Information Base) although i've had many arguments conversations on what should be called the FIB (mostly regarding CEF vs the routing table on Cisco routers).
Adj-RIB-In
The Adj-RIB-In database is the database of the routes received from a certain peer. This in turn meants that each peer gets it's own separate Adj-RIB-In database.
On Cisco routers this RIB is not saved unless neighbor soft-reconfiguration inbound command is used on the neighpor or peer group statements.
You can view the Adj-RIB-In database in the following ways:
IOS
show ip bgp neighbors <peer-address> received-routes
Junos
show route receive-protocol bgp <peer-address>
Adj-RIB-Out
Like Adj-RIB-in an Adj-RIB-Out database is created for each peer and contains the routes that you are sending to a peer.
Unlike Adj-RIB-In there is no additional commands needed in IOS (or JunOS for that matter) to create and save the database table.
You can view the Adj-RIB-Out database in the following ways:
IOS
show ip bgp neighbors <peer-address> advertised-routes
Junos
show route advertising-protocol bgp <peer-address>
Loc-RIB
The local RIB is the routes selected from each of the Adj-RIB-In tables and is the local database for the router and then in turn is used for the source of routes for the Adj-RIB-Out database. This is different than the FIB as it contains all the BGP attributes and usually contains more than just the "best" route. Routes that are ineligible for the FIB can also be here (for example routes marked as RIB-failure that the router cannot route to the NEXT-HOP attribute)
You can view the Loc-RIB database in the following ways:
IOS
show ip bgp
Junos
show route protocol bgp
So now when you are talking about BGP and refering to it's databases you'll be able to use the right terminology.

Comments
IPv6Freely commented on Dec. 18, 2009 at 9:14 a.m.Good post man. I'm sure this will clear up a lot of confusion some people have with BGP RIB tables.
Nice fill someone in on and this fill someone in on helped me alot in my college assignement. Say thank you you as your information.
Brim over I assent to but I dream the collection should have more info then it has.
Easily I to but I contemplate the collection should acquire more info then it has.
Good dispatch and this mail helped me alot in my college assignement. Gratefulness you on your information.
Saw your site bookmarked on Reddit.I love your site and marketing strategy.Your site is very useful for me .I bookmarked your site! My Home account money account money
After reading you site, Your site is very useful for me .I bookmarked your site! I am been engaged 10 years on the finance personal software If you have some questions, please get in touch with me. My Home finance personal software