WEBVTT 0:00:05.340000 --> 0:00:08.360000 So now we're going to look at how our routes selected. 0:00:08.360000 --> 0:00:15.420000 And what I mean by that is if a router learns of a route to a destination, 0:00:15.420000 --> 0:00:18.460000 either it's a connected route or a static router, he dynamically learned 0:00:18.460000 --> 0:00:22.500000 it, if that route is good, if it meets all of our criteria, it's got a 0:00:22.500000 --> 0:00:25.440000 next hop, it's got a subnet mask, all that stuff we talked about. 0:00:25.440000 --> 0:00:30.400000 So if that is the only path he has, he'll put that in the routing table. 0:00:30.400000 --> 0:00:33.760000 It's selected because he doesn't have anything to choose from, that's 0:00:33.760000 --> 0:00:35.200000 the one and only one. 0:00:35.200000 --> 0:00:40.520000 But what if he gets two or more routes to that same destination network? 0:00:40.520000 --> 0:00:43.620000 I talked about earlier that he wants to choose the best one. 0:00:43.620000 --> 0:00:45.520000 So how is he going to do that? 0:00:45.520000 --> 0:00:48.320000 And that's what we're going to look at here in this section. 0:00:48.320000 --> 0:00:52.200000 So the first question a router asks itself when a routing update or when 0:00:52.200000 --> 0:00:55.440000 a route comes in or maybe you statically configure a router, maybe he's 0:00:55.440000 --> 0:00:56.580000 directly connected. 0:00:56.580000 --> 0:01:00.020000 Basically the router says, look, I've just learned of a network that I 0:01:00.020000 --> 0:01:03.880000 already know about that's already in my routing table. 0:01:03.880000 --> 0:01:09.180000 The first question he asks himself is, is the way I learned it, is the 0:01:09.180000 --> 0:01:13.520000 method by which I learned it the same as the method I've already got it 0:01:13.520000 --> 0:01:17.700000 in my routing table or is it a different method? 0:01:17.700000 --> 0:01:23.120000 If it is a different method, then he says, okay, of all the ways I could 0:01:23.120000 --> 0:01:27.020000 learn about a route, either because I'm sitting on it, I'm directly connected 0:01:27.020000 --> 0:01:31.760000 to it, somebody statically typed it in as a static route, or I learned 0:01:31.760000 --> 0:01:35.860000 about it via some routing protocol of all those methods, each one of them 0:01:35.860000 --> 0:01:39.560000 I'm going to prioritize them from the absolute best out of all of them 0:01:39.560000 --> 0:01:42.240000 to the absolute worst out of all of them. 0:01:42.240000 --> 0:01:46.380000 Each one of these is going to be prioritized with a number called administrative 0:01:46.380000 --> 0:01:50.880000 distance. So with administrative distance like it says, it defines the 0:01:50.880000 --> 0:01:55.700000 trustworthiness or the preferably of a routing protocol. 0:01:55.700000 --> 0:01:59.100000 And when I say a routing protocol, I mean any method or route could be 0:01:59.100000 --> 0:02:01.680000 learned, including static routes and connected routes. 0:02:01.680000 --> 0:02:06.880000 Those also have a number called administrative distance. 0:02:06.880000 --> 0:02:11.600000 It's an 8-bit number, as we can see here, from 0 to 255. 0:02:11.600000 --> 0:02:14.720000 And the lower the value, the better. 0:02:14.720000 --> 0:02:18.780000 So the lower the administrative distance, the more preferable that is. 0:02:18.780000 --> 0:02:21.100000 So we can see here this chart. 0:02:21.100000 --> 0:02:25.580000 And if you're preparing for your CCNA, yes, unfortunately, this is something 0:02:25.580000 --> 0:02:29.260000 you're going to want to memorize all these administrative distance values 0:02:29.260000 --> 0:02:30.840000 that you can see right here. 0:02:30.840000 --> 0:02:33.500000 So let's look at it. 0:02:33.500000 --> 0:02:38.660000 So if the router has a routing table and it got there because he's sitting 0:02:38.660000 --> 0:02:42.320000 on that interface, he is a host in that network. 0:02:42.320000 --> 0:02:44.020000 He is directly connected to it. 0:02:44.020000 --> 0:02:45.960000 You can't get any better than that. 0:02:45.960000 --> 0:02:50.700000 If I'm sitting in a room, if I'm sitting in the kitchen, and all of a 0:02:50.700000 --> 0:02:54.140000 sudden somebody shouts in through the door, hey, Keith, if you follow 0:02:54.140000 --> 0:02:56.360000 me, I can tell you how to get to the kitchen. 0:02:56.360000 --> 0:02:57.700000 I'm not going to listen to him. 0:02:57.700000 --> 0:02:59.400000 I live here. I am in the kitchen. 0:02:59.400000 --> 0:03:00.640000 I'm directly connected to it. 0:03:00.640000 --> 0:03:01.520000 Nothing beats that. 0:03:01.520000 --> 0:03:04.720000 So that's why I directly connected route has an administrative distance 0:03:04.720000 --> 0:03:08.640000 value of zero, the lowest best number you can get. 0:03:08.640000 --> 0:03:10.180000 And that you cannot change. 0:03:10.180000 --> 0:03:12.500000 You can never change that behavior. 0:03:12.500000 --> 0:03:18.200000 So if I try typing in a static route for something he's connected to, 0:03:18.200000 --> 0:03:21.580000 the static route won't even show up in my routing table because his connected 0:03:21.580000 --> 0:03:23.340000 route beats everything. 0:03:23.340000 --> 0:03:26.700000 Now, let's say he's not connected to something. 0:03:26.700000 --> 0:03:32.320000 If I statically give him a static route, the IP route command, that is 0:03:32.320000 --> 0:03:36.100000 going to beat out any of these routing protocols. 0:03:36.100000 --> 0:03:39.960000 Static routes have an administrative distance of one which is lower than 0:03:39.960000 --> 0:03:42.380000 any of the routing protocols. 0:03:42.380000 --> 0:03:49.440000 Now everything from here to here, everything in this box is changeable. 0:03:49.440000 --> 0:03:54.000000 So there are commands you can use to actually make a static route less 0:03:54.000000 --> 0:03:58.300000 preferable. You could say, well, I actually want RIP to be preferred over 0:03:58.300000 --> 0:04:04.840000 static routes. Or I want ISIS to be more preferred than EIGRP. 0:04:04.840000 --> 0:04:08.560000 You can do that by modifying these administrative distance values. 0:04:08.560000 --> 0:04:12.840000 Now, at the CCNA level, they do not expect you to know how to do that. 0:04:12.840000 --> 0:04:15.700000 The only administrative distance value that you're expected to know how 0:04:15.700000 --> 0:04:20.320000 to change at the CCNA level is the administrative distance value for a 0:04:20.320000 --> 0:04:22.420000 static route. And that's real easy. 0:04:22.420000 --> 0:04:24.960000 You just configure your IP route statement. 0:04:24.960000 --> 0:04:27.620000 However, it's going to be IP route. 0:04:27.620000 --> 0:04:30.800000 And you give it whatever your route's going to be. 0:04:30.800000 --> 0:04:34.420000 And then you give it your mask. 0:04:34.420000 --> 0:04:39.060000 And then you give the next top address, whatever that is. 0:04:39.060000 --> 0:04:45.700000 And then the very last thing you type in is a number, administrative distance 0:04:45.700000 --> 0:04:50.940000 value. For example, I could type in the number 100. 0:04:50.940000 --> 0:04:55.660000 And by typing in the number 100, that means this particular static route 0:04:55.660000 --> 0:04:58.880000 no longer has administrative distance of 1. 0:04:58.880000 --> 0:05:02.280000 It now has an administrative distance of 100. 0:05:02.280000 --> 0:05:07.040000 Which means if I learn of that same route as an EIGRP internal route, 0:05:07.040000 --> 0:05:10.100000 the EIGRP internal route will win. 0:05:10.100000 --> 0:05:13.140000 That will be the one that gets into the routing table because it is better 0:05:13.140000 --> 0:05:17.020000 than administrative distance of 100. 0:05:17.020000 --> 0:05:20.940000 These other ones here you also can change, but that is at the CCNP level 0:05:20.940000 --> 0:05:24.020000 where you learn how to change those values. 0:05:24.020000 --> 0:05:31.500000 So if I learn of a route and it's a route I already knew in my routing 0:05:31.500000 --> 0:05:36.100000 table and the method was different. 0:05:36.100000 --> 0:05:39.680000 I learned about it via OSPF, but now here it comes in via RIP. 0:05:39.680000 --> 0:05:43.440000 Okay. Compare the administrative distance values between OSPF and RIP, 0:05:43.440000 --> 0:05:44.720000 which one's better. 0:05:44.720000 --> 0:05:50.180000 Oh, I learned about it via BGP, but it comes in via OSPF. 0:05:50.180000 --> 0:05:51.420000 Which one is better? 0:05:51.420000 --> 0:05:54.340000 So that's how you answer that question, Ministry of Distance. 0:05:54.340000 --> 0:05:59.900000 But what if the way that you learned it is the same, right? 0:05:59.900000 --> 0:06:03.440000 What if I learned about a network and I say, okay, it came in via EIGRP, 0:06:03.440000 --> 0:06:06.460000 but I already had it via EIGRP. 0:06:06.460000 --> 0:06:08.940000 I already knew about it via EIGRP. 0:06:08.940000 --> 0:06:11.760000 Then a Ministry of Distance is not going to be able to help you because 0:06:11.760000 --> 0:06:14.840000 the methods are exactly identical. 0:06:14.840000 --> 0:06:18.360000 So in order now to figure out which is the best route, now we look at 0:06:18.360000 --> 0:06:23.280000 something called the routing metric, which is used for the best path selection 0:06:23.280000 --> 0:06:34.860000 process. So all of your, with static routes there is no routing metric. 0:06:34.860000 --> 0:06:40.460000 So in other words, if I, I could create seven static routes to the same 0:06:40.460000 --> 0:06:46.540000 destination prefix, IP route 9.9 blah, blah, blah, blah, IP route 9.9, 0:06:46.540000 --> 0:06:49.280000 blah, blah, blah, blah, IP route 9.9, I could keep doing that. 0:06:49.280000 --> 0:06:50.820000 They would all be seen as the same. 0:06:50.820000 --> 0:06:54.540000 So all of those static routes would be put into my routing table. 0:06:54.540000 --> 0:06:57.380000 And my router could now load balance between those different next hops 0:06:57.380000 --> 0:07:00.080000 to get to the 9.9 network. 0:07:00.080000 --> 0:07:05.340000 All of your routing protocols though, when I'm a router and your router, 0:07:05.340000 --> 0:07:08.220000 my favorite terminology, I'm a router, your router. 0:07:08.220000 --> 0:07:11.720000 And we're speaking a routing protocol to each other. 0:07:11.720000 --> 0:07:15.600000 When I send you a prefix, when I send you a network, in addition to sending 0:07:15.600000 --> 0:07:19.220000 you the network, the subnet mask and saying, hey, you can use me, I'm 0:07:19.220000 --> 0:07:21.660000 your next hop, let me give you my IP address. 0:07:21.660000 --> 0:07:26.200000 In addition to that, I give you a value, a descriptive characteristic 0:07:26.200000 --> 0:07:30.860000 of that route that gives you some indications far as what it takes me 0:07:30.860000 --> 0:07:33.340000 to get there, what it costs me to get there. 0:07:33.340000 --> 0:07:37.040000 That is called the metric, the routing metric. 0:07:37.040000 --> 0:07:42.700000 And different routing protocols describe a routing metric in different 0:07:42.700000 --> 0:07:47.500000 ways. Whatever the way it is, it's going to be a number. 0:07:47.500000 --> 0:07:50.620000 It's a numerical number and lower is preferred. 0:07:50.620000 --> 0:07:52.900000 Just like with administrative distance, lower was preferred. 0:07:52.900000 --> 0:07:56.940000 If I learn about the route via the same method, let's say they're both 0:07:56.940000 --> 0:08:00.080000 learned via RIP or they're both learned via OSPF. 0:08:00.080000 --> 0:08:03.680000 I'm going to say, okay, what is the metric that OSPF uses? 0:08:03.680000 --> 0:08:06.380000 Which one has the lower OSPF metric? 0:08:06.380000 --> 0:08:08.220000 What's the metric that RIP uses? 0:08:08.220000 --> 0:08:11.720000 Which one has the lower RIP metric? 0:08:11.720000 --> 0:08:16.480000 And depending on the routing protocol we're talking about, depends on 0:08:16.480000 --> 0:08:17.740000 the different metric. 0:08:17.740000 --> 0:08:21.840000 So this is also something you definitely need to know for the CCNA exam. 0:08:21.840000 --> 0:08:26.380000 What the metrics are called and how they're derived for the different 0:08:26.380000 --> 0:08:27.780000 routing protocols. 0:08:27.780000 --> 0:08:30.740000 For example, let's just take the easiest one, RIP. 0:08:30.740000 --> 0:08:33.400000 The metric of RIP is Hopcount. 0:08:33.400000 --> 0:08:35.780000 In other words, when I send you, let's say you and I are both speaking 0:08:35.780000 --> 0:08:40.020000 RIP and I send you a RIP update, I send you a RIP message that says, hey, 0:08:40.020000 --> 0:08:44.800000 I'm your neighbor and you can get to the 70 network through me. 0:08:44.800000 --> 0:08:46.980000 And the Hopcount is four. 0:08:46.980000 --> 0:08:50.480000 What that means to you is you know that to get to the 70 network you have 0:08:50.480000 --> 0:08:53.160000 to hop through four routers. 0:08:53.160000 --> 0:08:55.720000 That when you're going to send a packet to the 70 network, if you use 0:08:55.720000 --> 0:08:59.480000 me, if you select my path as the best path, you'll be hopping through 0:08:59.480000 --> 0:09:01.760000 four routers to get there. 0:09:01.760000 --> 0:09:04.860000 Whereas if another RIP router says, hey, I can also get you to the 70 0:09:04.860000 --> 0:09:09.380000 network with a Hopcount of two, well, now you're going to choose him because 0:09:09.380000 --> 0:09:12.480000 lower is better, right? 0:09:12.480000 --> 0:09:16.600000 Two hops is closer to you than four hops. 0:09:16.600000 --> 0:09:19.240000 So the metric RIP uses is Hopcount. 0:09:19.240000 --> 0:09:21.760000 OSPF uses something called bandwidth. 0:09:21.760000 --> 0:09:25.860000 OSPF says, okay, what is the bandwidth of the path? 0:09:25.860000 --> 0:09:30.380000 Let me put that bandwidth into a formula and I'll come up with a metric 0:09:30.380000 --> 0:09:33.520000 called cost. I should actually put that in here. 0:09:33.520000 --> 0:09:42.160000 The actual technical term is called a cost, which is based on bandwidth. 0:09:42.160000 --> 0:09:47.300000 So when I send you an OSPF link state advertisement that has a route inside 0:09:47.300000 --> 0:09:51.660000 of it, I'll say, and by the way, the cost is, let's say one. 0:09:51.660000 --> 0:09:55.420000 Well, as it turns out, if I have a fast ethernet interface, 100 million 0:09:55.420000 --> 0:09:59.240000 bits per second, that's the bandwidth, 100 million bits per second. 0:09:59.240000 --> 0:10:02.480000 Well, if I take that 100 million bits per second, plug it into the formula 0:10:02.480000 --> 0:10:08.020000 that OSPF uses, it will come up with a cost of one. 0:10:08.020000 --> 0:10:11.240000 If somebody else says, hey, I can get you also the 70 network with an 0:10:11.240000 --> 0:10:15.720000 OSPF cost of five, lower is better, you'll prefer me. 0:10:15.720000 --> 0:10:20.000000 An OSPF cost of one is better than OSPF cost of five. 0:10:20.000000 --> 0:10:25.380000 Now, you can start to see how if I sent you the 70 network via OSPF with 0:10:25.380000 --> 0:10:31.560000 a cost of one, and he sent you the 70 network with a RIP, Hopcount of 0:10:31.560000 --> 0:10:34.160000 one, you couldn't compare those metrics. 0:10:34.160000 --> 0:10:36.380000 It's like comparing apples to oranges. 0:10:36.380000 --> 0:10:39.120000 You can't compare a cost against Hopcount. 0:10:39.120000 --> 0:10:41.100000 That's why we have administrative distance. 0:10:41.100000 --> 0:10:44.340000 When the protocols are different, we use administrative distance. 0:10:44.340000 --> 0:10:48.840000 When the protocols are the same, we use the metric that protocol uses 0:10:48.840000 --> 0:10:51.200000 to figure out the best one. 0:10:51.200000 --> 0:10:53.860000 And the EIRP metric is fairly complex. 0:10:53.860000 --> 0:10:57.900000 It actually computes a lot of different factors into its formula when 0:10:57.900000 --> 0:10:59.740000 it comes up with its metric. 0:10:59.740000 --> 0:11:04.940000 And its metric is called distance. 0:11:04.940000 --> 0:11:12.700000 OSPF metric is called distance. 0:11:12.700000 --> 0:11:18.100000 So that concludes this video on figuring out the best route. 0:11:18.100000 --> 0:11:22.480000 In the next video, we're going to start our section on comparing and contrasting 0:11:22.480000 --> 0:11:26.160000 routing protocols from a high level to see what makes them different from