WEBVTT 0:00:02.820000 --> 0:00:07.220000 Hello and welcome to this video on root port election. 0:00:07.220000 --> 0:00:11.320000 In this video I'm going to cover the actual election process, the logic 0:00:11.320000 --> 0:00:14.860000 behind how rapid spanning tree elects a root port. 0:00:14.860000 --> 0:00:17.880000 We're going to talk about something called cost values which are very 0:00:17.880000 --> 0:00:21.700000 critical for spanning tree in order to build its tree. 0:00:21.700000 --> 0:00:26.420000 And we're going to look at given a particular topology, how would we predict 0:00:26.420000 --> 0:00:32.140000 what port or become root ports. 0:00:32.140000 --> 0:00:34.600000 So let's start with the root port. 0:00:34.600000 --> 0:00:36.380000 What is a root port? 0:00:36.380000 --> 0:00:40.000000 So if you've watched any of my other videos or you've studied rapid spanning 0:00:40.000000 --> 0:00:44.440000 tree in a book or through some other author, you know that the very first 0:00:44.440000 --> 0:00:48.200000 thing that happens is that a root bridge is elected in the topology. 0:00:48.200000 --> 0:00:51.160000 Everything has to know who the root bridge is. 0:00:51.160000 --> 0:00:54.840000 Once the root bridge is elected, he continues to send out bridge protocol 0:00:54.840000 --> 0:00:58.940000 data units, BP DUs, so everybody knows that he's still alive. 0:00:58.940000 --> 0:01:03.540000 Now at that point, all of his interfaces become designated ports. 0:01:03.540000 --> 0:01:05.560000 Designated ports deliver. 0:01:05.560000 --> 0:01:06.480000 What do they deliver? 0:01:06.480000 --> 0:01:08.940000 They deliver BP DUs. 0:01:08.940000 --> 0:01:12.520000 So the root bridge, his job is pretty much done at that point. 0:01:12.520000 --> 0:01:15.940000 All the other switches, however, who lost, who are not the root bridge, 0:01:15.940000 --> 0:01:18.500000 they have a little bit more work to do to figure out what the tree is 0:01:18.500000 --> 0:01:20.580000 ultimately going to look like. 0:01:20.580000 --> 0:01:25.600000 So all non-root switches, the next thing they have to do is elect an interface 0:01:25.600000 --> 0:01:30.120000 on themselves, a local interface called a root port. 0:01:30.120000 --> 0:01:31.540000 Now what is a root port? 0:01:31.540000 --> 0:01:35.520000 Well if I'm a switch and I've got lots of interfaces which are connecting 0:01:35.520000 --> 0:01:40.060000 into the network infrastructure and the root bridge is out there somewhere, 0:01:40.060000 --> 0:01:43.720000 there's a very good chance that I'm receiving BPUs from him on this interface 0:01:43.720000 --> 0:01:46.400000 and this interface and this other interface right here. 0:01:46.400000 --> 0:01:50.900000 So I might say hey, clearly there's a lot of ways, a lot of paths for 0:01:50.900000 --> 0:01:53.240000 me to take to get to that root bridge. 0:01:53.240000 --> 0:01:57.140000 So the first thing I have to figure out is which is the best path? 0:01:57.140000 --> 0:02:01.640000 Which path will get me back to that root bridge the fastest, the quickest? 0:02:01.640000 --> 0:02:06.020000 Whatever interface I have that leads me to that path, that is my root 0:02:06.020000 --> 0:02:09.860000 port. So it's an upstream interface, if we think of the root bridge as 0:02:09.860000 --> 0:02:12.760000 being up there and everybody being down from him, so think of a tree being 0:02:12.760000 --> 0:02:15.900000 flipped upside down with the roots here and everything hanging down from 0:02:15.900000 --> 0:02:21.140000 it, then it's the upstream port leading towards the root bridge. 0:02:21.140000 --> 0:02:25.760000 And it's selected based on lowest root path cost. 0:02:25.760000 --> 0:02:27.900000 So we'll talk about that in just one second. 0:02:27.900000 --> 0:02:31.380000 So it's not based on hop count, how many hops of bridges do I have to 0:02:31.380000 --> 0:02:33.360000 get through? Nope, we don't care about that. 0:02:33.360000 --> 0:02:38.220000 It's not based on like time, like okay it's 0.5 microseconds and 0.2 microseconds 0:02:38.220000 --> 0:02:41.200000 that way, it's not based on that at all, it's based on a factor called 0:02:41.200000 --> 0:02:47.100000 cost. And each switch, not the root bridge, the root bridge does not have 0:02:47.100000 --> 0:02:50.940000 any root ports. He doesn't need any ports leading back to himself, unless 0:02:50.940000 --> 0:02:53.000000 he's psychotic or something like that. 0:02:53.000000 --> 0:02:55.680000 All of his ports are going to be designated ports. 0:02:55.680000 --> 0:02:59.080000 So we're talking about every switch except for the root bridge is going 0:02:59.080000 --> 0:03:03.520000 to have a single root port pointing back to that root bridge. 0:03:03.520000 --> 0:03:08.480000 All right, so the cost is based on the cumulative cost of all the links 0:03:08.480000 --> 0:03:10.340000 to get to the root. 0:03:10.340000 --> 0:03:13.000000 So let me just draw something here real quick just to demonstrate this 0:03:13.000000 --> 0:03:19.840000 idea. If this is my root bridge right here and let's say we have something 0:03:19.840000 --> 0:03:27.080000 like this, okay, and here we're on bridge X or switch X, I just use the 0:03:27.080000 --> 0:03:32.720000 words bridge and switch interchangeably here, okay, and we have A, B and 0:03:32.720000 --> 0:03:37.320000 C. All right, so we know that root bridge, he's transmitting bridge protocol 0:03:37.320000 --> 0:03:45.760000 data units. And the cost is actually a field inside the BPdu, it's one 0:03:45.760000 --> 0:03:50.540000 of the fields. And the cost is when somebody transmits a BPU they're saying, 0:03:50.540000 --> 0:03:55.120000 hey, let me tell you what it costs me to get to the root bridge. 0:03:55.120000 --> 0:03:59.260000 Well, the root bridge doesn't cost him anything to get to himself. 0:03:59.260000 --> 0:04:03.380000 So his cost is always going to be zero whenever the BPU pops out of him. 0:04:03.380000 --> 0:04:08.120000 But that cost will increment, and we'll see just in a second how it increments. 0:04:08.120000 --> 0:04:13.940000 But at this point, switch X is getting BPUs on port one and port two. 0:04:13.940000 --> 0:04:18.780000 And maybe the one he's getting on port one by the time, so when A advertises 0:04:18.780000 --> 0:04:21.840000 it to him, A says, hey, my cost is 30. 0:04:21.840000 --> 0:04:26.520000 And when C advertises it, he says, hey, my cost is 20. 0:04:26.520000 --> 0:04:30.560000 Well, part of factoring this in is that bridge X will have actually a 0:04:30.560000 --> 0:04:34.620000 local cost on his own interfaces. 0:04:34.620000 --> 0:04:38.380000 Okay, so whatever that cost is, maybe the cost is 10 on both of them. 0:04:38.380000 --> 0:04:41.120000 His own interfaces have a local cost of 10. 0:04:41.120000 --> 0:04:45.320000 So when he gets in those BPUs, he's going to say, okay, well, if I go 0:04:45.320000 --> 0:04:50.620000 out interface number one, my total cumulative cost will be 40. 0:04:50.620000 --> 0:04:54.140000 My neighbor said it's 30 to get through him, but it costs me an additional 0:04:54.140000 --> 0:04:56.420000 10 to get up to that neighbor. 0:04:56.420000 --> 0:05:02.900000 So that's 40. Whereas if I go out interface number two, my total cost 0:05:02.900000 --> 0:05:08.660000 going that way is 30, my total cumulative cost. 0:05:08.660000 --> 0:05:12.220000 So in this case, bridge X will say, all right, clearly interface number 0:05:12.220000 --> 0:05:17.720000 two is better. So it says, I'm going to select that as my root port. 0:05:17.720000 --> 0:05:26.240000 That will be his root port because the total cost is the lowest. 0:05:26.240000 --> 0:05:29.040000 And cost is based on inverse bandwidth. 0:05:29.040000 --> 0:05:33.300000 In other words, the faster the bandwidth, the faster the link, the lower 0:05:33.300000 --> 0:05:37.700000 the cost. One key thing to remember about spanning tree is lower is always 0:05:37.700000 --> 0:05:41.120000 better. Whenever you're looking at two values and trying to determine 0:05:41.120000 --> 0:05:45.020000 what's going to win for whatever it is I'm doing, the lower value will 0:05:45.020000 --> 0:05:49.020000 always win. And it's not linear. 0:05:49.020000 --> 0:05:57.320000 What that means is that you might think, oh, okay, well, if I have a fast, 0:05:57.320000 --> 0:06:01.820000 ethernet interface, which is 100 million bits per second. 0:06:01.820000 --> 0:06:07.480000 And I have a gigabit interface, which is 10 times faster, right? 0:06:07.480000 --> 0:06:10.080000 It's 1 billion bits per second. 0:06:10.080000 --> 0:06:14.500000 Well, and that would mean that the cost of my fast, ethernet interface 0:06:14.500000 --> 0:06:17.440000 is different by 10 times. 0:06:17.440000 --> 0:06:18.780000 You might think this, right? 0:06:18.780000 --> 0:06:23.340000 You might think, all right, here's fast, ethernet, which is 100 million 0:06:23.340000 --> 0:06:25.140000 bits per second. 0:06:25.140000 --> 0:06:29.140000 You might think, oh, okay, if the cost of that, I'm just going to make 0:06:29.140000 --> 0:06:30.100000 up a number here. 0:06:30.100000 --> 0:06:38.940000 If the cost of that is 10, then a gigabit interface, which is 1 billion, 0:06:38.940000 --> 0:06:46.020000 1 billion bits per second, you think, all right, well, that's got to be 0:06:46.020000 --> 0:06:49.160000 1 10th, right? Because the faster the speed, the lower the cost. 0:06:49.160000 --> 0:06:51.560000 So you assume, okay, it must be linear then. 0:06:51.560000 --> 0:06:54.260000 This guy is 10 times faster. 0:06:54.260000 --> 0:06:57.280000 So the cost should be 1 10th, which is, you know, just one. 0:06:57.280000 --> 0:07:01.360000 It's not. In rapid-spain tree, the cost is not linear. 0:07:01.360000 --> 0:07:04.520000 And I'm going to show you here in just a second, a chart that shows you 0:07:04.520000 --> 0:07:11.340000 this. What if there's a tie in the cost? 0:07:11.340000 --> 0:07:15.800000 So for example, what if we have the root bridge right here? 0:07:15.800000 --> 0:07:19.760000 Here's switch A, here's switch B. 0:07:19.760000 --> 0:07:25.440000 They're both getting Bp'd use from the root bridge with a cost of zero. 0:07:25.440000 --> 0:07:30.560000 Okay, now those switches take a look at their receiving interface that 0:07:30.560000 --> 0:07:35.320000 receive the Bp'd U, which might have a local cost of 10, let's say. 0:07:35.320000 --> 0:07:42.040000 So when they go on and advertise those Bp'd use down to switch X, they're 0:07:42.040000 --> 0:07:47.120000 going to advertise a cost of 10, right? 0:07:47.120000 --> 0:07:49.440000 Because it's their cost to get to the root bridge. 0:07:49.440000 --> 0:07:52.660000 Switch A says, well, my neighbor told me it's a cost of zero to get to 0:07:52.660000 --> 0:07:56.580000 him, but to get to him, I got to get 10. 0:07:56.580000 --> 0:07:58.380000 So 10 plus zero is 10. 0:07:58.380000 --> 0:07:59.360000 So that's what they're advertising. 0:07:59.360000 --> 0:08:01.760000 Well, what switch X going to do here? 0:08:01.760000 --> 0:08:05.040000 Well, switch X is going to look at his own local interface where he received 0:08:05.040000 --> 0:08:09.720000 those Bp'd use, but what the cost on both of those is the same. 0:08:09.720000 --> 0:08:11.600000 Let's say it's five. 0:08:11.600000 --> 0:08:17.080000 Then he'll say, okay, well, if I go this way, my total cost is 15. 0:08:17.080000 --> 0:08:21.520000 And if I go this way, my total cost is 15. 0:08:21.520000 --> 0:08:22.820000 That's what they're saying right here. 0:08:22.820000 --> 0:08:28.340000 If there's a tie in the cost, then bridge X is going to go back to these 0:08:28.340000 --> 0:08:30.560000 two Bp'd use he just received. 0:08:30.560000 --> 0:08:34.420000 He's going to say, okay, is there something else I can use in these Bp'd 0:08:34.420000 --> 0:08:38.280000 use to compare them against each other that will help me determine which 0:08:38.280000 --> 0:08:40.280000 Bp'd U is better? 0:08:40.280000 --> 0:08:44.220000 And if there is, well, then that's my tiebreaker. 0:08:44.220000 --> 0:08:51.500000 In this case, the tiebreaker would be the lowest upstream bridge ID. 0:08:51.500000 --> 0:08:56.220000 So in this situation, bridge X would say, all right, if these letters 0:08:56.220000 --> 0:09:00.780000 here represent my bridge IDs, if A is a bridge ID and B, then switch X 0:09:00.780000 --> 0:09:05.780000 will say, okay, well, A is lower than B, so I'll choose this. 0:09:05.780000 --> 0:09:07.820000 This will be my root port. 0:09:07.820000 --> 0:09:12.840000 Cost is the same, but the bridge ID of my neighbor A is lower than the 0:09:12.840000 --> 0:09:15.280000 bridge ID of my neighbor B. 0:09:15.280000 --> 0:09:20.520000 But sometimes even that isn't going to work for you. 0:09:20.520000 --> 0:09:25.080000 For example, what if I have something like this? 0:09:25.080000 --> 0:09:27.080000 What if here's my root? 0:09:27.080000 --> 0:09:35.160000 Here's bridge X and he has two links to the root. 0:09:35.160000 --> 0:09:39.300000 Now we know that Bp'd use are going to be flying down those two links. 0:09:39.300000 --> 0:09:45.300000 As they come down, the initial cost is going to be zero. 0:09:45.300000 --> 0:09:49.680000 So, bridge X is going to take a look at his own local interfaces. 0:09:49.680000 --> 0:09:53.000000 You can say, okay, well, what's my cost to get back to that guy? 0:09:53.000000 --> 0:09:55.500000 All right, well, the cost of his own local interface here, let's just 0:09:55.500000 --> 0:09:57.340000 make up a number, 10. 0:09:57.340000 --> 0:09:59.500000 Maybe the cost here is also 10. 0:09:59.500000 --> 0:10:02.600000 He's going to say, all right, I have a tie here. 0:10:02.600000 --> 0:10:08.360000 Because if I go up to the left, my total cost is 10. 0:10:08.360000 --> 0:10:11.100000 If I go up to the right, my total cost is 10. 0:10:11.100000 --> 0:10:12.880000 All right, well, that's not going to help me. 0:10:12.880000 --> 0:10:15.840000 So he says, all right, well, the next thing I'm going to do is I'm going 0:10:15.840000 --> 0:10:19.340000 to look at the Bp'd use as they came down to me and I'm going to look 0:10:19.340000 --> 0:10:21.200000 at the sending bridge IDs. 0:10:21.200000 --> 0:10:22.520000 Well, guess what? 0:10:22.520000 --> 0:10:24.380000 They both have the same sending bridge ID. 0:10:24.380000 --> 0:10:28.360000 This one has a bridge ID of root because the root's the one who sent it 0:10:28.360000 --> 0:10:33.900000 to him. And this one has a sending bridge ID of root, whatever his Mac 0:10:33.900000 --> 0:10:35.420000 and priority is. 0:10:35.420000 --> 0:10:38.020000 That's not going to help bridge X. 0:10:38.020000 --> 0:10:40.240000 So what's bridge X going to do? 0:10:40.240000 --> 0:10:45.500000 Well, there is one more component to these Bp'd use he could look into 0:10:45.500000 --> 0:10:47.420000 to find a tiebreaker. 0:10:47.420000 --> 0:10:51.500000 And that is what's called the port ID. 0:10:51.500000 --> 0:11:01.880000 So on a bridge, let's say, for example, this is port 0 slash 3 and this 0:11:01.880000 --> 0:11:05.200000 is port 0 slash 8. 0:11:05.200000 --> 0:11:14.760000 These Bp's that come down just like we had a bridge ID was composed of 0:11:14.760000 --> 0:11:20.700000 two pieces. A priority and a Mac. 0:11:20.700000 --> 0:11:27.180000 Well, also in that Bp'd use, there is a port ID and I like to call it 0:11:27.180000 --> 0:11:32.800000 a sending port ID because whatever bridge is sending you the Bp'd use, 0:11:32.800000 --> 0:11:34.620000 he puts a sending port ID in there. 0:11:34.620000 --> 0:11:37.660000 And that also has a priority. 0:11:37.660000 --> 0:11:44.320000 But not a Mac. We just call this second half an ID field. 0:11:44.320000 --> 0:11:51.240000 Well, do you remember when it comes to bridge IDs, do you remember what 0:11:51.240000 --> 0:11:55.780000 the default priority value was? 0:11:55.780000 --> 0:11:57.420000 Hopefully you said yes, Keith. 0:11:57.420000 --> 0:12:02.080000 I do remember that was 32,768. 0:12:02.080000 --> 0:12:03.300000 Well, guess what? 0:12:03.300000 --> 0:12:08.880000 There's also a default port priority, which is 128. 0:12:08.880000 --> 0:12:13.500000 Yeah, I know in a lot of numbers you got to memorize here, but 128. 0:12:13.500000 --> 0:12:19.660000 So both these Bp'd use are coming down looking like this. 0:12:19.660000 --> 0:12:21.120000 This one's coming down. 0:12:21.120000 --> 0:12:23.760000 I'll just say here a port ID. 0:12:23.760000 --> 0:12:28.980000 It'll say 128. This one will also say port ID. 0:12:28.980000 --> 0:12:31.020000 128. That'll be the priority. 0:12:31.020000 --> 0:12:33.560000 And if I don't change it, they both have the same priority. 0:12:33.560000 --> 0:12:37.940000 But the one on the left will say something like 0 slash 3. 0:12:37.940000 --> 0:12:40.940000 The one on the right will say something like 0 slash 8. 0:12:40.940000 --> 0:12:44.920000 Now it won't exactly be 0 slash 3 and 0 slash 8. 0:12:44.920000 --> 0:12:50.300000 But whatever number goes in this section right here will be derived in 0:12:50.300000 --> 0:12:53.520000 some way from 0,3, and 0,8. 0:12:53.520000 --> 0:12:55.300000 You don't have to know how to predict it. 0:12:55.300000 --> 0:13:00.460000 All you have to know is if their priorities are the same, bridge X will 0:13:00.460000 --> 0:13:06.020000 prefer this as the root port right here. 0:13:06.020000 --> 0:13:10.800000 Because the Bp'd he received on that interface had a lower sending port 0:13:10.800000 --> 0:13:14.620000 ID. 0,3 was lower than 0,8. 0:13:14.620000 --> 0:13:17.020000 That's what this is talking about. 0:13:17.020000 --> 0:13:21.060000 So let's just run through this a couple of times to make sure you've got 0:13:21.060000 --> 0:13:25.020000 it. Oh, first of all, we got to talk about cost values. 0:13:25.020000 --> 0:13:30.080000 So I've already mentioned this that when I forward a Bp'd you to you, 0:13:30.080000 --> 0:13:36.920000 I tell you what my cost is to reach the root bridge. 0:13:36.920000 --> 0:13:41.160000 And 802.1d if you actually check out the specification does have some 0:13:41.160000 --> 0:13:43.600000 cost values in it. 0:13:43.600000 --> 0:13:48.160000 And I've highlighted here in this graphic the ones are most relevant. 0:13:48.160000 --> 0:13:51.020000 Certainly if you're studying for any kind of an exam, a networking exam 0:13:51.020000 --> 0:13:55.740000 like Network Plus or Cisco CCNA or something of that nature, you will 0:13:55.740000 --> 0:13:58.300000 want to have these numbers memorized. 0:13:58.300000 --> 0:14:06.720000 So as you can see, a regular 10 megabit ethernet language, you probably 0:14:06.720000 --> 0:14:07.960000 won't see those anymore. 0:14:07.960000 --> 0:14:11.960000 Those are really old have a default cost of 100. 0:14:11.960000 --> 0:14:17.740000 Fast ethernet, which is still fairly prevalent, has a cost of 19. 0:14:17.740000 --> 0:14:25.620000 One gig has a cost of four and 10 gig has a cost of two. 0:14:25.620000 --> 0:14:30.360000 So for example, if I go into one of my switches right now. 0:14:30.360000 --> 0:14:40.260000 Okay, so if I go into the switch and I say show spanning dash tree and 0:14:40.260000 --> 0:14:43.260000 this selective VLAN that I know that the switch has. 0:14:43.260000 --> 0:14:48.120000 Here we can see all the interfaces that spanning tree is including as 0:14:48.120000 --> 0:14:49.380000 part of its tree. 0:14:49.380000 --> 0:14:54.580000 They're all fast ethernet, so they all have a cost of 19. 0:14:54.580000 --> 0:15:02.200000 So notice the output in this value is only your own local interface cost. 0:15:02.200000 --> 0:15:04.720000 Now I happen to be on the root bridge, but let's go to a switch that's 0:15:04.720000 --> 0:15:05.980000 not the root bridge. 0:15:05.980000 --> 0:15:16.780000 Show spanning dash tree VLAN 1. 0:15:16.780000 --> 0:15:23.620000 Okay, so notice his cost to reach the root is 19, but that's not what 0:15:23.620000 --> 0:15:27.560000 this is. This is his local interface cost. 0:15:27.560000 --> 0:15:30.740000 Let's see here. Show CDP neighbor. 0:15:30.740000 --> 0:15:33.920000 He's going out fast ethernet 0 .13 and we can see right here. 0:15:33.920000 --> 0:15:35.840000 This is his root port. 0:15:35.840000 --> 0:15:37.100000 So this is root information. 0:15:37.100000 --> 0:15:44.920000 He says to get to the root, my root port is fast ethernet 0.13. 0:15:44.920000 --> 0:15:51.400000 All right, so let's do this interface range fast ethernet 0 slash 13 through 0:15:51.400000 --> 0:15:55.020000 15. Let's shut down those ports. 0:15:55.020000 --> 0:16:05.920000 So we're on switch 3 right now. 0:16:05.920000 --> 0:16:12.720000 We're right here and he was, no, we're on switch number one. 0:16:12.720000 --> 0:16:14.920000 We're not on switch number three, we're right here. 0:16:14.920000 --> 0:16:16.300000 Switch number one. 0:16:16.300000 --> 0:16:23.980000 And he was saying that his root port was this fast ethernet 0.13 and we 0:16:23.980000 --> 0:16:26.520000 know that this guy here is the root bridge. 0:16:26.520000 --> 0:16:30.460000 Now what I just did is I shut down all these links. 0:16:30.460000 --> 0:16:33.800000 So now in order for switch one to get to the root bridge, he's going to 0:16:33.800000 --> 0:16:35.340000 have to go this way. 0:16:35.340000 --> 0:16:37.840000 Now let's think about it. 0:16:37.840000 --> 0:16:44.880000 So switch 3 is advertising BPUs on each one of these three links here. 0:16:44.880000 --> 0:16:50.000000 Each one of those BPUs has a cost of 0 because he is the root bridge. 0:16:50.000000 --> 0:16:55.140000 When switch 2 gets it, he says, okay, what's my local interface cost on 0:16:55.140000 --> 0:16:57.340000 those three interfaces that just receive those BPUs? 0:16:57.340000 --> 0:17:02.220000 Well, they're all fast ethernet, so they're all 19. 0:17:02.220000 --> 0:17:06.520000 So switch 2 has to figure out what his root port's going to be. 0:17:06.520000 --> 0:17:10.440000 He says, well, it's 19 no matter which path I take here. 0:17:10.440000 --> 0:17:12.420000 So the next thing he's going to look at, he's going to look at each one 0:17:12.420000 --> 0:17:15.420000 of those BPUs and try to find a tiebreaker. 0:17:15.420000 --> 0:17:17.220000 The tiebreaker is going to be the bridge ID. 0:17:17.220000 --> 0:17:19.920000 Well, he's going to look at the bridge ID and say, okay, did these all 0:17:19.920000 --> 0:17:22.320000 come from different switches? 0:17:22.320000 --> 0:17:24.100000 Oh man, they didn't. 0:17:24.100000 --> 0:17:28.360000 The sending bridge ID of all these BPUs is exactly the same thing. 0:17:28.360000 --> 0:17:32.000000 Switch 3. So that's not going to help. 0:17:32.000000 --> 0:17:36.800000 Then he's going to go into those BPUs and look at the sending port IDs. 0:17:36.800000 --> 0:17:42.940000 And he'll end up saying, oh, this BPU here is the better one because that 0:17:42.940000 --> 0:17:46.300000 has a, it was sent on port 016. 0:17:46.300000 --> 0:17:51.820000 These other ones here 017 and 018 are not as good. 0:17:51.820000 --> 0:17:55.100000 So if we go over to switch 2 and I'll go over there right now, we'll see 0:17:55.100000 --> 0:17:59.640000 that fast Ethan at 016, I'm assuming that all three of these links are 0:17:59.640000 --> 0:18:05.540000 up. If they are, we'll see that fast Ethan at 016 is the root port. 0:18:05.540000 --> 0:18:10.540000 Keep in mind, it's not based on his own port IDs. 0:18:10.540000 --> 0:18:17.900000 If I had something like this, if I had 016 here, 018 here, but over here 0:18:17.900000 --> 0:18:23.960000 I had something like 0 slash 4 and 0 slash 9. 0:18:23.960000 --> 0:18:27.500000 Sometimes people mistakenly think, oh, okay, well, if the cost is the 0:18:27.500000 --> 0:18:31.700000 same, and if both BPUs had the exact same sending bridge ID, it must be 0:18:31.700000 --> 0:18:33.600000 this interface that's going to win. 0:18:33.600000 --> 0:18:38.220000 No, it's not based on the interface where you receive the BPUs, it's based 0:18:38.220000 --> 0:18:43.000000 on your neighbor's upstream interfaces that transmitted those BPUs to 0:18:43.000000 --> 0:18:46.660000 you. So let's just go over to switch 2 real quick and we'll confirm that 0:18:46.660000 --> 0:18:50.160000 016 is his root port. 0:18:50.160000 --> 0:19:05.180000 Show spanning dash tree, BLAN 1, and there we see his root port is indeed 0:19:05.180000 --> 0:19:09.620000 fast Ethan at 016. 0:19:09.620000 --> 0:19:14.940000 So this is his root port right here. 0:19:14.940000 --> 0:19:16.060000 So what did he do? 0:19:16.060000 --> 0:19:22.400000 Switch 2 turned around and sent 3 BPUs downstream this way, because remember, 0:19:22.400000 --> 0:19:25.200000 we shut off these interfaces right here. 0:19:25.200000 --> 0:19:29.040000 Switch 1 said, okay, clearly I can reach the root bridge through switch 0:19:29.040000 --> 0:19:32.380000 2. What should my root port be? 0:19:32.380000 --> 0:19:38.520000 Well, all three of these BPUs said 19 as far as the cost. 0:19:38.520000 --> 0:19:41.040000 Why did they all say the same thing? 0:19:41.040000 --> 0:19:46.380000 Because switch 2 told him, let me tell you about the cost of my root port. 0:19:46.380000 --> 0:19:50.380000 That root port is fast Ethan at 0, 0, because remember, the BPU had a 0:19:50.380000 --> 0:19:55.240000 cost of 0 initially when it came down, and then switch 2 said, well, for 0:19:55.240000 --> 0:19:59.640000 me to get back that way, for me to go this way, I have to look at my own 0:19:59.640000 --> 0:20:02.980000 local cost, which is 19, because that's fast Ethan at. 0:20:02.980000 --> 0:20:09.420000 So that 19 is what he advertises downstream to all of his neighbors. 0:20:09.420000 --> 0:20:12.240000 Switch 1 is going to say, well, the cost is the same. 0:20:12.240000 --> 0:20:14.360000 He said, I'm going to look at my own local cost. 0:20:14.360000 --> 0:20:16.960000 Well, these are also fast Ethan at ports. 0:20:16.960000 --> 0:20:19.740000 So he says, well, 19 plus 19 is 38. 0:20:19.740000 --> 0:20:25.280000 If I go that way, 38, if I go that way, and 38, if I go that way. 0:20:25.280000 --> 0:20:30.440000 So my total cumulative cost is the same, no matter which path I take. 0:20:30.440000 --> 0:20:34.460000 So he's going to do the same logic that switch 2 did. 0:20:34.460000 --> 0:20:36.960000 He's going to take a look at all three of these BPUs. 0:20:36.960000 --> 0:20:39.400000 He's going to say, all right, what about the sending bridge ID? 0:20:39.400000 --> 0:20:40.580000 Are they different? 0:20:40.580000 --> 0:20:42.760000 Can I use that as a tiebreaker? 0:20:42.760000 --> 0:20:47.960000 No, I can't. Sending bridge ID of all three of those is switch 2, because 0:20:47.960000 --> 0:20:49.800000 he's the one who's sending it. 0:20:49.800000 --> 0:20:52.440000 All right, let me look at the sending port IDs. 0:20:52.440000 --> 0:20:54.820000 And here's where he's going to find his tiebreaker. 0:20:54.820000 --> 0:20:58.520000 Because the one that was received on this interface right here has a port 0:20:58.520000 --> 0:21:02.720000 ID of 0 slash 10, which is lower than the other ones. 0:21:02.720000 --> 0:21:06.240000 So now we're going to see that switch 1 is using fast Ethan at 0 slash 0:21:06.240000 --> 0:21:09.180000 10 as his root port. 0:21:09.180000 --> 0:21:14.400000 And we should see his total cost is 38. 0:21:14.400000 --> 0:21:17.580000 It's kind of chicken scratch right there, 38. 0:21:17.580000 --> 0:21:27.920000 So let's take a look on switch 1. 0:21:27.920000 --> 0:21:32.620000 All right, so there 0 slash 10 and actually says right down here, fast 0:21:32.620000 --> 0:21:35.060000 Ethan, 0 10 root. 0:21:35.060000 --> 0:21:36.820000 See, now look at the difference. 0:21:36.820000 --> 0:21:41.920000 This is his total cumulative cost to get all the way back up to the root 0:21:41.920000 --> 0:21:48.300000 bridge. This is just his local interface cost. 0:21:48.300000 --> 0:21:49.780000 So there's a difference. 0:21:49.780000 --> 0:21:58.540000 Your local interface cost, total cumulative cost. 0:21:58.540000 --> 0:22:02.560000 Now you might be wondering about Keith, what if I have some interface 0:22:02.560000 --> 0:22:06.480000 that doesn't fall into this range here? 0:22:06.480000 --> 0:22:09.960000 You know, for example, I've studied a little bit about switching. 0:22:09.960000 --> 0:22:14.800000 I know that with switches, you can have multiple interfaces all bundled 0:22:14.800000 --> 0:22:17.460000 together into something called an ether channel. 0:22:17.460000 --> 0:22:21.980000 Or maybe you don't know that. 0:22:21.980000 --> 0:22:24.000000 Well, now you do. 0:22:24.000000 --> 0:22:31.280000 So if all four of these links as an example are fast Ethan at and I bundle 0:22:31.280000 --> 0:22:36.740000 them into an ether channel, spanning tree is going to see that as 400 0:22:36.740000 --> 0:22:43.920000 megabits. 100 megabits per second bundled together times four. 0:22:43.920000 --> 0:22:46.940000 I don't see 400 megabits anywhere on this chart. 0:22:46.940000 --> 0:22:48.560000 So what's that going to be? 0:22:48.560000 --> 0:22:52.620000 Well, the IEEE specification doesn't give you that. 0:22:52.620000 --> 0:22:56.880000 The IEEE specification does not give you an actual mathematical formula 0:22:56.880000 --> 0:23:01.320000 to say, this is my bandwidth, plug into a formula, here's the resulting 0:23:01.320000 --> 0:23:05.000000 cost. All it does is give you a chart like this. 0:23:05.000000 --> 0:23:07.160000 So here's the only thing that we would know. 0:23:07.160000 --> 0:23:13.780000 Looking at our chart, we can infer that a 400 megabit per second link, 0:23:13.780000 --> 0:23:18.280000 well, 100 megabits is 19. 0:23:18.280000 --> 0:23:21.800000 10 times that a gigabit is four. 0:23:21.800000 --> 0:23:25.860000 So all we know is that a 400 megabit is going to be some number between 0:23:25.860000 --> 0:23:30.580000 four and 19. It might be 17, it might be 12, it might be 11, it'll be 0:23:30.580000 --> 0:23:33.420000 some number between those two. 0:23:33.420000 --> 0:23:41.180000 Now, one other thing I want to mention here, before I leave this slide, 0:23:41.180000 --> 0:23:47.160000 is that the chart that I'm showing you is actually an old chart. 0:23:47.160000 --> 0:23:55.060000 That comes from the original 1998 802.1D specification. 0:23:55.060000 --> 0:23:57.740000 And if you're watching in my other videos or read some books, you'll know 0:23:57.740000 --> 0:24:03.560000 that Spanning Tree 802.1D was actually updated back in 2004, 15 years 0:24:03.560000 --> 0:24:05.720000 ago as of this recording. 0:24:05.720000 --> 0:24:10.500000 And in that specification, the cost values are different than this. 0:24:10.500000 --> 0:24:12.800000 So why am I showing you this? 0:24:12.800000 --> 0:24:16.040000 Well, because we just saw that even though the cost values were updated 0:24:16.040000 --> 0:24:22.380000 back in 2004, as far as the IEEE is concerned, at least on Cisco switches, 0:24:22.380000 --> 0:24:27.280000 they're still using the older cost values, four, 19 and 100. 0:24:27.280000 --> 0:24:30.180000 So certainly if you're working with a Cisco switch and you're running 0:24:30.180000 --> 0:24:35.300000 rapid Spanning Tree, you have to remember those old values because that's 0:24:35.300000 --> 0:24:37.740000 what the switches are still working with. 0:24:37.740000 --> 0:24:41.900000 So let's finish it off here by going to just another quick demonstration 0:24:41.900000 --> 0:24:44.040000 here on the graphic. 0:24:44.040000 --> 0:24:47.420000 So let me ask you this question. 0:24:47.420000 --> 0:24:49.680000 Let me draw in some stuff. 0:24:49.680000 --> 0:24:58.360000 Let's say that the switch X on the bottom was connected like this to these 0:24:58.360000 --> 0:25:01.340000 three upstream switches. 0:25:01.340000 --> 0:25:05.920000 Let's just put in some port numbers here, 0 slash 2. 0:25:05.920000 --> 0:25:12.880000 Let's say 0 slash 1, 0 slash 4, 0 slash 7. 0:25:12.880000 --> 0:25:17.860000 Let's say that these black links represent fast ethernet. 0:25:17.860000 --> 0:25:26.700000 And let's put some port numbers down below here. 0:25:26.700000 --> 0:25:41.940000 Let's say 0 slash 1, 0 slash 3, 0 slash 2, and 0 slash 4. 0:25:41.940000 --> 0:25:45.900000 Pause this video for a moment and see if you can determine for switch 0:25:45.900000 --> 0:25:50.820000 X and for the other three switches, the ones in the middle, we already 0:25:50.820000 --> 0:25:53.460000 see our root bridge that's been defined for us. 0:25:53.460000 --> 0:25:58.820000 So if all four downstream switches, what would your root ports be? 0:25:58.820000 --> 0:26:08.780000 And then press play when you think you've identified the root ports. 0:26:08.780000 --> 0:26:11.240000 All right, so let's work on this. 0:26:11.240000 --> 0:26:17.240000 So we know that on the root bridge himself, he's not going to have any 0:26:17.240000 --> 0:26:23.680000 root ports. We know that on the root bridge, every port that he has is 0:26:23.680000 --> 0:26:25.300000 going to be a designated port. 0:26:25.300000 --> 0:26:27.380000 Designated ports deliver. 0:26:27.380000 --> 0:26:34.360000 He's going to be delivering BPDUs out this way, this way, and this way. 0:26:34.360000 --> 0:26:38.040000 All right, let's start with switch 44, 44. 0:26:38.040000 --> 0:26:42.520000 Well, we could start adding up all sorts of cost values, but this one 0:26:42.520000 --> 0:26:44.040000 should be pretty easy. 0:26:44.040000 --> 0:26:47.980000 We know that when the BPDU comes down, it's going to have a cost of 0. 0:26:47.980000 --> 0:26:52.140000 He's connected via fast ethernet, which has a local cost of 19. 0:26:52.140000 --> 0:26:54.100000 That's his local cost. 0:26:54.100000 --> 0:26:59.480000 So his total cost to get to the root bridge that way is going to be 19. 0:26:59.480000 --> 0:27:06.340000 19 plus 0. Any other path he takes, you don't even have to do the math. 0:27:06.340000 --> 0:27:08.960000 You could if you wanted to, but you know that any other path he takes 0:27:08.960000 --> 0:27:13.440000 going this way is going to be something higher than 19. 0:27:13.440000 --> 0:27:18.580000 So he's not going to use those paths as his root port. 0:27:18.580000 --> 0:27:27.300000 So we can safely say that his root port will be port 0 slash 1, and he'll 0:27:27.300000 --> 0:27:29.900000 place that into the forwarding state. 0:27:29.900000 --> 0:27:34.260000 The same thing holds true for the other two switches in line with him. 0:27:34.260000 --> 0:27:42.640000 43, 44. He's going to say, well, my local cost is 4, because he received 0:27:42.640000 --> 0:27:45.540000 that BPDU on a gigabit ethernet interface. 0:27:45.540000 --> 0:27:51.780000 It came down with a cost of 0, so he'll say, well, 4 plus 0 is 4. 0:27:51.780000 --> 0:27:56.620000 Any other path he tries to take would be higher than 4, so he'll say, 0:27:56.620000 --> 0:27:59.500000 this will be my root port right here. 0:27:59.500000 --> 0:28:02.740000 And I'll place that in the forwarding state. 0:28:02.740000 --> 0:28:06.340000 The same thing with bridge 44E4. 0:28:06.340000 --> 0:28:07.520000 He'll do the exact same thing. 0:28:07.520000 --> 0:28:14.160000 He'll say, my total cost is 4, because what came down to me had a cost 0:28:14.160000 --> 0:28:16.120000 of 0 inside the BPDU. 0:28:16.120000 --> 0:28:20.100000 I added my own local interface, which was a cost of 4 locally, which gave 0:28:20.100000 --> 0:28:21.440000 me a total cost of 4. 0:28:21.440000 --> 0:28:23.380000 That's the lowest I've got. 0:28:23.380000 --> 0:28:25.360000 That'll be my root port. 0:28:25.360000 --> 0:28:27.260000 I'll put that in the forwarding state. 0:28:27.260000 --> 0:28:32.360000 Now let's look at the BPDU as they continue to flood down here. 0:28:32.360000 --> 0:28:42.340000 Hopefully, you determined that the best path that SwitchX had was 0 slash 0:28:42.340000 --> 0:28:46.640000 3. That is his root port. 0:28:46.640000 --> 0:28:49.420000 That's what goes into the forwarding state. 0:28:49.420000 --> 0:28:53.260000 Now in case you weren't able to figure that out, here's why. 0:28:53.260000 --> 0:29:03.580000 If he goes off to the left, his total cost that way is 38. 0:29:03.580000 --> 0:29:05.460000 Fast ethernet is 19. 0:29:05.460000 --> 0:29:07.580000 That's his local cost. 0:29:07.580000 --> 0:29:11.400000 His neighbor is advertising 19 to him. 0:29:11.400000 --> 0:29:15.940000 19 plus 19 this way is 38. 0:29:15.940000 --> 0:29:22.120000 Whereas if he goes any other direction, it's going to be one hop of fast 0:29:22.120000 --> 0:29:28.780000 ethernet, which is 19 plus one hop of gigabit, which is 4. 0:29:28.780000 --> 0:29:33.820000 So all these other paths will be a cost of 23. 0:29:33.820000 --> 0:29:35.920000 Total cost of 23. 0:29:35.920000 --> 0:29:39.320000 Let's put those numbers in here. 0:29:39.320000 --> 0:29:43.420000 23. 23. So now he has a tie. 0:29:43.420000 --> 0:29:45.200000 We can rule out the left side. 0:29:45.200000 --> 0:29:47.600000 That's definitely not going to be used as his root port. 0:29:47.600000 --> 0:29:49.420000 He's got a tie of 23. 0:29:49.420000 --> 0:29:51.780000 So what do we do as a tie breaker? 0:29:51.780000 --> 0:29:54.940000 Well, the first thing is we go back to the BPDUs and we take a look at 0:29:54.940000 --> 0:29:56.520000 the sending bridge ID. 0:29:56.520000 --> 0:30:00.660000 And we try to say, okay, do any of these BPDUs have a sending bridge ID 0:30:00.660000 --> 0:30:04.640000 of a neighbor that's lower than anybody else? 0:30:04.640000 --> 0:30:11.260000 Well, the two BPDUs that came down this way have a sending bridge ID of 0:30:11.260000 --> 0:30:15.940000 this guy. Let me just delete some of this stuff here. 0:30:15.940000 --> 0:30:27.680000 All right. So the BPDUs that came down this way had this as a sending 0:30:27.680000 --> 0:30:32.100000 bridge ID. But the BPD that came down this way had this as a sending bridge 0:30:32.100000 --> 0:30:39.740000 ID. If you actually take a look at those numbers, 43 is lower than 44. 0:30:39.740000 --> 0:30:42.220000 So that rules out this link. 0:30:42.220000 --> 0:30:45.200000 So we know that's not going to be the root port. 0:30:45.200000 --> 0:30:50.200000 So now we've narrowed down the root port to being one of these two links 0:30:50.200000 --> 0:30:55.500000 right here. It's going to be either that one or that one. 0:30:55.500000 --> 0:31:01.160000 And if you recall the port numbers I put in, it was 0, 1 here. 0:31:01.160000 --> 0:31:03.460000 And I believe 0, 2 here. 0:31:03.460000 --> 0:31:07.160000 Now I intentionally, on the bottom, I don't remember what I put in. 0:31:07.160000 --> 0:31:14.680000 I think I put in something like 0, 3, and 0, 2, something like that. 0:31:14.680000 --> 0:31:18.140000 Because I want you to think, is it based on, so we take a look at the 0:31:18.140000 --> 0:31:22.300000 BPDUs, we take a look at the sending bridge ID. 0:31:22.300000 --> 0:31:24.760000 Well, they both have the exact same sending bridge ID. 0:31:24.760000 --> 0:31:26.620000 The cost is the same. 0:31:26.620000 --> 0:31:29.480000 Whether I go up the left or up the right, the cost is the same. 0:31:29.480000 --> 0:31:31.180000 Sending bridge ID is the same. 0:31:31.180000 --> 0:31:33.020000 So now we look at the sending port ID. 0:31:33.020000 --> 0:31:35.360000 It's not based on your own port IDs. 0:31:35.360000 --> 0:31:38.160000 Your own port ID is irrelevant. 0:31:38.160000 --> 0:31:42.720000 And my neighbor's port ID of 0, 1 is better than my neighbor port ID of 0:31:42.720000 --> 0:31:49.200000 0, 2. So for that reason, that's why we ended up with this port here as 0:31:49.200000 --> 0:31:58.820000 my root port. So that concludes this video. 0:31:58.820000 --> 0:32:00.120000 Thank you for watching.