Routing Table vs RIB - Correct?
COrrect me if I am wrong:
The RIB contains all routes from the same routing protocol.
OSPF has its own RIB. EIGRP has its own RIB etc.
The "good" routes are taken from the RIB to form the routing table which is in "show ip route".
Thereafter, the routing table is parsed and the routes are stored in CEF table "show ip cef".
Am I correct?
The RIB contains all routes from the same routing protocol.
OSPF has its own RIB. EIGRP has its own RIB etc.
The "good" routes are taken from the RIB to form the routing table which is in "show ip route".
Thereafter, the routing table is parsed and the routes are stored in CEF table "show ip cef".
Am I correct?
Comments
-
OfWolfAndMan Member Posts: 923 ■■■■□□□□□□The RIB is a global routing table with all routes (That are being used that is).
Dont forget directly connected routes as well. As for the CEF table...
Usually, at least for IOS, a recursive lookup is required for calculating how to get to a next hop. First there is the route and the next hop, but then the recursion occurs when the router has to find an outgoing interface to get to the next hop. This is where CEF comes in. It pre calculates those values for you and stores it in the FIB.:study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation [] -
fredrikjj Member Posts: 879RIB (Routing Information Base) is just a general term that refers to some kind of storage of routing related data on the router. The routing table is sometimes called "the RIB", but this is not really correct since, as you point out, there are several different RIBs. The routing table in particular is called the "IP RIB" to distinguish it from other RIBs.
-
dppagc Member Posts: 293show ip ospf rib -> OSPF RIB
show ip eigrp rib -> EIGRP rib
show ip route -> IP RIB
show ip cef -> CEF table
What is the for the forward information base and the adjacency table???
I am pretty confused, -
joetest Member Posts: 99 ■■□□□□□□□□If you've read the CCNP material you should know it.
The FIB aka CEF table is the layer 3 information CEF uses and the adjacency table is the L2 info it uses to make the "precalculated" forwarding paths. -
dppagc Member Posts: 293So for my posts above, it is correct right?
So there is no command to display the FIB?
For the adjacency table, is it show mac-address table? -
joetest Member Posts: 99 ■■□□□□□□□□So for my posts above, it is correct right?
So there is no command to display the FIB?
For the adjacency table, is it show mac-address table?
Show ip cef is the FIB also known as CEF table
show adjacency shows the adjacency table of cef.
I suggest you read more about it. A short nice explanation: https://routing-bits.com/2009/06/02/understanding-cef/ -
james43026 Member Posts: 303 ■■□□□□□□□□Yes, each routing protocol running on a router has it's own RIB, and the best routes from all RIB's are selected and placed into the global routing table. As joetest mentioned the FIB and adjacency tables are used for CEF, and while built using the global routing table, works a lot differently under the hood, and is even built on specific hardware AKA TCAM.
-
d4nz1g Member Posts: 464Take a look at this:
https://networklessons.com/wp-content/uploads/2015/08/mpls-lib-lfib.png
where:
-EIGRP RIB = sh ip eigrp topology
-OSPF RIB = sh ip ospf rib
-BGP RIB = sh ip bgp
All of these protocols are "contributors" to the ip rib process, which will be your ip routing table (RIB).
We now have to understand the difference between control and data planes.
Control plane is responsible for protocol interaction and information exchange with neighboring routers. RIP, EIGRP, BGP, OSPF and the main RIB are all Control Plane functions.
As soon as the Control Plane has enough information to move packets, it starts to program the Data Plane, which is responsible for the packet forwarding per se. So we have the Control Plane (route processor, supervisor, MSFC, etc) to program the actually forwarding plane, also called Data Plane (which is composed by ASICS, NPE, DFC, and so on). These Data Plane components usually stores FIB information, which will be your Forwarding Table in a format knows as TCAM.
Keep in mind that what I mentioned above applies specifically to routers/switches with a distributed architecture (ASR9k, 6500, 7600, etc). Software Based routers (ISR, ASR900, ASR1k) still hold everything on the main processing unit (Main memory or in the Supervisor itself). By the way, data plane and control plane concepts applies for both.
TL/DR:
You have Control Plane funcions (Protocols and the RIB which is populated by these protocols) and Data Plane functions (FIB lookups and packet forwarding).
Show ip route = routing information that will populate your FIB. (Control Plane)
show ip cef = routing information inside your FIB. (Data Plane)
FIB will be your actual forwarding path (how you should move packets), and Cisco uses CEF on most of its platforms. CEF stores several information related to packet forwarding, including pre-calculated headers and load balancing/loadsharing computations. As a result, your FIB will contain all the information a router might need to forward a packet.
I dont know if I was 100% accurate, but I hope this might help you. -
james43026 Member Posts: 303 ■■□□□□□□□□I will disagree with you on several of your points here, just to try to clarify a few things. First the local RIB for a routing protocol is not equivalent to the OSPF database,EIGRP topology table, or BGP table. The RIB is literally a routing table. The OSPF database and EIGRP topology tables are not routing tables. Each routing protocol builds it's own local RIB based on what routes it has received and stored in its OSPF database and EIGRP topology table, these are the best routes to each network, in the case of OSPF SPF runs on the OSPF database and all of the best routes are placed into the OSPF local RIB,. For EIGRP DUAL runs on the EIGRP topology table, and then determines best routes and places them into the EIGRP local RIB. The global RIB is then built using the local RIB of each routing protocol on the device. This article , helps further explain and provide examples.
As far as the control plane goes. The PFC would not be part of the control plane, it is strictly used for CEF and or hardware based forwarding, as it's literally a daughter card of the MSFC, and the PFC contains all of the ASICS that do layer 2 and layer 3 forwarding. The MSFC would be the control plane though, as it contains both the layer 2 and layer 3 processors. For reference, this article explains exactly what both do. So the PFC would contain both the FIB and adjacency tables used for CEF, and they would be stored on TCAM, also located on the PFC. Keep in mind that the PFC and MSFC are both part of the Supervisor.
CEF is not just a way of organizing information, it has it's own logic built into it. For things such as load balancing on a per destination basis by default. CEF is also responsible for making the decisions on which entry in the FIB a packet matches. -
d4nz1g Member Posts: 464james43026 wrote: »I will disagree with you on several of your points here, just to try to clarify a few things. First the local RIB for a routing protocol is not equivalent to the OSPF database,EIGRP topology table, or BGP table. The RIB is literally a routing table. The OSPF database and EIGRP topology tables are not routing tables. Each routing protocol builds it's own local RIB based on what routes it has received and stored in its OSPF database and EIGRP topology table, these are the best routes to each network, in the case of OSPF SPF runs on the OSPF database and all of the best routes are placed into the OSPF local RIB,. For EIGRP DUAL runs on the EIGRP topology table, and then determines best routes and places them into the EIGRP local RIB. The global RIB is then built using the local RIB of each routing protocol on the device. This article , helps further explain and provide examples.
As far as the control plane goes. The PFC would not be part of the control plane, it is strictly used for CEF and or hardware based forwarding, as it's literally a daughter card of the MSFC, and the PFC contains all of the ASICS that do layer 2 and layer 3 forwarding. The MSFC would be the control plane though, as it contains both the layer 2 and layer 3 processors. For reference, this article explains exactly what both do. So the PFC would contain both the FIB and adjacency tables used for CEF, and they would be stored on TCAM, also located on the PFC. Keep in mind that the PFC and MSFC are both part of the Supervisor.
CEF is not just a way of organizing information, it has it's own logic built into it. For things such as load balancing on a per destination basis by default. CEF is also responsible for making the decisions on which entry in the FIB a packet matches.
Thanks for the correction; it was very clarifying.
Gonna take a look at those articles.