This is one of multiple videos discussing static routing.
I've received a number of questions along the lines of multiple default routes supported on a router. In
this apology we have four routers and we are concentrating on router 1 which has three paths to get
to the loopback of router 5. To get to 5.5.5.5 router
1 can go via router 2 or via router 3 or via router 4.
So have a look at this routing table and tell me which way will router 1 send traffic to the loopback
of router 5?
So let's do a trace.
What you'll notice is that the pings fail and they fail because the gateway of last resort is not configured
and there's no specific route to 5.5.5.5.
If we use the command debug IP packet we'll be able to see what happens when router 1 pings router 5.
I'll send a single ping in this example.
And what you'll notice is we're told that the packet is unroutable.
The router doesn't know where to forward the packet
so it simply drops it.
If we want to send traffic to router 5 we need to configure a static route or configure a routing protocol.
So this option ABCD forwarding routers IP address allows us to specify the next-hop IP address and we
interface or to the next hop IP address.
So this option ABCD forwarding routers IP address allows us to specify the next-hop IP address and we
can also specify a administrative distance for the route.
I'm not going to do that here.
I'm going to press a carriage return.
What this has done is set a default route to router 2.
So show IP route now shows that we have a gateway of last resort configured of 10.1.1.1.2
to the default network we can see a static ROFFT So notice the stall asterisk denoting candidate to
default route. The router has a default route via 10.1.1.2 notice the administrative
distance of the routers one the administrative distance or believability of a static route to a next
hop IP address is one.
So that's a lot lower than a routing protocol such as OSPF or RIP, RIP as an example has an admin distance
of 120 if you can figure out a static route to the local outgoing interface it would have and it must
administrative distance of zero.
So now when we ping quadruple five the ping works I'll turn off that debug and do that again.
So Ping succeeds and if we trace to the loopback it's going via router 2 10.1.1.2 and that's because
once again the default route is pointing to router 2.
So can we configure another default route.
So as an example, can we configure it to go via router 3, 10.1.2.2?
And the answer is, yes we can.
If we configure it to default the gateways
notice how it shows in the routing table we can ping router 5
and when we trace to router 5 the router is gonna load balance across those two paths.
So it's gonna load balance with one packet going to 10.1.2.2 and one packet going to 10.1.1.2 and
we can see that in this output here.
Notice the traces are load-balanced across router2 and router 3
and then we see router 5 as the next-hop depending on which path that traffic took.
So it either goes via this top link or the second link.
So show IP route shows us that again we could add a third route via router 4. So show IP route notice
we have three entries in the routing table and if we trace to 5.5.5.5 traffic is load-balanced across
those three static routes.
So in answer to the question, can you have multiple default routes?
The answer is, yes you can.
The router will load balance across those parts equally.
Now you can change the administrative distance.
So at the moment if I type do show run pipe include route will see the three static routes in the running
config of the router and what we could do as an example is remove the routes from the routing table
and add them back with different admin distances.
So previously the administrative distance was one but we cannot change that. Before we change it
notice do show IP route shows us that we no longer have any routes to router 5.
And if we ping that back to loopback the pings are failing because there's no route in the rotting
table.
I hope you enjoyed this video, if it was of benefit to you please like it and please subscribe to my YouTube channel.
I wish you all the very best.