WEBVTT 0:00:03.080000 --> 0:00:06.980000 In this video, we're going to quickly go over the spanning tree root port 0:00:06.980000 --> 0:00:14.200000 election. So I mentioned in a previous video that the root port is the 0:00:14.200000 --> 0:00:18.700000 port on your switch that you consider to be the best port to get you back 0:00:18.700000 --> 0:00:19.620000 to the root bridge. 0:00:19.620000 --> 0:00:21.920000 So the root port receives. 0:00:21.920000 --> 0:00:25.700000 A root port is receiving a BPDU from the root bridge. 0:00:25.700000 --> 0:00:29.900000 So it's upstream facing towards the root bridge. 0:00:29.900000 --> 0:00:34.620000 Now, if I'm receiving multiple BPDUs from that root bridge who's up there 0:00:34.620000 --> 0:00:38.980000 somewhere. And by the time the BPDUs come to me, I'm receiving on port 0:00:38.980000 --> 0:00:42.120000 01, 07, 01 and so forth. 0:00:42.120000 --> 0:00:47.180000 How do I figure out which of those is the best to get me to him? 0:00:47.180000 --> 0:00:53.340000 Well, in all flavors of spanning tree, it's based on cost. 0:00:53.340000 --> 0:00:57.140000 So cost is actually based on bandwidth. 0:00:57.140000 --> 0:00:59.020000 It says based on inverse bandwidth. 0:00:59.020000 --> 0:01:02.400000 So basically what that means is the faster the bandwidth, the faster an 0:01:02.400000 --> 0:01:06.700000 interface, the larger the bandwidth, the smaller the cost. 0:01:06.700000 --> 0:01:10.880000 So a small cost value is better than a big cost value. 0:01:10.880000 --> 0:01:16.220000 A gigabit interface is going to come up with a lower cost, a smaller cost 0:01:16.220000 --> 0:01:20.140000 than a fast-eathinate interface because a gigabit interface has bigger 0:01:20.140000 --> 0:01:25.420000 bandwidth than faster fast -eathinate interface does. 0:01:25.420000 --> 0:01:29.440000 And it's all based on like the second bullet point says the cumulative 0:01:29.440000 --> 0:01:31.920000 cost to get to the root. 0:01:31.920000 --> 0:01:36.560000 So I might have two interfaces here, both are whichever receiving BPDUs. 0:01:36.560000 --> 0:01:41.940000 Maybe this one is like a massive 100 gigabit per second interface with 0:01:41.940000 --> 0:01:48.400000 a cost of like super small and this is like a really slow 10 megabit per 0:01:48.400000 --> 0:01:50.040000 second ethernet interface. 0:01:50.040000 --> 0:01:51.460000 You know, I say, oh, hands down. 0:01:51.460000 --> 0:01:52.100000 This is the winner. 0:01:52.100000 --> 0:01:53.580000 Well, hold on a second. 0:01:53.580000 --> 0:01:55.880000 It's not just based on your own local cost values. 0:01:55.880000 --> 0:01:59.740000 It's the cost all the way through you have to consider. 0:01:59.740000 --> 0:02:04.580000 What's my total cumulative cost going out each of these links to get up 0:02:04.580000 --> 0:02:06.040000 to that root bridge somewhere? 0:02:06.040000 --> 0:02:10.420000 It might turn out that while this one's super fast right now, all the 0:02:10.420000 --> 0:02:15.740000 hops beyond that are like 64 kilobits per second, 56 kilobits per second, 0:02:15.740000 --> 0:02:20.300000 whereas this one, once we get past this slowed 10 megabit per second link, 0:02:20.300000 --> 0:02:24.620000 maybe it's all 40 gig all the way on up past that. 0:02:24.620000 --> 0:02:29.240000 So it's the cumulative or aggregate cost to get to the root bridge. 0:02:29.240000 --> 0:02:35.580000 Now, what if there is a tie in the cost? 0:02:35.580000 --> 0:02:36.380000 That's possible. 0:02:36.380000 --> 0:02:39.700000 I could say, well, my cost to get to the root bridge this way, the total 0:02:39.700000 --> 0:02:44.240000 cost is 38 and it's also 38 this way. 0:02:44.240000 --> 0:02:45.840000 What do I do then? 0:02:45.840000 --> 0:02:50.040000 Well, then at that point, there is some tie breakers we do. 0:02:50.040000 --> 0:02:53.680000 The first thing we do is we look at the BPDUs that we received. 0:02:53.680000 --> 0:03:00.000000 All right. So let's say I have two ports right here. 0:03:00.000000 --> 0:03:02.920000 They've both received BPDUs. 0:03:02.920000 --> 0:03:08.880000 The root bridge is somewhere right up here and my cumulative cost is the 0:03:08.880000 --> 0:03:12.820000 same. They're both, let's say, 100 as a cumulative cost. 0:03:12.820000 --> 0:03:17.760000 Well, I'm going to look inside those BPDUs. 0:03:17.760000 --> 0:03:23.320000 And whenever I transmit a BPDU to you, so let's say I'm the designated 0:03:23.320000 --> 0:03:28.060000 port and I'm forwarding or transmitting a BPDU to you, I will put my name 0:03:28.060000 --> 0:03:32.120000 in that BPDU. I will say I am the sender of that BPDU. 0:03:32.120000 --> 0:03:34.620000 There's actually a field called the sending bridge ID. 0:03:34.620000 --> 0:03:37.000000 I will put my own bridge ID as the sender. 0:03:37.000000 --> 0:03:42.300000 So if this came from two different switches, X and Y, the sending bridge 0:03:42.300000 --> 0:03:45.140000 ID of these two BPDUs is not going to be the same. 0:03:45.140000 --> 0:03:48.620000 So that will actually be our first tie breaker. 0:03:48.620000 --> 0:03:52.480000 We'll look at those two received BPDUs and whichever one has the lowest 0:03:52.480000 --> 0:03:56.720000 bridge ID, whichever neighbor upstream has the lowest bridge ID, that's 0:03:56.720000 --> 0:04:02.140000 the winner. Now, sometimes that's not even going to help us because what 0:04:02.140000 --> 0:04:09.420000 if those two BPDUs actually came from the same switch, switch X, I'm disconnected 0:04:09.420000 --> 0:04:13.360000 to him on two different ports, well, then both of these BPDUs will have 0:04:13.360000 --> 0:04:14.620000 the same sending bridge ID. 0:04:14.620000 --> 0:04:15.880000 Well, guess what? 0:04:15.880000 --> 0:04:19.820000 Not only when I send you a BPDU, do I give you my name, my sending bridge 0:04:19.820000 --> 0:04:25.000000 ID, whatever interface I use to transmit that BPDU to you, that interface 0:04:25.000000 --> 0:04:28.060000 has a name. We called a port ID. 0:04:28.060000 --> 0:04:32.240000 And so in this particular case, even though the BPDUs came from the same 0:04:32.240000 --> 0:04:37.180000 switch, they did come from two different interfaces, which have two different 0:04:37.180000 --> 0:04:43.600000 port IDs. And so the lowest upstream port ID will be the tie breaker. 0:04:43.600000 --> 0:04:47.860000 So if the cost is the same, that's how we go through the tie breaking 0:04:47.860000 --> 0:04:52.980000 process to figure out which one will be the root port. 0:04:52.980000 --> 0:04:56.780000 So in this case, that would be our root port. 0:04:56.780000 --> 0:05:00.220000 All right, so let's take a look at what those cost values are. 0:05:00.220000 --> 0:05:03.680000 I did mention they're related to bandwidth, but what are the actual numbers? 0:05:03.680000 --> 0:05:13.580000 All right, so in the original implementation of 802.1d, this is the way 0:05:13.580000 --> 0:05:17.500000 it basically worked out, was that. 0:05:17.500000 --> 0:05:21.420000 A one gigabit link would be a cost of four. 0:05:21.420000 --> 0:05:27.800000 A fast Ethernet link would be a cost of 19 and so on and so forth. 0:05:27.800000 --> 0:05:32.440000 I have highlighted some values here in yellow. 0:05:32.440000 --> 0:05:34.860000 You definitely want to memorize these. 0:05:34.860000 --> 0:05:37.720000 You want to be able to create flashcards before you take your CC exam 0:05:37.720000 --> 0:05:41.760000 and remember that in the old way of doing spanning tree. 0:05:41.760000 --> 0:05:48.400000 10 megabit had a cost of 100 gigabit had a cost of four and so on and 0:05:48.400000 --> 0:06:01.460000 so forth. All right, so let's just real quickly here just do a quick review 0:06:01.460000 --> 0:06:06.340000 of this. So we know this is our root bridge up here. 0:06:06.340000 --> 0:06:10.360000 So we know that his ports would be designated ports. 0:06:10.360000 --> 0:06:16.400000 His job to forward BPD use downstream to his neighbors. 0:06:16.400000 --> 0:06:20.580000 Right now there's really not any redundancy or anything. 0:06:20.580000 --> 0:06:27.400000 So his neighbors have no choice but to select these as their root ports. 0:06:27.400000 --> 0:06:34.700000 Now where it gets interesting is when we start connecting these guys like 0:06:34.700000 --> 0:06:42.360000 this. All right, let's say that all these lines here represent gigabit 0:06:42.360000 --> 0:06:54.100000 Ethernet links. Okay, so how is switch X going to determine what his root 0:06:54.100000 --> 0:07:00.100000 port is? Well, let's say this BPD comes down first. 0:07:00.100000 --> 0:07:02.320000 That came from switch. 0:07:02.320000 --> 0:07:05.400000 I'll just call him 44 44 right there. 0:07:05.400000 --> 0:07:08.560000 Well, he had a fast Ethernet link leading up to the root bridge. 0:07:08.560000 --> 0:07:15.340000 So from his perspective, his total cost was 19 because one hop of fast 0:07:15.340000 --> 0:07:17.220000 Ethernet has a cost of 19. 0:07:17.220000 --> 0:07:19.760000 And that's what he advertised downstream. 0:07:19.760000 --> 0:07:23.460000 He said, Hey neighbor, my cost of the root bridge is 19. 0:07:23.460000 --> 0:07:29.660000 Now if that is the first BPD that switch X has gotten, he says, okay. 0:07:29.660000 --> 0:07:33.220000 Well, for me to get to that guy is a gig link. 0:07:33.220000 --> 0:07:38.940000 A gig link is four plus the 19 he just advertised to me. 0:07:38.940000 --> 0:07:42.840000 Tells me that if I use that interface, it's going to be a total cost of 0:07:42.840000 --> 0:07:48.560000 23. Maybe that should be my root port. 0:07:48.560000 --> 0:07:49.860000 I'll hold on to that for a little bit. 0:07:49.860000 --> 0:07:51.180000 See what else happens. 0:07:51.180000 --> 0:07:56.800000 Now, let's go to the far right 44 E four. 0:07:56.800000 --> 0:08:03.160000 His cost to get to the root bridge is only four because he has a gigabit 0:08:03.160000 --> 0:08:05.080000 Ethernet link, which has a cost of four. 0:08:05.080000 --> 0:08:09.820000 That's what he's going to advertise down to his neighbor. 0:08:09.820000 --> 0:08:12.900000 Switch X is going to say, okay, well, my neighbor told me that his cost 0:08:12.900000 --> 0:08:17.080000 is four to reach that neighbor is an additional cost of four. 0:08:17.080000 --> 0:08:19.240000 Cause I got to go over giggling to get to him. 0:08:19.240000 --> 0:08:22.000000 So that'll be a cost of eight. 0:08:22.000000 --> 0:08:24.680000 Okay. Well, that's a lot better. 0:08:24.680000 --> 0:08:27.060000 That should probably be my report, right? 0:08:27.060000 --> 0:08:31.740000 Is all right. So let's just maybe figure that that'll be the report. 0:08:31.740000 --> 0:08:38.880000 Now, now he gets BPD is this way and this way. 0:08:38.880000 --> 0:08:45.920000 Once again, 43 44 his cost is also four. 0:08:45.920000 --> 0:08:48.880000 That's what he advertises downstream. 0:08:48.880000 --> 0:08:50.440000 And so same thing. 0:08:50.440000 --> 0:08:54.560000 He ends up switch X ends up with eight here and eight here. 0:08:54.560000 --> 0:09:01.360000 Ah, now we have a tie because we've got we can, we can rule out the port 0:09:01.360000 --> 0:09:06.320000 that has a cost of 23, but we have three other interfaces that have an 0:09:06.320000 --> 0:09:10.760000 aggregate cost or a cumulative cost of eight. 0:09:10.760000 --> 0:09:14.480000 All right. So now we go to our first tiebreaker. 0:09:14.480000 --> 0:09:17.180000 We look at the sending bridge IDs. 0:09:17.180000 --> 0:09:21.620000 All right. Our two upstream neighbors both have the same priority. 0:09:21.620000 --> 0:09:23.540000 So that's not going to help me. 0:09:23.540000 --> 0:09:25.900000 So now we start comparing Mac addresses. 0:09:25.900000 --> 0:09:29.780000 They both start with zero two one one ABCD. 0:09:29.780000 --> 0:09:36.220000 And then we have four three. 0:09:36.220000 --> 0:09:41.840000 Compared to four four and four three is better. 0:09:41.840000 --> 0:09:46.580000 So because four three is lower switch X says, all right, that is not going 0:09:46.580000 --> 0:09:48.040000 to be my report. 0:09:48.040000 --> 0:09:53.060000 But I still have two other ties which are eight each. 0:09:53.060000 --> 0:09:54.600000 All right. So he does the same thing. 0:09:54.600000 --> 0:09:59.220000 He says, Oh, well, unfortunately, both the BPUs that came down this way. 0:09:59.220000 --> 0:10:02.800000 Have the exact same sending bridge ID of this. 0:10:02.800000 --> 0:10:09.360000 Now he looks at the sending port IDs and we haven't, I haven't drawn that 0:10:09.360000 --> 0:10:14.720000 in here. Let's just give a little space here so I can do that. 0:10:14.720000 --> 0:10:27.300000 Maybe this one is port zero slash nine and this is zero slash four. 0:10:27.300000 --> 0:10:33.200000 Well, the sending port ID of zero slash four is actually lower than the 0:10:33.200000 --> 0:10:35.900000 sending port ID of zero slash nine. 0:10:35.900000 --> 0:10:39.040000 So switch X will say this is my best port. 0:10:39.040000 --> 0:10:45.780000 Not by virtue of the cost, not by virtue of my neighbor's bridge ID, but 0:10:45.780000 --> 0:10:50.480000 by virtue of my neighbor's port ID of zero slash four. 0:10:50.480000 --> 0:10:55.680000 So this will end up becoming his report right there. 0:10:55.680000 --> 0:11:02.680000 And once again, how do you discover the report? 0:11:02.680000 --> 0:11:05.000000 How do you confirm it? 0:11:05.000000 --> 0:11:11.520000 Well, for that. We just simply log into our switch. 0:11:11.520000 --> 0:11:20.080000 Show spanning dash tree root. 0:11:20.080000 --> 0:11:25.840000 We'll show us in this VLAN right here, we are not the root. 0:11:25.840000 --> 0:11:33.040000 And our root port is gig one slash one. 0:11:33.040000 --> 0:11:40.120000 So that concludes this particular video on figuring out who the root port 0:11:40.120000 --> 0:11:42.800000 is for any flavor of spanning tree.