In this vlog, we're going to continue our discussion
about administrative distances.
So let's start with some questions.
When router 1 pings the loopback of rourter 4,
So forward, forward, forward four.
which way will the traffic go?
Show IP route shows us the routing table.
So you answer the question. which way will traffic go when sent from router 1 to router 4?
Will it go via router 2 or will go via router 3?
Which way will it go and why?
So let's do a trace to quadruple 4.
So the traffic is going via router 2.
So the next-hop is 10.1.1.2 and then it goes to 10.1.3.
.2.
Why?
So here's the routing table.
We've got these entries for network 4.4.4.4 both EIGRP and OSPF route are shown
on the routing table.
notice the admin distance of EIGRP and OSPF. EIGRP has a lower administrative distance than OSPF
does.
So typically EIGRP is more believable than OSPF.
See my other videos for examples demonstrating that however and this is the important piece.
Notice the mask used on the EIGRP route compared to the mask used on the OSPF route.
From a router's point of view, these are two separate networks.
We've got a 4.4.4.0 network and we've got a 4.4.4.4/32 network.
So /24 and /32 network.
They are separate networks.
The router will choose the route with the best match.
In other words, longest match 32 bits is a longer match or better match than 24 bits.
So this route
takes precedence over this route for traffic sent to the loopback of router 4 the administrative
distances are only used when we are talking about the same route.
In other words, the mask are the same here because they are different mask
longest match is used. So as an example, if I removed OSPF from the router and then use the command show IP
route.
Notice the EIGRP
route is the route in the routing table and if we traced to quadruple 4, it would go via router 3.
So let's add back OSPF and I'll just enable OSPF on all interfaces in area 0 show IP route,
OSPF loading still has to be done.
But once that's done notice the route is available in the routing table and we are going via router 2
in this example. So router 1 is learning about this network from router 2 through OSPF, router
1 is learning about this network through EIGRP from router 3 but because of the longest match
the traffic is sent via router 2.
So let's see why the summary route was added. So show run interface gigabit01, I added this summary
route to router 4 to summarize the network advertised through EIGRP.
So let's go into that interface and remove it.
Now, show IP route on router 1.
What you'll notice is the OSPF route has been removed, this new route has only been available in the
routing table for 5 seconds previously.
We had this route in the routing table for about 49 seconds, so a new route has been added through
EIGRP because it's the same route as the route advertised by OSPF.
In other words, this is the same as this exact match.
The EIGRP route takes precedence because it has a lower administrative distance.
So now when we trace to that loopback, it's going via router 3.
So be careful with admin distances and administrative distance is only used as a tiebreaker when multiple
routing protocols are trying to put the same route into the routing table if they are different routes.
In other words, they're different masks both routes will end up in the routing table.
That concludes this vlog.
If you enjoyed the video, please like it and please subscribe to our YouTube channel. I wish you all
the very best.