1 00:00:00,700 --> 00:00:20,170 In this vlog, we're going to continue our discussion 2 00:00:20,170 --> 00:00:21,870 about administrative distances. 3 00:00:22,480 --> 00:00:24,090 So let's start with some questions. 4 00:00:24,790 --> 00:00:28,560 When router 1 pings the loopback of rourter 4, 5 00:00:28,720 --> 00:00:30,760 So forward, forward, forward four. 6 00:00:31,150 --> 00:00:34,210 which way will the traffic go? 7 00:00:35,080 --> 00:00:37,390 Show IP route shows us the routing table. 8 00:00:37,570 --> 00:00:43,630 So you answer the question. which way will traffic go when sent from router 1 to router 4? 9 00:00:44,080 --> 00:00:47,800 Will it go via router 2 or will go via router 3? 10 00:00:48,250 --> 00:00:51,570 Which way will it go and why? 11 00:00:52,240 --> 00:00:55,260 So let's do a trace to quadruple 4. 12 00:00:56,080 --> 00:00:59,440 So the traffic is going via router 2. 13 00:00:59,740 --> 00:01:04,870 So the next-hop is 10.1.1.2 and then it goes to 10.1.3. 14 00:01:04,870 --> 00:01:05,410 .2. 15 00:01:06,010 --> 00:01:06,700 Why? 16 00:01:07,940 --> 00:01:09,170 So here's the routing table. 17 00:01:10,180 --> 00:01:18,970 We've got these entries for network 4.4.4.4 both EIGRP and OSPF route are shown 18 00:01:18,970 --> 00:01:19,790 on the routing table. 19 00:01:20,320 --> 00:01:28,030 notice the admin distance of EIGRP and OSPF. EIGRP has a lower administrative distance than OSPF 20 00:01:28,030 --> 00:01:28,420 does. 21 00:01:28,810 --> 00:01:33,900 So typically EIGRP is more believable than OSPF. 22 00:01:34,390 --> 00:01:41,090 See my other videos for examples demonstrating that however and this is the important piece. 23 00:01:41,650 --> 00:01:48,520 Notice the mask used on the EIGRP route compared to the mask used on the OSPF route. 24 00:01:49,000 --> 00:01:52,370 From a router's point of view, these are two separate networks. 25 00:01:52,900 --> 00:02:00,100 We've got a 4.4.4.0 network and we've got a 4.4.4.4/32 network. 26 00:02:00,820 --> 00:02:03,670 So /24 and /32 network. 27 00:02:04,210 --> 00:02:05,980 They are separate networks. 28 00:02:06,430 --> 00:02:09,449 The router will choose the route with the best match. 29 00:02:09,970 --> 00:02:15,880 In other words, longest match 32 bits is a longer match or better match than 24 bits. 30 00:02:16,300 --> 00:02:17,260 So this route 31 00:02:18,180 --> 00:02:25,800 takes precedence over this route for traffic sent to the loopback of router 4 the administrative 32 00:02:25,800 --> 00:02:30,520 distances are only used when we are talking about the same route. 33 00:02:30,690 --> 00:02:34,800 In other words, the mask are the same here because they are different mask 34 00:02:35,220 --> 00:02:43,830 longest match is used. So as an example, if I removed OSPF from the router and then use the command show IP 35 00:02:43,830 --> 00:02:44,250 route. 36 00:02:44,940 --> 00:02:45,840 Notice the EIGRP 37 00:02:45,960 --> 00:02:53,310 route is the route in the routing table and if we traced to quadruple 4, it would go via router 3. 38 00:02:54,390 --> 00:03:06,570 So let's add back OSPF and I'll just enable OSPF on all interfaces in area 0 show IP route, 39 00:03:07,860 --> 00:03:10,920 OSPF loading still has to be done. 40 00:03:13,060 --> 00:03:20,110 But once that's done notice the route is available in the routing table and we are going via router 2 41 00:03:20,110 --> 00:03:28,140 in this example. So router 1 is learning about this network from router 2 through OSPF, router 42 00:03:28,400 --> 00:03:35,740 1 is learning about this network through EIGRP from router 3 but because of the longest match 43 00:03:36,790 --> 00:03:39,910 the traffic is sent via router 2. 44 00:03:43,610 --> 00:03:52,190 So let's see why the summary route was added. So show run interface gigabit01, I added this summary 45 00:03:52,190 --> 00:03:58,790 route to router 4 to summarize the network advertised through EIGRP. 46 00:03:59,930 --> 00:04:02,480 So let's go into that interface and remove it. 47 00:04:07,710 --> 00:04:10,980 Now, show IP route on router 1. 48 00:04:12,450 --> 00:04:19,560 What you'll notice is the OSPF route has been removed, this new route has only been available in the 49 00:04:19,560 --> 00:04:22,680 routing table for 5 seconds previously. 50 00:04:23,930 --> 00:04:31,790 We had this route in the routing table for about 49 seconds, so a new route has been added through 51 00:04:31,790 --> 00:04:37,040 EIGRP because it's the same route as the route advertised by OSPF. 52 00:04:37,460 --> 00:04:42,950 In other words, this is the same as this exact match. 53 00:04:43,730 --> 00:04:49,140 The EIGRP route takes precedence because it has a lower administrative distance. 54 00:04:49,850 --> 00:04:54,200 So now when we trace to that loopback, it's going via router 3. 55 00:04:55,090 --> 00:05:02,350 So be careful with admin distances and administrative distance is only used as a tiebreaker when multiple 56 00:05:02,350 --> 00:05:07,440 routing protocols are trying to put the same route into the routing table if they are different routes. 57 00:05:07,450 --> 00:05:11,210 In other words, they're different masks both routes will end up in the routing table. 58 00:05:11,830 --> 00:05:13,180 That concludes this vlog. 59 00:05:13,630 --> 00:05:19,810 If you enjoyed the video, please like it and please subscribe to our YouTube channel. I wish you all 60 00:05:19,810 --> 00:05:20,470 the very best.