Routing information Base (RIB):
AFter the FIB and adjacency tables are build, the RIB is rarely used. The only time the RIB is ever used is when packets must be processed by the routers CPU (control and management plane traffic cannot be CEF switches as they require processing).
To see the RIB contents:
sh ip route
sh ip arp
sh ipv6 route
sh ipv6 neighbors
Forwading Information Base (FIB):
The normal routing table, or routing information base (RIB) used for process switching is inefficient. Not only does it whole too much information, but it may require recursive lookups to finally find the final destination. The FIB was creating to compliment the adjacency table. The FIB is simply a table that lists prefixes, and the adjacency table position for how to reach them.
The FIB either points to a CEF adjacency or to a next hop/adjancency table entry.
The CEF adjacencies available are: drop, receive, attached
To see the contents of the FIB:
sh ip cef
sh ipv6 cef
As stated earlier, fast switching was not perfect. It did speed up the route table lookup (by caching results) and the L2 resolution but it just did not do it well. Fast switching did not take into account that also a router may have hundreds or thousands of destinations, it really only had a few neighbors. This is what CEF took advantage of. CEF built an adjacency table, storing L2 egress information, preconsutructed L2 headers in memory. Now with the adjacency table, a router can skip the first step of fast switching, and can skip ARP resolution, or building out the frame L2 headers.
To see the IPv4 and IPv6 (just 1) adjacency table:
Note above how the L2 header is ready to go in the adjacency table, and it even tells you how it was populated, via ARP table.
I’m going to skip the LFIB until I properly learn MPLS.