The method of using a static route
implies that the administrator, or hopefully the administrator,
is configuring specific instructions on the router
to tell it how to reach, or how to forward a packet regarding
a remote network.
And we're going to leverage this topology once again
in our discussion of three different categories
of static routes.
And the three categories of static routes
would be specific routes to remote networks,
or, we could have a static route that
identifies how to reach a group, or a range of networks.
Sometimes that's referred to as a summary of network addresses.
And then we'd also have a default route
that we can configure, which is kind like saying to the router,
if you're not sure how to forward
a packet to some network and you don't
have any other more specific information, just go ahead
and do this.
So let's do examples of all three,
regarding specific remote networks.
If we had a PC right here who was
trying to ping the 10.5.0.55 host down here on network
10.5.0, the PC, when it's putting together
that ping request, would identify
that it's locally on 10.1.0, and that the remote device is
on 10.5.0, based on the layer 3 addresses.
And, as a result, it would take advantage
of its default gateway.
And, at layer 2, would encode the layer 2 address
of the default gateway's interface, at which point
this PC is hoping that when the router receives that,
it can continue to make that forwarding
decision in the direction over here of the 10.5.0 network.
So, for example, one here.
A specific route for R1 to get to the network might look like,
hey dear Mr. Router, to get to the 10.5.0 network,
go ahead and use R2 as the next hop, the next device
to forward it to.
So on this network here, This is the 10.3.0 network,
R1's address is 10.3.0.1, and R2's address is 10.3.0.2.
So our static route that we are configuring,
R1, would say, to get to the 10.5.0 network,
go ahead and forward it to 10.3.0.2,
which is the IP address right here on R2's 0/0 interface.
And if R1 had that information, it could then forward that
frame at layer 2 to the Mac address of router 2, who
would then receive it, look at the destination,
and continue to forward it to its final destination.
And that's because R2 is directly
connected to the 10.5.0 network, and knows how to reach it.
So this is an example here of a static route
to a specific network of 10.5.0.
The second example of a static route
might be a range of networks.
We could tell R1, hey, Mr. R1, to go ahead and reach
10.anything.
Go ahead and use 10.3.0.2 as your next hop.
So if R1 gets a packet for 10.4, for example, this static route
says, hey, 10.anything, I'm going
to go ahead and forward that over to R2,
and it's now R2's job to continue
forwarding that packet.
And the third option right here is the default route.
And with the default route, we'll
put the example right here as number three, is basically
going to say, Mr. R1, if you have a packet that's
going to a network address that you
don't know how to reach, go ahead and use this default
route.
And the next hop is 10.3.0.2, because R2 is the only
other router in our topology.
And if R2 is also connected to this big puffy cloud called
the Internet, It also is not like likely
going to know all the addresses on the Internet,
but it also has a default route configured.
And it says to R2, if you don't know
how to reach a remote network, you go ahead and forward it
to your Internet service provider's IP address.
So these are three examples of how
static routes can be used for a router
to reach remote networks.
And I'd like to do a thought experiment with you
just for a moment.
Let's imagine that we configured all three of these on R1.
And furthermore, let's imagine that this PC right here
has been configured to use R1 as its default gateway.
And this PC then does a ping to 10.5.0.55, this device right
here.
The packet is received at R1.
R1 has a static route that says, oh, I
need to forward this to the next hop of R2,
so he forwards the packet over in this direction.
R2 forwards it down to the PC at 10.5.0.55,
and on ethernet, they'll use ARP along the way
if they need to learn layer 2 addresses.
No problem there.
So when this PC replies, it's going
to reply back to its default gateway,
presuming that it's been configured to use
R2 as its default gateway.
And then when R2 gets the packet,
it's supposed to go back to the 10.1.0 network.
What's R2 going to do?
And the answer is, R2 is going to give up
at that point, because it does not know how
to reach the 10.1.0 network.
So what we'd also want to do is train R2
on how to reach these other networks over here,
the 10.1, and 10.2 networks.
And we can do that using the same combination of techniques,
a static route to the specific networks, or we
could have a static route for the range of networks.
Or, we could tell R2 to use R1 as a default route,
and forward any packets that it doesn't know the network
destinations of over to R1, and now it's his problem.
In this nugget, we focused on static routes.
We identified three different types
of routes that we could put in, a route to a specific network,
a route to a range or a summary of networks,
or a third, a default route.
And all three provide instructions
for the router on how to forward packets for networks that
are not directly connected.
I hope this has been informative for you,
and I'd like to thank you for viewing.