>> Let's talk about routers.
This chapter, we're going to focus on
how routers learn what they know.
The whole Internet is based on a series of routers
that direct traffic from
my system to anywhere in the world.
We want to figure out how it is
routers know the magic that they know.
One of the main ways that routers know is that they can
be told through a creation of manual static routes.
Which means a network administrator is
going to create a series of statements and say,
okay, if traffic is going to be
on the 10 network, go this direction.
Obviously, that's not what's happening on the Internet.
But for certain situations in my internal network,
that may be something that's used.
Usually, we allow our routers
to learn about their network and
other networks through a series
of dynamic routing protocols.
They're a handful.
We'll talk about RIP,
OSPF, and BGP in the next section.
BGP is what the Internet routers are using.
We'll also talk about a feature that
many routers have called NAT,
which is network address translation,
and it's best friend, PAT, port address translation.
Then we'll talk about access control lists
which are how we add security to routers.
For static routes, we can use command route add,.
There's also route p for persistent, and route print.
These are commands you'll want to know for the exam.
When we're creating static routes,
we use the command route add.
What we want to configure
is how to get the destination network.
If I want to get to the destination network,
on what interface on the router should traffic be sent?
Where is its next stop?
It's a little bit challenging
or not so much challenging as it is
time-consuming to go through and
configure static routes in all your routers.
However, if I do have a specific pathway that
doesn't change frequently or it doesn't change at all,
it might be good to use a static route in
that instance because
dynamic routing protocols are chatty.
They generate some additional traffic on the network.
If you have a route that doesn't need to be
learned or isn't something that comes and goes,
then a static route is probably best.
For many of the routes you need your devices to learn,
a routing protocol is probably the way to go.
There are three main ways of routing protocols;
one is called the Distance Vector,
then we have Link State,
and then we have our Exterior Gateway Protocols.
The ones you and I are most likely to work
with are distance vector or link state.
For distance vector routing,
these routers make their decision on the best path
based on how many hops away and in what direction.
For instance, a distance vector router is
always going to prefer two hops to three hops,
even if the three hop direction or
three hop link is at a much faster speed.
Distance vector routers are older than RAP,
which is routing information protocol.
We're on RIP version 2,
but it's still fairly dated.
The thing about RIP and
distance vector routing protocols is that they're
very easy to set up and they
don't generate a lot of traffic on the network.
They're pretty manageable for a very small network.
Quick and easy, wheel-like quick and easy.
The way these routers learn from
the network is from their neighbor,
and their neighbor learns from their neighbor.
That's a method called routing by rumor.
In the illustration, you can see router C is
connected to the four network and to the three network,
B is connected to the three network
>> and the two network,
>> A is connected to two network and the one network.
Each router only knows about
its directly connected network.
C only knows how to get to
the three network and the four network,
B only knows how to get to the two and three,
A only knows how to get to the one and two.
Ultimately, you can see that C is hey,
[inaudible] this information and
it's passing its routing table onto B.
It sends its routing table onto A until they
get updates about the various networks that exist.
That's routing by rumor.
The problem with that is that it takes
a long time for what we've referred to as convergence,
which means learning if there's a network change.
Another problem is we see that router C
is directly connected to the four network.
Because B is one hop from C,
if you look in B's routing table
and what's highlighted in green,
it says, okay, I'm one hop away from four network.
A says, well, I'm two hops
away from the four network because I'm
one hop from B who's one hop from C. So far so good.
That's how routing by rumor is supposed to work.
Let's say that that link between B and C goes down.
B can no longer get to
router C and can get to the fourth network.
B starts to listen to A,
and A says, "I'm two hops away from the four network."
B says, "Well, I'm a hop away from A,
I must be three hops."
C listens and says,
"I must be four hops," and then B hear C and says,
"I must be five hops," and A says,
"I must be six hops."
Basically, what's happening is
a process called count infinity.
It winds up happening if there are
no controls in place to keep
these routers from learning from each other
going different pathways when there's a downlink.
One of the things that cracks me up is
the way the RIP deals with that count infinity issue.
It says infinity as a number 16.
Sixteen is a high as we go to infinity.
What that means is once we count to the infinity,
process, B says,
"I'm 15 hops away",
then C says, "Oh, that makes me an infinite distance."
Therefore, there is a downlink.
That's one of the ways we deal with count to infinity,
and that's called poisoning the route.
The other thing about poisoning
the route is poison reverse.
It basically means that once that route is down,
C sends a message out saying,
"I'm 15 hops away from network 4," and
then B and A automatically know that's a dead network.
That's really how we counteract count to infinity.
There's also something called split horizon
which means that if you look at counter C,
it's sending information about
the four network on its Ethernet zero interface.
What split horizon means is it's not going to learn
information about the foreign network
on its Ethernet zero interface.
It's not going to send information to B and A and
learn information from B and A about the specific link.
Basically, these are just controls
that are built into RIP
that can be enabled to deal with
that problem called count to infinity.
With link-state routing protocols,
the most common is called OSPF,
open shortest path first.
Nice thing about OSPF is
rather than learning about the network from neighbors,
OSPF allows each router to learn about
the network on its own and
>> create its own topology table.
>> Every router directly communicates
with every other router through what
are called LSAs or link-state advertisements.
It continues to make sure that
the network is available through
these little link-state advertisements because they are
essentially constantly checking in
to make sure that they're still there.
When that router doesn't hear
the LSA from a specific router,
it assumes and it marks
that router as being dead or not available,
and then learns
different pathways throughout the network.
The problem with this is
that it's very resource-intensive.
RIP is good for smaller outdoor routers
that don't have a lot of processing capability.
But with link-state routers or link-state protocols,
you don't have a lot of memory,
and that's a lot of processing capability to
build these topology tables to track this information.
It's very resource-intensive and
is designed for larger networks.
Then you have Border Gateway Protocol,
and we really aren't going to get into
the border gateway routers because
these are the routers that are
used throughout the Internet.
That's a discussion for another day.