This is one of multiple videos discussing static routing.
So notice what happens now when we configure a default route to 10.1.1.1
but specify an admin distance of say 100 and that should be the next-hop router of 10.1.1.2 with an admin
distance of 100.
So do show IP route
we've got a route in the routing table
notice the admin distance is 100 whereas previously
the admin distances of the routes was 1.
So 1 shown here the router can ping the loopback of router 5
and when we trace to the loopback it's going via router 2
and that should be expected because that's the route that we have in the routing table.
What happens when we add a static route to router 3 but with an admin distance of 150 and let's add
router 4 with an admin distance of 200? What do you think the routing table is going to look like?
So show IP route only shows the route to router 2
and that's because it's got the lowest administrative distance.
So when we trace to the loopback of router 5 it's going via router 2 but the running-config shows us that
there are three routes in the running config.
So this is a way to implement a preferred path which is router 2 and then a backup path and a second
backup.
What will happen now is router 2 will be used as the primary path because that's the only route in the
routing table
but, when we shut an interface down, so I'll shut down gigabit 00 the link to router 2 we can see the
interface has gone down.
When we type show IP route
notice the route has changed to go to 10.1.2.2. It has a high administrative distance but that's lower than
the administrative distance via router 4.
So now traffic it goes via router 3 again in the running config weve got three routes and this route
is the route being used at the moment
because the link to the next-hop router is down because the interface is administratively down.
So the router can see that this IP address is an interface that's down and that IP address is in the same
subnet as this IP address.
So that route is removed from the routing table
and this route is put in to the routing table.
So again the static route via 10.1.2.2 is in the routing table.
Now if we shut gigabit 01 down
what we should see is that the third route appears in the routing table and it does traffic is now gonna
go via router 4 what it does it goes to 10.1.3.2 and then on to router 5.
So again we can still ping the loopback of router 5 but the traffic is taking a different path.
Notice the administrative distance of this router is 200
the next hop is 10.1.3.2.
So if we now no shut gigabit 01
in other words, enable that interface. What we should see is that the path changes and it has it's now
going via 10.1.2.2 because that has a low administrative distance.
And if we no shut gigabit00
traffic should switch back to 10.1.1.2 which it has. So administrative distances in this way are often
used to select a primary path, backup path, and an alternate backup path
this could be an MPLS link,
this could be a good internet connection and this could be a not-so-good internet connection.
So we've got three paths to get to our destination and we'll choose the primary path first
but if it's not available then this path and if that's not available then we'll choose this path. Now static
routes don't work that well in that, they will only be removed from the routing table if the local interface
goes down.
So as an example if I shut down this link traffic would still go via router 2 and would end up in
a black hole.
So as an example, I'll send a thousand pings to router 5 before I start that ping
I'll get router 2 ready.
So interface gigabit
01 notice we are pinging but if I shut that interface down the pings start failing
we get an unreachable message. Router 1 configured with static routes doesn't realize that there's a problem
elsewhere in the network.
So it's still forwarding traffic to 10.1.1.2 even though that link is down. Router 2 in this case
is running a routing protocol.
So it can dynamically change its behavior but a router with static routes doesn't do that.
and that's a reason why you run dynamic routing protocols.
So when the interface came up again router 1 was able to ping router 5 start that again and shut
the interface down.
Now it doesn't dynamically shift traffic to an alternate path.
So that is a disadvantage of static routes.
They are static by nature they don't dynamically change based on network conditions.
They'll only reroute if the local interface goes down.
But if these interfaces are up the routers unaware of problems elsewhere in the network.
But if we were running a dynamic routing protocol it would dynamically adjust to network conditions.
So dynamic routing protocol such as EIGRP, OSPF, and BGP are better than running static routes
when you want your network to dynamically adjust to network conditions.
I hope you found this video useful if it was of benefit to you please like it and please subscribe to my
YouTube channel.
I wish you all the very best.