WEBVTT 0:00:03.180000 --> 0:00:07.120000 Hello and welcome this video titled routing IP packets. 0:00:07.120000 --> 0:00:11.400000 We're going to do a review of what is the process of routing, what happens 0:00:11.400000 --> 0:00:16.020000 during routing and how do routers find the best route to a destination 0:00:16.020000 --> 0:00:19.780000 if they know of more than one route to a destination. 0:00:19.780000 --> 0:00:20.900000 So what is routing? 0:00:20.900000 --> 0:00:25.380000 Well, the process of routing is really forwarding packets, a device that 0:00:25.380000 --> 0:00:29.580000 has at least two knit cards, at least two interfaces that receives a packet 0:00:29.580000 --> 0:00:34.480000 on one knit card that belongs to one network, one IP network and forwards 0:00:34.480000 --> 0:00:39.700000 it out another knit card because it's destined to a different IP network. 0:00:39.700000 --> 0:00:42.480000 Where the source and destination networks in the IP packet are different 0:00:42.480000 --> 0:00:46.200000 and the router knows how to get the packet to where it's going. 0:00:46.200000 --> 0:00:49.220000 So in order to do routing, a router needs some basic things. 0:00:49.220000 --> 0:00:52.640000 The data that comes in needs to be routable. 0:00:52.640000 --> 0:00:56.560000 It has to contain a layer three header like an IP before, IPV6 header 0:00:56.560000 --> 0:00:59.940000 that has source and destination IP addresses in it. 0:00:59.940000 --> 0:01:05.080000 The router itself has to have a routing table that contains routes that 0:01:05.080000 --> 0:01:09.700000 contains network addresses, subnet masks and next hops as well as metrics 0:01:09.700000 --> 0:01:11.400000 that go along with those. 0:01:11.400000 --> 0:01:15.280000 If all of that is true, the router can do routing. 0:01:15.280000 --> 0:01:16.860000 So some general rules of routing. 0:01:16.860000 --> 0:01:20.740000 Number one, routers will only use routes with reachable next hops. 0:01:20.740000 --> 0:01:26.480000 In the case of your interior gateway protocols like RIP, OSPF and EIGRP, 0:01:26.480000 --> 0:01:28.280000 that's not going to be a problem. 0:01:28.280000 --> 0:01:34.140000 Only when you're talking about using BGP might that be a significant issue. 0:01:34.140000 --> 0:01:36.460000 ROUDERS will only use the best routes. 0:01:36.460000 --> 0:01:40.280000 This comes into play if a router learns of a remote network like maybe 0:01:40.280000 --> 0:01:44.800000 a router learns of the 10.10.10.0 network, but he learns about it via 0:01:44.800000 --> 0:01:48.380000 two paths. He says, according to my routing table, I could go that way 0:01:48.380000 --> 0:01:49.700000 or I could go that way. 0:01:49.700000 --> 0:01:53.040000 In that case, the router is going to try to figure out which of these 0:01:53.040000 --> 0:01:57.300000 routes is the best and only the best one will actually be installed into 0:01:57.300000 --> 0:01:59.060000 the IP routing table. 0:01:59.060000 --> 0:02:02.340000 Routes must be believable. 0:02:02.340000 --> 0:02:06.620000 In other words, if you and I are running a routing protocol, take your 0:02:06.620000 --> 0:02:08.380000 pick of whichever one it is. 0:02:08.380000 --> 0:02:12.380000 If I send you a route saying, hey, neighbor, you can get to the 50 network 0:02:12.380000 --> 0:02:18.240000 through me. Well, that's great, but if an hour passes, if a day passes, 0:02:18.240000 --> 0:02:22.860000 if a week passes and you never hear about that route from me again, how 0:02:22.860000 --> 0:02:24.400000 do you know it's still believable? 0:02:24.400000 --> 0:02:27.840000 How do you know you can still use me to get to that network? 0:02:27.840000 --> 0:02:31.220000 So every routing protocol has a different way of answering that question, 0:02:31.220000 --> 0:02:34.360000 but ultimately it does have to be answered. 0:02:34.360000 --> 0:02:39.460000 And routers will only accept routes that match their own active protocols. 0:02:39.460000 --> 0:02:45.000000 So for example, if you and I on this particular wire that we share are 0:02:45.000000 --> 0:02:49.560000 doing IPV4, I've got an IPV4 address, you have an IPV4 address. 0:02:49.560000 --> 0:02:55.440000 If I enable RIP on my side and you enable RIP on your side, every 30 seconds, 0:02:55.440000 --> 0:02:59.400000 I'm going to send you my routes, my IPV4 routes via RIP. 0:02:59.400000 --> 0:03:01.040000 Everything's well and good. 0:03:01.040000 --> 0:03:05.900000 Now, what if on this cable, I also have an IPV6 address? 0:03:05.900000 --> 0:03:08.280000 You don't, but I do. 0:03:08.280000 --> 0:03:10.700000 And I've enabled RIP for IPV6. 0:03:10.700000 --> 0:03:11.520000 Well, guess what? 0:03:11.520000 --> 0:03:14.900000 Every 30 seconds, I'm going to send you IPV6 RIP routes. 0:03:14.900000 --> 0:03:19.160000 But in that case, those routes won't do you any good because you don't 0:03:19.160000 --> 0:03:22.860000 speak IPV6. You don't have IPV6 on this interface. 0:03:22.860000 --> 0:03:25.180000 Those routes are completely meaningless to you. 0:03:25.180000 --> 0:03:27.420000 That's what that last point is talking about. 0:03:27.420000 --> 0:03:31.480000 Now, the general way that routes get into the routing table is one of 0:03:31.480000 --> 0:03:33.000000 three ways connected. 0:03:33.000000 --> 0:03:38.480000 So any time you configure either an IPV4 or an IPV6 address and subnet 0:03:38.480000 --> 0:03:43.040000 mask on an interface, whether it be a physical interface like gig 01, 0:03:43.040000 --> 0:03:51.720000 a sub interface like gig 01.1, a logical interface like interface VLAN 0:03:51.720000 --> 0:03:55.840000 one or something, any interface that can hold an IP address, the moment 0:03:55.840000 --> 0:04:00.820000 you put that IP address on there and the interface comes up, it creates 0:04:00.820000 --> 0:04:03.580000 a connected route in the IP routing table. 0:04:03.580000 --> 0:04:07.820000 You can also statically program a route into the routing table with static 0:04:07.820000 --> 0:04:11.000000 routes. And we'll get around to doing a refresher on how to do that. 0:04:11.000000 --> 0:04:15.220000 And certainly, you can have dynamic routing protocols exchanging routes 0:04:15.220000 --> 0:04:16.520000 among each other. 0:04:16.520000 --> 0:04:21.600000 And so your routing table can be populated that way. 0:04:21.600000 --> 0:04:25.340000 All right, so like I mentioned, when two or more routes are learned to 0:04:25.340000 --> 0:04:29.100000 the same network, a router will attempt to identify which is best for 0:04:29.100000 --> 0:04:31.840000 installation into the IP routing table. 0:04:31.840000 --> 0:04:36.260000 And there's basically two ways it will do that. 0:04:36.260000 --> 0:04:40.560000 Two factors, number one, it will check the administrative distance of 0:04:40.560000 --> 0:04:44.680000 both of those routes to see if they're different or if they're the same. 0:04:44.680000 --> 0:04:48.640000 If the administrative distance is different, so if I learn about the 1010 0:04:48.640000 --> 0:04:52.300000 network that way, and I also learned about the 1010 network going that 0:04:52.300000 --> 0:04:57.120000 way, if the methods that I learned them by, if the protocols that gave 0:04:57.120000 --> 0:05:01.620000 me those routes have different administrative distances, now I can compare 0:05:01.620000 --> 0:05:04.500000 the administrative distance values and select one as being better than 0:05:04.500000 --> 0:05:07.620000 the other. And we're going to look at that in about two seconds. 0:05:07.620000 --> 0:05:11.280000 If the administrative distance values are the same, then I look at the 0:05:11.280000 --> 0:05:15.300000 routing metric, and the routing metric will help me decide which is best. 0:05:15.300000 --> 0:05:17.880000 So as a refresher, what is administrative distance? 0:05:17.880000 --> 0:05:25.040000 Every possible way that a router or a switch, any Cisco iOS device that 0:05:25.040000 --> 0:05:30.080000 can do routing. Any possible way it can learn of a route, whether it be 0:05:30.080000 --> 0:05:33.640000 connected route, static routes, or some sort of dynamic route, all those 0:05:33.640000 --> 0:05:37.280000 particular methods have administrative distance values. 0:05:37.280000 --> 0:05:41.620000 They are numerical values between the ranges of zero and 255. 0:05:41.620000 --> 0:05:46.060000 The lower the administrative distance, the better or more preferable that 0:05:46.060000 --> 0:05:48.600000 particular way is. 0:05:48.600000 --> 0:05:51.800000 So here are the general administrative distance values that you will want 0:05:51.800000 --> 0:05:55.100000 to memorize. You can see nothing beats a connected route. 0:05:55.100000 --> 0:05:58.340000 If I'm sitting on this network because I have a wire connected to it, 0:05:58.340000 --> 0:06:02.320000 and all of a sudden somebody advertises that exact same network to me, 0:06:02.320000 --> 0:06:04.920000 they're not going to beat the route I have that's connected. 0:06:04.920000 --> 0:06:07.000000 That has administrative distance of zero. 0:06:07.000000 --> 0:06:08.660000 That one you cannot change. 0:06:08.660000 --> 0:06:13.220000 There's no configuration commands to make that less preferable. 0:06:13.220000 --> 0:06:17.040000 Static routes on up, all of those are configurable, but these are the 0:06:17.040000 --> 0:06:19.460000 default values that you see right here. 0:06:19.460000 --> 0:06:25.180000 Now, let's say I learned about a route to the 1010 network via this interface, 0:06:25.180000 --> 0:06:29.500000 and a route to the 1010 network via this other interface, and they both 0:06:29.500000 --> 0:06:31.840000 have the exact same administrative distance. 0:06:31.840000 --> 0:06:37.340000 Maybe I learned about both of them via RIP or both of them via OSPF. 0:06:37.340000 --> 0:06:39.840000 Well, if the administrative distance value is the same and I can't use 0:06:39.840000 --> 0:06:44.620000 that, then I'm going to look at the routing metric. 0:06:44.620000 --> 0:06:50.180000 And interior gateway routing protocols like RIP, OSPF, EIGRP, even ISIS 0:06:50.180000 --> 0:06:55.160000 use metrics. And the lower the metric, the better route happens to be. 0:06:55.160000 --> 0:06:57.140000 Lower is preferred. 0:06:57.140000 --> 0:07:01.240000 So the main ones you need to know about are what you see right here. 0:07:01.240000 --> 0:07:03.480000 EIGRP uses a composite metric. 0:07:03.480000 --> 0:07:06.780000 It actually is probably the most complicated of the metric values of the 0:07:06.780000 --> 0:07:07.960000 routing protocols. 0:07:07.960000 --> 0:07:11.860000 It factors in about four or five different things to spit out this one 0:07:11.860000 --> 0:07:14.860000 big number, which we call distance. 0:07:14.860000 --> 0:07:18.440000 So the metric the EIGRP uses, the technical term for its metric is called 0:07:18.440000 --> 0:07:24.220000 distance, but several things factor into the formula to make distance. 0:07:24.220000 --> 0:07:26.220000 RIP metric is hop count. 0:07:26.220000 --> 0:07:29.540000 How many routers do you have to hop through to get to that remote destination? 0:07:29.540000 --> 0:07:31.140000 Very simple with RIP. 0:07:31.140000 --> 0:07:36.480000 OSPF's metric is link bandwidth, which we call cost, very similar to spanning 0:07:36.480000 --> 0:07:40.820000 tree. Just like in spanning tree, how the faster an interface is, the 0:07:40.820000 --> 0:07:44.720000 lower the spanning tree cost will be, the more preferable it will be. 0:07:44.720000 --> 0:07:46.560000 Exactly the same thing with OSPF. 0:07:46.560000 --> 0:07:50.380000 No different. It's just that OSPF uses a different formula, but the same 0:07:50.380000 --> 0:07:54.180000 holds true. The faster the bandwidth of an interface, the lower the OSPF 0:07:54.180000 --> 0:07:57.620000 cost will be, which is the metric that OSPF uses. 0:07:57.620000 --> 0:08:03.800000 Now more than one routing entry may match the destination address of a 0:08:03.800000 --> 0:08:06.460000 packet, longest match wins. 0:08:06.460000 --> 0:08:07.540000 What's that referring to? 0:08:07.540000 --> 0:08:11.880000 So now we're not talking anymore about, oh, I've learned about the exact 0:08:11.880000 --> 0:08:15.700000 same prefix, the exact same network from two or three different sources. 0:08:15.700000 --> 0:08:16.960000 That's not what we're looking at. 0:08:16.960000 --> 0:08:22.380000 Now we're looking at something like this, where here's my routing table. 0:08:22.380000 --> 0:08:33.140000 And maybe I have a connected route on interface that is 10.0.0.0.8 via 0:08:33.140000 --> 0:08:37.260000 fast Ethernet 0.1. 0:08:37.260000 --> 0:08:47.880000 Then I learned via RIP about the 10.0 .0.0.16 via the router that advertised 0:08:47.880000 --> 0:08:50.900000 that to me was the 1111 router. 0:08:50.900000 --> 0:08:52.780000 Here's my RIP neighbor. 0:08:52.780000 --> 0:08:58.580000 And I also learned via EIGRP, the 101010 network. 0:08:58.580000 --> 0:09:05.300000 And that's via my EIGRP neighbor of 2222. 0:09:05.300000 --> 0:09:08.000000 Okay, now these routes are different, right? 0:09:08.000000 --> 0:09:08.760000 They're not all the same. 0:09:08.760000 --> 0:09:11.220000 They have different masks in them. 0:09:11.220000 --> 0:09:14.620000 So now here comes in a bunch of packets. 0:09:14.620000 --> 0:09:19.260000 And these packets are all going to 10.10.0. 0:09:19.260000 --> 0:09:25.300000 Let's say 20.1. That's their destination. 0:09:25.300000 --> 0:09:29.540000 All right, of my routes in my routing table, well, this one here is a 0:09:29.540000 --> 0:09:34.260000 match, because this one says, hey, you can match me if the first octet 0:09:34.260000 --> 0:09:36.100000 in your destination is 10. 0:09:36.100000 --> 0:09:38.320000 Yep, that matches these packets. 0:09:38.320000 --> 0:09:39.780000 Oh, but hold on a second. 0:09:39.780000 --> 0:09:43.920000 My RIP route is also a match because according to its subnet mask, it 0:09:43.920000 --> 0:09:48.600000 says, hey, if the first two octets match 10.10, that's a match. 0:09:48.600000 --> 0:09:50.100000 Well, that also matches this. 0:09:50.100000 --> 0:09:53.000000 My third route, it does not match, right? 0:09:53.000000 --> 0:09:57.580000 This one says, if the first three octets are 10.10.10, that does not match 0:09:57.580000 --> 0:10:01.060000 this packet. So that third route will not be considered, but the first 0:10:01.060000 --> 0:10:04.760000 two will. Well, the rules of routing say, hey, if you've got two routes 0:10:04.760000 --> 0:10:08.540000 that could match, the longest one matches. 0:10:08.540000 --> 0:10:11.380000 So this one has a 16-bit match. 0:10:11.380000 --> 0:10:13.580000 This only has an 8-bit match. 0:10:13.580000 --> 0:10:17.480000 So we're going to route those packets via the RIP route to our neighbor 0:10:17.480000 --> 0:10:29.820000 at 1111. As a quick review, routing protocols, a lot of them have this 0:10:29.820000 --> 0:10:31.600000 concept of autonomous system. 0:10:31.600000 --> 0:10:36.560000 An autonomous system is a collection of networks all managed by one administrative 0:10:36.560000 --> 0:10:40.220000 authority. So that collection of networks gives no indication as to its 0:10:40.220000 --> 0:10:44.420000 size. So as I've mentioned in some other videos, if you have a network 0:10:44.420000 --> 0:10:49.100000 at home consisting of a cable modem or DSL modem, and you've got a couple 0:10:49.100000 --> 0:10:53.260000 laptops and a printer there and maybe a TV that's connected via Wi-Fi, 0:10:53.260000 --> 0:10:55.520000 that's all under your control. 0:10:55.520000 --> 0:10:57.140000 You control your home network. 0:10:57.140000 --> 0:10:59.900000 So technically, that's an autonomous system. 0:10:59.900000 --> 0:11:02.460000 But usually when we use this term autonomous system, we're talking about 0:11:02.460000 --> 0:11:08.000000 really large networks that have like a central IT staff that manages what 0:11:08.000000 --> 0:11:08.960000 that network is doing. 0:11:08.960000 --> 0:11:11.660000 And that's what we refer to as an autonomous system. 0:11:11.660000 --> 0:11:16.640000 Some routing protocols are designed to operate purely within an autonomous 0:11:16.640000 --> 0:11:20.580000 system. So let's think about autonomous system as being like a company's 0:11:20.580000 --> 0:11:24.840000 network. So let's think of a large company that has like 20 buildings, 0:11:24.840000 --> 0:11:28.260000 hundreds of routes, hundreds of routers and switches. 0:11:28.260000 --> 0:11:32.520000 That one big network in those 20 buildings is considered an autonomous 0:11:32.520000 --> 0:11:36.480000 system. Well, there's some routing protocols that were designed to operate 0:11:36.480000 --> 0:11:40.320000 within that space, within the autonomous system. 0:11:40.320000 --> 0:11:43.240000 And those are called interior gateway protocols. 0:11:43.240000 --> 0:11:47.360000 Vast majority of your routing protocols fall into that category. 0:11:47.360000 --> 0:11:53.780000 RIP, EIGRP, OSPF, even ISIS, they are all examples of interior gateway 0:11:53.780000 --> 0:11:59.640000 protocols. Sometimes a router will sit on the edge of an autonomous system 0:11:59.640000 --> 0:12:03.880000 and it will speak to another router who's on the edge of a different autonomous 0:12:03.880000 --> 0:12:07.560000 system. And those routers will need to exchange routes between them. 0:12:07.560000 --> 0:12:11.040000 So we'll have one autonomous system exchanging routes into another autonomous 0:12:11.040000 --> 0:12:16.160000 system. Those types of routing protocols are called exterior gateway protocols. 0:12:16.160000 --> 0:12:21.000000 And as of right now and for the last 30 years, there's only been one routing 0:12:21.000000 --> 0:12:23.160000 protocol that fell into that category. 0:12:23.160000 --> 0:12:26.360000 That was BGP, the border gateway protocol. 0:12:26.360000 --> 0:12:30.100000 That's the only one that is an exterior gateway protocol. 0:12:30.100000 --> 0:12:36.220000 So that pretty much concludes this refresher on an introduction to IP 0:12:36.220000 --> 0:12:37.800000 routing. And its concepts.