- [Narrator] Review this diagram.
I'll be configuring connectivity between Host A and Host B.
All interfaces have IP addressing assigned and are up.
I'll start by tracing from Host A over to Host B.
I can see that my default gateway
is the last router that responds, so I'll check it.
Looking at router one's routing table, show IP route,
I see there is no route that will carry traffic towards B.
I can fix that with a static route.
Config T, IP route one nine two dot one six eight
dot two dot zero, 255 dot 255 dot 255 dot zero,
the gateway of one nine two dot
one six eight dot one dot two.
This command creates a static route with destination network
of one nine two one six eight two dot zero,
and the subnet mask of 255 255 255 zero,
which is a slash 24 in the next top
of one nine two one six eight one dot two.
Going back to Host A I'll attempt another trace.
It appears there is no change, what gives?
If I pop into router two I can do some more investigation.
I'll issue a show IP route.
Router two knows how to reach Host B
because it's directly connected,
but router two doesn't know how to get back to Host A.
There's no route to reach one nine two
one six eight zero zero slash 24.
It's important to remember that routing is a two way street.
Not only does each router in the path
need to know how to reach a destination,
but once the traffic reaches the remote destination,
the routers in the return path need to know
how to reach the original sender.
I'll add a static route to reach Host A's subnet.
IP route one nine two dot one six eight dot zero dot zero,
subnet mask of 255 dot 255 dot 255 dot zero,
and the next top gateway of one nine two dot
one six eight dot one dot one.
Now if I pop back to Host A and test the trace route again,
I see that it successfully reaches Host B and returns.
Returning to the diagram,
I see that router two is a stub router.
This means it connects to no other routers.
In essence, it only has one place it can go,
which is to router one.
This would actually make it a
good candidate for a default route.
Again, a default route is one that if nothing more specific
exists, it will use this route.
I'll start a persistent ping from
Host A to B for verification.
Ping one nine two dot one six eight dot two dot two.
I see it completing due to the previous specific route.
I'll now jump back to router two and add the default route.
IP route zero dot zero dot zero dot zero,
zero dot zero dot zero dot zero,
the next top of one nine two dot
one six eight dot one dot one.
If I issue a do show IP route one nine two dot one six eight
dot zero dot two, I see the previous route is what's used.
Now I'll remove the old route.
No IP route one nine two dot one six eight dot zero dot zero
255 dot 255 dot 255 dot zero,
one nine two dot one six eight dot one dot one.
Now I'll issue a show IP route
one nine two dot one six eight dot zero dot two.
It returns network not in table,
so I'll issue a show IP route and see that
there is a default route in place
which will be used for this network.
Popping over to Host A I see the pings never skipped a beat.
So now utilizing the default route on router two,
if it is a subnet that isn't directly connected,
it will always forward the traffic to router one.
This can be useful for many scenarios.
This consumes fewer resources on the router,
so for smaller devices this helps
them perform more efficiently.
This lowers administrative burden,
as every time the network changes
no modification is required on this router.
For routers connecting to the internet
but aren't pulling full internet routes,
it ensures that packets to internet destinations
will go towards the internet.
This isn't a replacement for running a dynamic
routing protocol on a LAN.
By nature, internal routing protocols make it easy to share
the known subnets, so adding or removing subnets
from routers is automatically shared with the LAN.
Take a look at this diagram.
Router three has two possible connections to the internet.
Currently gig zero one is configured
as the primary internet connection,
but I want to set up gig zero two to be a backup.
What I'll use is a floating static route.
Static routes by default have an
administrative distance of one.
So what I'll do is add an additional static default route
but set the AD to be 210.
First I'll start with config T, and now the routing command.
IP route zero dot zero dot zero dot zero,
zero dot zero dot zero dot zero,
the destination of one nine two dot one six eight
dot two dot two and an administrative distance of 210.
Now if I issue a show IP route
I only see the primary default route
is pointing to gig zero one.
This is because with equal destination and mask routes
the lower administrative distance wins.
I'll unplug gig zero one and check again.
Show IP route.
I can now see my backup route has taken over successfully.
Now I'll bring the port back up.
Now that the port's up, I'll issue show IP route again,
and I see that everything is back to normal.
Static routing is a fundamental rite of passage
for every network engineer.
Be sure to put some additional practice in before the test.