How does a network routing table get built inside a Layer 3 network computer router like this one?
We know that a router reads a Destination IP address in the packet header when it comes into
an interface on the router and it looks at that Destination IP address and it compares it to its
own routing table. But how is that routing table built? And more importantly can it be changed?
Does it change? And if so, how? Hey thanks for watching! I'm Clint Garrett and we saw in the last
video the steps a router takes to do its job as a router, but what we didn't look at was how the
network router table is configured or built on each router on a computer network. How does that
network router table know the networks around the router itself? To understand how routing tables
work, we have to look at how a routing table entry or entries are made on a router and to keep it
simple there are 2 basic ways routing tables are built. The first way or method and the most simple
way that a router table is built on a router is if the administrator or the technician statically
programs the routes into the table personally. This can be done by connecting to the physical
router directly or by logging into the router and entering the routes into the routing table
remotely over the network. Either way you have to log into the configuration of the router to
make that happen. Now this can work great if you have a small to mid-sized network where potential
changes to the network's physical layout are minimal or where there are no expected changes
in the near future. However I'm going to show you the following scenario on a computer network
with static routing tables on every router to show you how those static routing tables can be
detrimental to a network if any changes are made or if that network is a larger size. Let's suppose
you have these 4 routers connected like you see in this diagram. All 4 routers have statically
programmed routing tables on them, so the network admin or technician configured each router with
their respective network routes for each of the networks or the local area networks the LANs that
are connected to each of them. Assuming all routes were configured or programmed correctly on each
router you'll have a perfectly performing network as long as nothing changes. But if one of these
routers fails (like man-made equipment always has the potential to do) or if someone removes
a router, or if there is a power outage, or any number of other scenarios causing one or more of
these routers to no longer be connected on this network, you'll have a serious issue with packets
dropping and networks not being connected to each other by these routers precisely because they have
static routes programmed into them and they aren't aware (as a router can be aware) of any changes
that have occurred on the network itself. In this scenario if this middle router lost connectivity,
went down or was physically removed or changed, these other routers would still be trying to
send them traffic for the routes and the networks they "think" are still on that path or connection.
This can be bad as an entire network can actually go down because of this. This leads us to the
second method or second type of route table entry that's used on a computer network or on computer
network routers to build routing tables and that is known as "Dynamic Routing" So we dealt with
Static Routing - that's where you program in the routes. This is Dynamic Routing. Dynamic Routing
is where routers are programmed to talk to each other and tell each other their known routes and
update each other with any changes detected on a network, so they can all adjust their routing
tables accordingly. This also (Dynamic Routing also) allows routers to provide multiple paths to
different networks if something goes down. Dynamic Routing also allows the routers to
adjust and provide multiple pathways or connections to those networks if a router
or a connection to one of those routers goes down. Let's say all 4 of these routers are using Dynamic
Routing now and something happens to this second router just like the previous scenario. If they're
using Dynamic Routing protocols the routers that are still running and connected on the network
will update each other to let them know the second router isn't there anymore and each of those same
3 routers still running correctly will adjust each of their routing tables to keep network traffic
moving the best way possible. So the first method was Static Routing...a human actually programs or
configures the routes into the routing table on each router. That takes that human also
knowing their network really well to make sure that they program the correct routes into each
routing table. The second method is Dynamic Routing whereby the routers communicate with
each other with Dynamic Routing protocols and they learn the routes to enter into their own
routing table or tables as well as make changes to their own routing tables automatically based
on any physical changes detected on a network (like a router losing connectivity or going down
for instance). There are 2 categories of Dynamic Routing or 2 types of Dynamic Routing protocols,
is another way to say it, that you will need to know not only for the Network+ exam but with any
work you do in your own networking career and or business. Link State and Distance Vector.
In this short routing table tutorial i'm going to cover each of them again from the 30,000 foot
view to explain them as simply as possible. Now we won't get into the minute details of each
of the 2 Dynamic Routing protocols, at least not in this video, but I'll show you a basic
idea of how each of the Distance Vector routing protocols build their routes, learn the different
networks and routes to those networks, and they list them in their routing table based on how they
were learned and what distance, time and distance is estimated it takes for traffic to reach those
networks on those routes and connections. Now some of the Distance Vector routing protocols you'll
see used are things like EIGRP, IGRP, RIP and RIPv2 or rip and rip v2. They sometimes call
it just "rip" This table would be a good one to memorize or familiarize yourself with as these
are default administrative distances for each of these Distance Vector protocols. The second type
of Dynamic Routing protocol is known as Link State. Link State protocols are considerably
better choices than Distance Vector for a couple of reasons. First Link State routers do not waste
bandwidth by sending the entire route table back and forth to other routers like Distance Vector
routing protocols do. Distance Vector routing protocols will send the entire routing table
back and forth usually about every 30 seconds to update all the routers around them or all the
other routers on the network and that's regardless of whether there are any changes or not. Instead,
Link State protocols only send updates when a route actually changes and these updates are
sent using multicast (not broadcast like the 30 second updates in Distance Vector protocols are).
As soon as a network drops or is added using Link State protocols, a Link State Advertisement
(better known as an LSA - that's what that stands for Link State Advertisement) is sent out to all
the other routers to let them know each router then makes the proper updates to their respective
routing table. And that leads us to the second major advantage to Link State protocols being used
and that is "convergence time" Convergence time is much faster than Distance Vector
protocols often within just a few seconds. Again compared to every 30 seconds when Distance Vector
protocols are being used. Since routers using Link State protocols hear about route updates
almost as soon as they occur and hear it directly from the router who we'll say "owns" the network,
convergence is very fast. Now examples of Link State routing protocols are OSPF and IS-IS (or
some people call it is is). So there you have it! Those are the 2 ways a network router table is
built or learned on a network router and I'd invite you to learn more detail
about the Dynamic Routing protocols I just showed you, not only for the Network+ exam
and certification but for your overall network career and or business in the near future. Someone
who knows how to troubleshoot and design static routes or work with Dynamic Routing protocols
will be a force to be reckoned with and a person that's sought after in this industry
at almost every level. So with all of that being said, I will see you in the next video!