WEBVTT 0:00:03.340000 --> 0:00:08.900000 Welcome to this video titled Designated and Non-designated Port Election. 0:00:08.900000 --> 0:00:12.560000 So we're continuing our discussion here about rapid spanning tree. 0:00:12.560000 --> 0:00:16.000000 All this is also backwards compatible with the earlier version of 802 0:00:16.000000 --> 0:00:17.760000 .1d spanning tree. 0:00:17.760000 --> 0:00:21.580000 And now we're going to focus on designated and non-designated ports. 0:00:21.580000 --> 0:00:24.460000 So what is a designated port? 0:00:24.460000 --> 0:00:28.120000 It is a port that is leading away from the root bridge. 0:00:28.120000 --> 0:00:32.700000 So if you think about the path that BPDUs are flowing, remember the root 0:00:32.700000 --> 0:00:38.320000 bridge initially creates a BPDU, then it just follows and floods along, 0:00:38.320000 --> 0:00:43.940000 down away from the BPDU, any interface that is transmitting a BPDU is 0:00:43.940000 --> 0:00:46.080000 a designated port. 0:00:46.080000 --> 0:00:50.360000 Now, like your root port, there is an election process that happens to 0:00:50.360000 --> 0:00:52.460000 determine which port will be designated. 0:00:52.460000 --> 0:00:58.220000 Now, number one, the port with the lowest root path cost. 0:00:58.220000 --> 0:00:59.960000 And let me just pause right here. 0:00:59.960000 --> 0:01:04.420000 This is why all the interfaces on the root bridge itself are always designated 0:01:04.420000 --> 0:01:09.240000 ports. Because if I am an interface that lives on the root bridge, nothing 0:01:09.240000 --> 0:01:13.240000 can beat me. Nothing has a lower cost to the root bridge than me because 0:01:13.240000 --> 0:01:14.420000 I'm right there. 0:01:14.420000 --> 0:01:16.020000 I am the root bridge. 0:01:16.020000 --> 0:01:22.240000 That's why all of his ports are always designated ports. 0:01:22.240000 --> 0:01:25.780000 Other than that, it's all supports with the lowest port cost, lowest bridge 0:01:25.780000 --> 0:01:28.020000 ID, or lowest port ID. 0:01:28.020000 --> 0:01:29.020000 Now, what's that referring to? 0:01:29.020000 --> 0:01:30.680000 What's that really talking about? 0:01:30.680000 --> 0:01:36.540000 So what we're talking about here is if this is my root bridge, and here 0:01:36.540000 --> 0:01:42.240000 we have bridge A and we have bridge B, we know bridge A and bridge B are 0:01:42.240000 --> 0:01:44.440000 going to need root ports. 0:01:44.440000 --> 0:01:47.560000 Let's just for the purposes of argument, let's just say that these are 0:01:47.560000 --> 0:01:51.520000 the root ports for these two bridges. 0:01:51.520000 --> 0:01:56.300000 And we also know that the root bridge, he's got designated ports. 0:01:56.300000 --> 0:02:00.780000 Now, every single link needs to have a designated port. 0:02:00.780000 --> 0:02:02.460000 Every link needs to have one. 0:02:02.460000 --> 0:02:05.880000 Now we connect a link between A and B. 0:02:05.880000 --> 0:02:10.180000 One of these interfaces is going to have to take on the role of the designated 0:02:10.180000 --> 0:02:12.660000 port. And that's what we're talking right here. 0:02:12.660000 --> 0:02:15.720000 How has that election done? 0:02:15.720000 --> 0:02:20.140000 A and B are first going to exchange with each other the cost of the root 0:02:20.140000 --> 0:02:23.940000 ports. Who's got the lowest cost to the root bridge? 0:02:23.940000 --> 0:02:26.760000 If one of them is clearly the winner, if one of them is lower than the 0:02:26.760000 --> 0:02:27.880000 other, we're done. 0:02:27.880000 --> 0:02:30.520000 Whoever has the lowest cost wins. 0:02:30.520000 --> 0:02:32.580000 They become the designated port. 0:02:32.580000 --> 0:02:37.340000 If their costs are the same, then they compare each other's names. 0:02:37.340000 --> 0:02:40.060000 They compare each other's bridge IDs. 0:02:40.060000 --> 0:02:42.480000 And typically, that's where we're done. 0:02:42.480000 --> 0:02:45.160000 Whoever has the lowest bridge ID wins. 0:02:45.160000 --> 0:02:47.380000 Definitely, in this case, that would be the winner. 0:02:47.380000 --> 0:02:51.500000 The only time we would have lowest port ID be a factor is if you have 0:02:51.500000 --> 0:02:55.560000 a switch with two interfaces are connecting into a hub. 0:02:55.560000 --> 0:03:01.820000 So if I'm actually receiving BPDUs on two different interfaces from myself, 0:03:01.820000 --> 0:03:06.020000 both of them had the exact same sending bridge ID, which is me, then I 0:03:06.020000 --> 0:03:11.460000 will go down to whichever port on myself is the lowest port ID. 0:03:11.460000 --> 0:03:16.980000 But chances are you probably are not going to see that. 0:03:16.980000 --> 0:03:19.400000 So we've elected our root ports. 0:03:19.400000 --> 0:03:21.480000 We've elected our designated ports. 0:03:21.480000 --> 0:03:25.800000 Everything that's left over is a non-designate port. 0:03:25.800000 --> 0:03:27.300000 And it will go into the blocking role. 0:03:27.300000 --> 0:03:33.020000 Now, in the terminology of rapid spanning tree, we don't call it that. 0:03:33.020000 --> 0:03:36.080000 Logically, functionally, it's the same. 0:03:36.080000 --> 0:03:39.980000 But in rapid spanning tree, if a port is not a root port and it's not 0:03:39.980000 --> 0:03:44.160000 a designated port, then we actually call it one of two things as either 0:03:44.160000 --> 0:03:46.480000 an alternate or a backup port. 0:03:46.480000 --> 0:03:48.080000 We're going to talk about that in just a moment. 0:03:48.080000 --> 0:03:53.340000 But both alternate and backup ports, their functional role is the same. 0:03:53.340000 --> 0:03:55.280000 They are discarding traffic. 0:03:55.280000 --> 0:03:56.020000 We actually say that. 0:03:56.020000 --> 0:03:57.380000 We don't say they're blocking. 0:03:57.380000 --> 0:03:59.700000 We say they are discarding. 0:03:59.700000 --> 0:04:04.620000 So the concept of blocking was replaced by the concept of discarding in 0:04:04.620000 --> 0:04:05.960000 rapid spanning tree. 0:04:05.960000 --> 0:04:09.000000 So let's take a look here at how this works. 0:04:09.000000 --> 0:04:12.960000 All right. So, Disney port election. 0:04:12.960000 --> 0:04:14.420000 We'll start with the root bridge. 0:04:14.420000 --> 0:04:19.280000 We already know by default, his ports are designated ports. 0:04:19.280000 --> 0:04:22.720000 We've got our root ports already assigned right here. 0:04:22.720000 --> 0:04:31.440000 Okay. So we know right here that the port leading away from the root bridge 0:04:31.440000 --> 0:04:33.720000 is going to be a designated port. 0:04:33.720000 --> 0:04:35.780000 And here's another thing. 0:04:35.780000 --> 0:04:40.320000 Whenever you see a root port, you know that by default, the other side 0:04:40.320000 --> 0:04:43.280000 of a root port is always a designated port. 0:04:43.280000 --> 0:04:46.480000 So on a point-to-point connection like this, once I identify the root 0:04:46.480000 --> 0:04:50.220000 port, I know the other side has to be a designated port. 0:04:50.220000 --> 0:04:54.480000 Now, I still need to figure out this link right here. 0:04:54.480000 --> 0:04:56.700000 So let's figure that out. 0:04:56.700000 --> 0:05:03.720000 Okay. So between these two switches, 43, 44 and switch X, who is going 0:05:03.720000 --> 0:05:06.620000 to be the designated port on that wire? 0:05:06.620000 --> 0:05:11.840000 Well, 43, 44 is going to send down a BPDU. 0:05:11.840000 --> 0:05:21.820000 And his BPDU is going to say, hey, my cost to the root is four, because 0:05:21.820000 --> 0:05:23.660000 that's his root port. 0:05:23.660000 --> 0:05:26.780000 It's a gigabit ethernet link directly to the root, which is a cost of 0:05:26.780000 --> 0:05:29.040000 four. That's why he's going to say his cost is. 0:05:29.040000 --> 0:05:34.720000 Now switch X, the best cost he can come up with based on his root port 0:05:34.720000 --> 0:05:41.200000 is a cost of 19 to reach his neighbor, because this black line is fast 0:05:41.200000 --> 0:05:44.680000 ethernet, and his neighbor is four. 0:05:44.680000 --> 0:05:49.680000 So his root port is actually four plus 19, which is 23. 0:05:49.680000 --> 0:05:52.240000 So that's the best he can advertise. 0:05:52.240000 --> 0:05:58.840000 So in this case, 43, 44 is clearly the winner, because four is lower than 0:05:58.840000 --> 0:06:07.480000 23. So 43, 44, his port will be the designated port in charge of sending 0:06:07.480000 --> 0:06:16.760000 down BPDUs. Now, what about on this link right here? 0:06:16.760000 --> 0:06:27.440000 Well, so bridge 44, 44, his cost of the root bridge is 19. 0:06:27.440000 --> 0:06:29.920000 So that's what he's going to advertise. 0:06:29.920000 --> 0:06:34.740000 And once again, switch X, the best he could do is 23. 0:06:34.740000 --> 0:06:36.580000 That was his cost. 0:06:36.580000 --> 0:06:43.220000 So we end up seeing that port zero slash two right here is our designated 0:06:43.220000 --> 0:06:50.480000 port. So the same thing is going to happen over here on the right. 0:06:50.480000 --> 0:06:55.660000 Switch 44, E4, his cost of the root is four. 0:06:55.660000 --> 0:06:57.960000 That's what he's going to advertise. 0:06:57.960000 --> 0:07:01.980000 The best switch X can do is 23. 0:07:01.980000 --> 0:07:08.040000 So this will be our designated port. 0:07:08.040000 --> 0:07:14.640000 So now we have figured out our designated ports. 0:07:14.640000 --> 0:07:18.620000 Just erase some of the stuff here so it's a little bit clearer. 0:07:18.620000 --> 0:07:28.460000 Now we know who our designated ports are, as you can see. 0:07:28.460000 --> 0:07:36.560000 But that still leaves us with the question of what's the final state of 0:07:36.560000 --> 0:07:38.720000 these interfaces right here? 0:07:38.720000 --> 0:07:41.860000 Well, we can surmise one thing. 0:07:41.860000 --> 0:07:47.500000 Those interfaces are not root ports and they're not designated ports. 0:07:47.500000 --> 0:07:49.620000 So they have to be one of two things. 0:07:49.620000 --> 0:07:54.340000 They are either alternate ports or backup ports. 0:07:54.340000 --> 0:08:00.720000 Regardless of which one they are, we know they're in the discarding state. 0:08:00.720000 --> 0:08:09.360000 Discarding, which is the same thing as blocking. 0:08:09.360000 --> 0:08:12.400000 For those of you familiar with that terminology. 0:08:12.400000 --> 0:08:16.440000 Now before we go into the difference of what is the difference between 0:08:16.440000 --> 0:08:18.240000 alternate and backup. 0:08:18.240000 --> 0:08:22.420000 One other thing I want to point out about designated ports that's important 0:08:22.420000 --> 0:08:32.960000 to know. Before rapid spanning tree came along, BPDUs were only created 0:08:32.960000 --> 0:08:35.480000 by the root bridge. 0:08:35.480000 --> 0:08:40.520000 Once the root bridge created BPDU and let it go, that BPD was forwarded 0:08:40.520000 --> 0:08:43.480000 by non-root bridges. 0:08:43.480000 --> 0:08:48.720000 Now there could be situations temporary, hopefully, situations where the 0:08:48.720000 --> 0:08:52.520000 root bridge would not be able to send a BPDU. 0:08:52.520000 --> 0:08:56.220000 Like maybe the root bridge, his CPU was really, really high for a few 0:08:56.220000 --> 0:09:00.740000 seconds. Like maybe for six seconds or 12 seconds, his CPU was at like 0:09:00.740000 --> 0:09:06.420000 99%, something bad was going on and he couldn't create a BPDU. 0:09:06.420000 --> 0:09:11.600000 So in classic spanning tree, if the root bridge was not sending BPDUs, 0:09:11.600000 --> 0:09:13.860000 nobody had anything to forward. 0:09:13.860000 --> 0:09:15.660000 There was nothing going on. 0:09:15.660000 --> 0:09:22.060000 Well, if that happened, so let's say I am a switch and the root bridge 0:09:22.060000 --> 0:09:24.280000 is like five switches away from me. 0:09:24.280000 --> 0:09:28.220000 Let's say I go through you to get to the root bridge. 0:09:28.220000 --> 0:09:31.800000 So my connection to you, this is my root port. 0:09:31.800000 --> 0:09:33.440000 You are the designated ports. 0:09:33.440000 --> 0:09:35.820000 Your job to forward those BPDUs to me. 0:09:35.820000 --> 0:09:40.720000 All of a sudden I say, hey, haven't gotten any BPDUs in a while. 0:09:40.720000 --> 0:09:42.400000 What's going on? 0:09:42.400000 --> 0:09:44.660000 Now I have a question. 0:09:44.660000 --> 0:09:46.640000 Did the root bridge fail? 0:09:46.640000 --> 0:09:51.340000 Did you fail? You know, maybe I have electrical connectivity to you, but 0:09:51.340000 --> 0:09:52.800000 maybe something's wrong with you. 0:09:52.800000 --> 0:09:59.300000 I don't know. So in rapid spanning tree, they said, hey, let's do this. 0:09:59.300000 --> 0:10:04.540000 Once a port is elected as a designated port, even if it's not on the root 0:10:04.540000 --> 0:10:13.860000 bridge itself, that port must always send BPDUs as keep-a-lives. 0:10:13.860000 --> 0:10:15.460000 Say, what are you talking about, Keith? 0:10:15.460000 --> 0:10:16.900000 Well, here's what we're talking about. 0:10:16.900000 --> 0:10:22.260000 If the root bridge was behind you, if that root bridge stops sending BPDUs 0:10:22.260000 --> 0:10:27.080000 for a couple of seconds, it's still your job to basically pretend as if 0:10:27.080000 --> 0:10:31.920000 he was alive and send BPDUs to me. 0:10:31.920000 --> 0:10:34.740000 Now here's how this worked. 0:10:34.740000 --> 0:10:39.020000 In classic spanning tree, where the only one who was allowed to create 0:10:39.020000 --> 0:10:44.900000 BPDUs was the root bridge, in classic spanning tree, the hello time for 0:10:44.900000 --> 0:10:49.420000 BPDUs was every two seconds. 0:10:49.420000 --> 0:10:56.100000 But there was a huge grace period if some seconds went by and the root 0:10:56.100000 --> 0:10:59.600000 bridge did not transmit BPDUs. 0:10:59.600000 --> 0:11:04.860000 That was called the max age timer. 0:11:04.860000 --> 0:11:07.920000 And by default, that was 20 seconds. 0:11:07.920000 --> 0:11:14.320000 So in classic spanning tree, I was expecting you, my neighbor, to forward 0:11:14.320000 --> 0:11:16.600000 me those BPDUs every two seconds. 0:11:16.600000 --> 0:11:21.320000 If all the second, three seconds elapsed, then five seconds elapsed and 0:11:21.320000 --> 0:11:25.460000 nine seconds elapsed, and I'm not getting those BPDUs from you, I would 0:11:25.460000 --> 0:11:27.160000 wait up to 20 seconds. 0:11:27.160000 --> 0:11:30.940000 If 20 seconds expired and I said, oh, I haven't gotten a BPDUs from you 0:11:30.940000 --> 0:11:32.580000 in a while, 20 seconds. 0:11:32.580000 --> 0:11:34.800000 Then I'd say, time to make a change. 0:11:34.800000 --> 0:11:36.220000 Clearly, there's something wrong with you. 0:11:36.220000 --> 0:11:38.920000 I need to reconfigure my spanning tree here. 0:11:38.920000 --> 0:11:43.900000 Well, in rapid spanning tree, they said this. 0:11:43.900000 --> 0:11:48.580000 Now that I know that regardless of what's happening behind you, it's your 0:11:48.580000 --> 0:11:52.000000 job to send BPDUs to me, here's what we're going to do. 0:11:52.000000 --> 0:11:55.620000 We're going to do it the way pretty much every other protocol does it. 0:11:55.620000 --> 0:12:00.660000 Most protocols, not all of them, but sort of a general rule of thumb is 0:12:00.660000 --> 0:12:06.860000 that if a protocol relies on keep-alives or hello messages, generally 0:12:06.860000 --> 0:12:12.780000 speaking, after three hellos or three keep-alives are lost, usually that 0:12:12.780000 --> 0:12:14.660000 protocol says that's it. 0:12:14.660000 --> 0:12:15.680000 My neighbors did. 0:12:15.680000 --> 0:12:17.360000 Can't rely on him anymore. 0:12:17.360000 --> 0:12:19.800000 That's not a hard and fast rule, but that's a general rule. 0:12:19.800000 --> 0:12:22.180000 You'll find that in routing protocols a lot. 0:12:22.180000 --> 0:12:25.160000 Three missed keep-alives, three missed hellos, you're done. 0:12:25.160000 --> 0:12:28.740000 We're over. So rapid spanning tree took the same approach. 0:12:28.740000 --> 0:12:33.220000 It said, look, as long as you keep sending me BPDUs, I'm happy with you. 0:12:33.220000 --> 0:12:36.920000 But if I missed three of them, then you and I are done. 0:12:36.920000 --> 0:12:39.440000 I need to reconfigure my spanning tree. 0:12:39.440000 --> 0:12:44.520000 So now rapid spanning tree doesn't really rely on max age anymore. 0:12:44.520000 --> 0:12:47.860000 Now, hellos just have every three hellos, right? 0:12:47.860000 --> 0:12:51.800000 If I lose three hellos, which in this case would be six seconds of no 0:12:51.800000 --> 0:12:55.880000 hellos, then it's time for me to make a change. 0:12:55.880000 --> 0:12:59.240000 So that's a big difference between rapid spanning tree and the classic 0:12:59.240000 --> 0:13:05.680000 version of it. Loss of three BPDUs triggers an action on a downstream 0:13:05.680000 --> 0:13:12.320000 switch. So if we go back here, we can fill this out. 0:13:12.320000 --> 0:13:15.880000 And now we see our downstream ports are blocking technically discarding. 0:13:15.880000 --> 0:13:17.740000 So let's talk about those. 0:13:17.740000 --> 0:13:25.000000 So there are two different types of non-designate ports in the world of 0:13:25.000000 --> 0:13:26.300000 rapid spanning tree. 0:13:26.300000 --> 0:13:30.920000 Alternate ports, which means you've received a superior BPDU on a non 0:13:30.920000 --> 0:13:37.660000 -root port with a different sending bridge ID and backup ports. 0:13:37.660000 --> 0:13:43.320000 So let's just look at the in a sort of a visual sense what the difference 0:13:43.320000 --> 0:13:46.420000 is between these two. 0:13:46.420000 --> 0:13:54.220000 All right. Let's see here. 0:13:54.220000 --> 0:13:56.660000 So how is this going to work? 0:13:56.660000 --> 0:14:01.880000 Okay, so here we have our root bridge. 0:14:01.880000 --> 0:14:07.980000 Support 0 slash 4 is going to be my root port. 0:14:07.980000 --> 0:14:16.260000 And port 0 slash 3 now, it says, all right, 0 slash 3. 0:14:16.260000 --> 0:14:17.880000 I'm not a root port. 0:14:17.880000 --> 0:14:19.580000 I'm not a designated port. 0:14:19.580000 --> 0:14:24.440000 So I need to pick between alternate and backup. 0:14:24.440000 --> 0:14:26.140000 So how do I pick that? 0:14:26.140000 --> 0:14:31.100000 Well, when a BPDU comes down to me, here comes my BPDU. 0:14:31.100000 --> 0:14:33.560000 Or I should say A BPDU. 0:14:33.560000 --> 0:14:36.540000 I look at the sending bridge ID field. 0:14:36.540000 --> 0:14:47.440000 Okay, in this case, the sending bridge ID is this. 0:14:47.440000 --> 0:14:51.840000 I compare it with my own bridge ID and I simply ask myself a very simple 0:14:51.840000 --> 0:14:55.720000 question. Are they the same or are they different? 0:14:55.720000 --> 0:14:57.720000 In this case, the answer is clear. 0:14:57.720000 --> 0:14:58.680000 They are not the same. 0:14:58.680000 --> 0:14:59.800000 They are different. 0:14:59.800000 --> 0:15:04.660000 So because I received a BPDU from a switch that's not myself, I will put 0:15:04.660000 --> 0:15:08.220000 this port as an alternate port. 0:15:08.220000 --> 0:15:15.940000 Alternate. And then I'll put it into the discarding state, which is the 0:15:15.940000 --> 0:15:18.000000 same as blocking. 0:15:18.000000 --> 0:15:23.640000 All right. Now, things get a little bit tricky here. 0:15:23.640000 --> 0:15:29.040000 Because here, let's say I take a BPDU. 0:15:29.040000 --> 0:15:34.540000 And I forward it out, zero slash one, into this server, which is running 0:15:34.540000 --> 0:15:38.440000 VMware or something, which has a V switch in it. 0:15:38.440000 --> 0:15:43.200000 Well, a V switch operates kind of like a hub. 0:15:43.200000 --> 0:15:45.680000 It's not really, it's not doing spanning trees. 0:15:45.680000 --> 0:15:50.340000 So if I actually send a BPDU into a V switch, guess what's going to happen? 0:15:50.340000 --> 0:15:54.500000 I'm going to see that same BPDU pop out the other side. 0:15:54.500000 --> 0:15:59.220000 And same thing here, when zero slash two, when he sends in a BPDU, it's 0:15:59.220000 --> 0:16:01.100000 going to pop out the other side. 0:16:01.100000 --> 0:16:08.780000 So now my switch on the bottom there, he's receiving two BPDUs. 0:16:08.780000 --> 0:16:12.920000 And he says, well, I can't have both zero one and zero two in the forwarding 0:16:12.920000 --> 0:16:15.840000 state, because if they were, I'd have a bridging loop. 0:16:15.840000 --> 0:16:17.920000 I have to block one of these. 0:16:17.920000 --> 0:16:21.680000 So the next thing he says is, oh, okay, well, let me look at the cost. 0:16:21.680000 --> 0:16:24.300000 Well, both of these BPDUs came from him. 0:16:24.300000 --> 0:16:26.560000 So the cost is identical. 0:16:26.560000 --> 0:16:29.340000 It's the cost of his root port, whatever that is. 0:16:29.340000 --> 0:16:31.300000 Cost is not going to help him. 0:16:31.300000 --> 0:16:35.440000 So now he looks at the sending bridge ID and says, oh, wait a second. 0:16:35.440000 --> 0:16:37.860000 Both these BPDUs have the exact same name. 0:16:37.860000 --> 0:16:41.860000 They're me. They're my own bridge IDs. 0:16:41.860000 --> 0:16:42.800000 So this is okay. 0:16:42.800000 --> 0:16:46.420000 Well, I'm going to have to end up blocking one of these ports. 0:16:46.420000 --> 0:16:47.940000 Lower is better. 0:16:47.940000 --> 0:16:50.540000 So I'm not going to block the port that's lower. 0:16:50.540000 --> 0:16:55.620000 So I will keep the lower port as a designated port. 0:16:55.620000 --> 0:17:00.940000 That's the one they'll be forwarding. 0:17:00.940000 --> 0:17:04.080000 But I'm going to block or I'm going to say, I'm going to put this port 0:17:04.080000 --> 0:17:06.880000 here into the discarding state. 0:17:06.880000 --> 0:17:12.600000 And I'm going to mark that as a backup port. 0:17:12.600000 --> 0:17:19.340000 So notice both backup and alternate go into the discarding state. 0:17:19.340000 --> 0:17:23.280000 The only difference between them is one is discarding because you received 0:17:23.280000 --> 0:17:25.620000 a BPU from an upstream switch. 0:17:25.620000 --> 0:17:30.220000 The other is discarding because you actually received your own BPDU reflected 0:17:30.220000 --> 0:17:32.160000 right back to you. 0:17:32.160000 --> 0:17:35.180000 Which could happen in an environment like this, where you're connected 0:17:35.180000 --> 0:17:39.640000 via a couple of different nicks into a single V switch. 0:17:39.640000 --> 0:17:48.480000 So that concludes this discussion about designated ports and discarding 0:17:48.480000 --> 0:17:50.380000 ports and the differences between them.