Won't you please, won't you be my router?
You know, a router's really only as good as its, first of all,
knowledge of how to forward a packet
and know where networks are and, secondly, its ability to do so.
So for this discussion, I'd like to use this topology right
here.
This represents right here, for example, a VLAN, a network.
And associated with that network,
we've got a network address.
And let's use 10.1.0.
And we'll use, in this example, the first three
numbers in the IP address to represent the network numbers.
So down here, we have the 10.2.0 network.
Between routers 1 and 2, we have the 10.3.0 network.
Up here, we have the 10.4.0 network, and down here,
the 10.5.0 network.
Also, I've assigned IP addresses to each of the interfaces
on the routers.
And each of the interfaces on router 1
ends in .1, just to make it really easy from a learning
perspective to remember who owns those addresses.
And then on router 2, each of its interfaces
has a last number in its IP address of .2.
So as an example, on this network right
here, the 10.1.0 network, the router's interface
has an IP address of 10.1.0.1, and this PC is at 10.1.0.11.
So let's talk about training a router, router 1 and router 2,
on how they can reach a given network.
And there are three basic ways of training a router on how
to reach a specific network.
The first of those is simply to configure an IP address
on an interface of a router, because once we configure an IP
address on an interface, the router says, hey,
I know how to get to this network.
It's directly connected.
Just like this interface right here--
1/0 on this router.
If we configure the interface with the IP
address of 10.1.0.1, it knows, badaboom,
I'm directly connected.
I know how to reach the 10.1.0 network.
It's off of this interface.
So that's option number one.
The problem, however, is that the router is not going
to learn about remote networks-- for example, the 10.4 network--
because router 1 is not directly connected to it.
So for networks that are not directly connected
to the router, option two would be to configure a static route.
A static route is simply giving an instruction.
Like, if somebody came over to your house and said, hey,
how do I get to the nearest convenience store?
You could probably tell them based on where you live.
Think about it.
You go down the street, make a left,
and you give them the directions.
Well, the same holds true if we're
telling R1 and configuring R1 to tell it
how to reach the 10.4.0 network, as an example, or the 10.5.0
network.
And so what we can do is we could
go into the configuration of R1 and say,
dear Mr. R1, if you ever need to forward a packet to the network
10.5.0, here's what we want you to do.
We want you to forward the packet out this interface
and send it over here to your good buddy R2.
And that's your job.
And then because R2 is directly connected to that network,
R2 already knows how to get to that 10.5 network.
So those are two options to begin with--
configure a router interface to be directly
connected to a network by giving that interface an IP address,
and, for remote networks that aren't directly connected,
we can configure a static route, specific instructions
on how to forward a packet in the direction
of that remote network.
Now, the big bummer in most networks
is that there are lots and lots of routes,
and having these static routes for every single network
is a pain in the bazooski.
So instead of configuring static routes,
the more popular and practical option
is to configure and use a dynamic routing protocol.
This is where the routers talk to each other.
Now, they're not trying to take over
the world by talking to each other, but what they will do
is they will share with each other information about what
they know regarding how to reach a network.
So if we configured a dynamic routing protocol
between R1 and R2, here are some things that they might say.
R1 might say, hey, I can reach the 10.1.0 network
and the 10.2.0 network.
And, R1 says to R2, if you ever need
to reach either of those networks,
go ahead and send those packets to me, because I
can reach them.
And, conversely, R2 may say to R1, hey, thanks a lot.
Hey, you know what, Mr. R1?
I know how to reach, says R2, the 10.4.0 and the 10.5.0
networks.
So if you ever need to reach those networks,
you can forward those packets to me,
and I will forward them to those final destinations.
And that's an example of a dynamic routing protocol
configured on both routers so that they
can share routing information and reachability
information with each other.
And the cool thing about it being dynamic--
if we lose a network or we change the topology,
the dynamic routing protocols can dynamically
update each other, so we don't have to manually go back
in and statically configure different routes based
on our topologies changing.
In this Nugget, we've taken a look
at the three most common methods for training a router on how
to reach a specific network.
I hope this has been informative for you,
and I'd like to thank you for viewing.