- [Instructor] We've made mention previously
of the FIB and RIB structures
And we want to outline those a bit more clearly
in this video.
These structures within an IP network
perform two distinct functions.
Let's take a closer look starting with the FIB,
the forwarding information base.
The FIB is also sometimes referred to as the CEF table,
or the IP forwarding table.
And this is used to make IP destination
prefix-based switching decisions.
The FIB contains the interface number
and next hop information
for each reachable destination network prefix.
The FIB as we've mentioned in regard to
Cisco Express forwarding,
is also used in conjunction with CEF.
The FIB itself is a direct copy of the routing table.
Each time a routing change occurs
and the routing table is updated,
the FIB is also updated to reflect those changes.
With CEF, the FIB is used to make IP destination-based
switching decisions.
Which takes the CPU out of the equation
and creates a faster, more lightweight switching process.
One of the things to note about the FIB is that
generally speaking, the number of entries found
within the FIB may influence the ability of the router
to forward traffic quickly.
The more entries there are within the FIB,
the longer it could take for route lookup to happen.
But these days that isn't much of an issue
with our modern equipment.
We have very fast, ASIC-based forwarding,
that is nearly equal to line speeds.
On Cisco routers that have the ability to use
distribuTed CEF or dCEF,
a copy of the FIB would be applied
to each of the line card modules.
This again is another way that the CPU is offloaded
in order to increase the amount of traffic
that the device can handle without affecting performance.
The RIB or routing information base,
is the location where all information
related to IP routing is stored.
This is not specific to any particular routing protocol,
but rather it's used by all protocols, such as OSPF and BGP.
Anytime a routing protocol learns about a new route,
that route is inserted into the RIB.
When a previously learned route becomes unreachable,
this route is first marked as unusable,
and will eventually be removed completely from the RIB
if the route remains down.
And the amount of time that it takes for that to happen,
that's dependent upon the routing protocol that's in use,
and the particular timers that are related to the protocol
from which the route was learned.
Within the RIB, we'll find all routes that have been learned
dynamically through protocols such as OSPF.
And we'll also see directly attached networks
and any manually configured static routes as well.
An important distinction is that the RIB is not used
for traffic forwarding,
and it is not advertised to the rest of the networks
that are attached to the router.
In order to more clearly outline the difference
between these structures,
let's take a look at this overview.
We know that routers have various ways in which they can
learn about the best paths towards specific destinations.
That can include directly connected devices,
statically configured routes, and of course
routes learned through dynamic routing protocols.
And here at the top of this overview,
we see routes learned dynamically being represented.
Each routing protocol has its own internal structure
used for routing.
So where we see BGP, EIGRP and OSPF in this example,
we can see those respective structures.
The BGP table, the EIGRP topology table,
and the OSPF link state database.
Each of these routing protocols leverages and updates
their own structures based on updates
that they exchange with neighboring devices.
And they do that in order to build a picture of the network.
Each one has their own way to do determine
the best route for traffic,
based on their route selection algorithms.
This happens in different ways
depending on the protocol itself,
but in each case, the results are inserted
into the routing information base the RIB.
And those are based on administrative distance
for the route.
So for example, if a route is learned via OSPF and BGP,
OSPF will be the preferred route,
because it has a lower administrative distance
than internal BGP.
Now, you may be wondering,
why don't we use this information for packet forwarding?
Why don't we use the RIB for that?
It seems to have everything we need.
And the problem is,
some of the entries contained within the RIB
may have next hop addresses that are not directly connected.
For example, this is really commonly seen with BGP,
or with statically configured routes.
And this is where the forwarding information base
comes into play.
The FIB contains a copy of the routes found within the RIB.
This information is used to resolve next hop addressing.
Since the FIB has knowledge of the layer two data
required for forwarding,
the FIB will determine which outgoing interfaces are needed
for a particular network destination.
The completed FIB or CEF table is then capable
of making layer three switching decisions.
As we've already mentioned, any updates happening to the RIB
will be copied over to the FIB as well.
So that's an overview of the forwarding information base
and the routing information base,
and how those two structures work together
for efficient traffic movement within an IP based network.