So now that we've finished setting up our VLANs, setting up our trunks, taking a look at VTP as well as inter-VLAN routing, it's now time for us to dive into a discussion on spanning tree protocol.
We're going to spend quite a bit of time in spanning tree protocol because there are a lot of different things we need to be aware of.
One being the algorithm. Two being how we can manipulate that algorithm. So that way there, if on the exam we have to manipulate the algorithm in some way, shape, or form, we have the ability to do so.
But the only way you're going to be able to achieve the desired result that is expected to be on the exam is to have a thorough understanding of the algorithm.
So we're going to start off with an algorithm deep dive. This is something that we do in CCNA.
So for many of you, it's going to be a review. For some of you, it might be new. Or for some of you, it might be something you haven't done in ages.
So it's a learning process all over again for those of you who haven't looked at this algorithm in 20 years, let's say, as an example.
Then we'll do a little bit of configuration and manipulation today. So that way you can learn how to manipulate it.
We'll look at a few different features that we need to be aware of for the exam.
We'll look at multiple Spanning Tree Protocol as well. So a lot of stuff here on Spanning Tree Protocol.
All right. With that said, let's dive into Spanning Tree Protocol.
So when you look at our environment so far that we have, we have it set up right now.
So that way there, this is all Layer 3 and this is all Layer 2.
So where is Spanning Tree Protocol going to be running for us? It's going to be running in this part of the environment here.
That's where it's going to be running. It's not going to be running up here.
So whenever you're dealing with Layer 3 connections, Layer 3 links, Layer 3 interfaces, Spanning Tree Protocol is not running on those interfaces.
It's running on our Layer 2 interfaces that we have in our environment.
So we are focused on this area. Now, when you look at this environment, we have quite a bit of redundancy.
We have redundant distribution layer switches. We have redundant links between our distribution layer switches.
We have redundant links between the distribution layer switches and the access layer switches.
And we want redundancy because redundancy is going to eliminate single points of failure for us.
So that way there, if one of our links go down, one of our switches go down,
we'll have an alternative path that we can utilize through that Layer 2 network to get the traffic from our end users out to wherever they are trying to go.
Maybe it's the data center. Maybe it's the Internet.
But because of the way our switches behave, this redundancy is actually a problem. It's actually an issue.
That's right. Because of the way our switches behave, the redundancy is actually a problem. It's actually an issue.
Recall that switches flood unknown unicast traffic, meaning if the MAC address or the destination MAC address of the frame is not in the MAC address table,
you flooded out all ports except the port it came in on. Broadcast frame, destination MAC address is FFFFFFF.
What happens to that? Flooded out all ports except the port it came in on.
Because of this behavior and the redundancy we have, this can cause what is known as a broadcast storm.
This can cause MAC address table instability. This can lock up our network. Now, why is that?
Well, let's say you have a PC who sends out a broadcast frame or an unknown unicast frame.
Flooded out all ports except the port it came in on.
So, what happens is that your switch multiplies that frame. That's normal behavior for both of these. Multiply it.
So, in this case, 1 became how many? 6. 1, 2, 3, 4, 5, 6. So, 1 became 6.
Now, obviously, when PC2 gets it, if it's not for PC2, it drops it. If PC3 gets it, it's not for PC3, it drops it. That's fine.
That's behavior, normal behavior. That's perfectly fine. That's what we expect.
So, let's focus on these four right here. So, these four right here are going to end up arriving at the other side of their links.
Let's focus on this one right here. What happens when that one arrives?
Well, if it's unknown unicast or broadcast, what has to happen? Flooded out all ports except the port it came in on.
So, this one has to be flooded out, flooded out, flooded out, flooded out, flooded out, flooded out, flooded out.
So, 1 becomes how many? 7. 1, 2, 3, 4, 5, 7 in this case.
Now, focus on this one right here. 1 came in, but then it's got to get flooded out, flooded out, flooded out, flooded out.
So, another 1 becomes 7. So, now we have a total of 14 on the network.
So, what started out as 1 now is 14.
And so, just imagine now as they start arriving inbound here and get multiplied out and arrive inbound here and get multiplied out.
So, now you've got another 14 potentially plus another 14.
Next thing you know, you've got 2830 on the network.
So, that one frame has been duplicated how many times and multiplied how many times?
And now, imagine just another PC sending out a broadcast framework, unknown, unicast, etc., etc., etc.
So, you've got a massive now amount of traffic on the network that's your broadcast storm.
And it's looping indefinitely. It's going around and around and around and around, around, oops, around and around and around and around, around and around and around and around.
Right? So, that's what's happening.
Why does this never end? Why does this never time out?
Because in our Ethernet frame, there is no mechanism that times it out.
Now, there isn't a packet. If you recall, the packet has a time to live field that gets decremented every time a router routes the packet.
But are we routing here? No, we're switching.
So, is anything decrementing the time to live? No.
Is anything checking the time to live? No.
So, what does that mean? This frame will flood indefinitely.
Therefore, multiplication, multiplication, multiplication, eventually there's too much traffic on the network, saturates the network, network crashes on you.
Also, MAC address or MAC table instability problems, what does that mean?
Well, if this is the source MAC, let's call it just, our source MAC is 0011, 0011.
When the frame comes in, ASW1 associates the MAC address with that port.
And then what? We flood, we flood, we flood, we flood as an example.
So, when the frame comes in this port, the ASW1 associates it with that port.
But when the next frame comes in, then it's got to change it to that port.
And let's not forget, when it comes around this way, then it's got to change it to that port.
Oh, no, now that, nope, no, now that port, now that port.
So, you see how it keeps having to change?
And then when it gets flooded back down this way, now this MAC address is known on this port.
Whoa, wait a second, that's not even where the PC lives.
So, you see how the MAC address table is going to be changed every time that frame comes in a port.
And that frame is going to be coming in all ports in this particular case.
So, MAC address table instability, it's never stable.
It's always changing, always adjusting for that source MAC address.
So, broadcast storm, MAC table instability problems, your network's going to lock up on you.
So, we need a way to stop all this from happening, and that's where spanning tree protocol comes into play.
Spanning tree protocol is a layer two loop prevention mechanism.
So, how do you stop the frame from living indefinitely on the network?
Well, don't allow that frame to end up in any type of loop.
Now, I mean, could it have been possible for Ethernet to have been designed in a way where there was a counter in the frame that would eventually time out,
and the frame could be dropped, and maybe we wouldn't need spanning tree protocol?
I mean, you know, they might have thought of it, and at the time just couldn't figure out how to do it.
I mean, maybe it's something we could do today.
I really haven't looked into it, because why?
Spanning tree protocol says, well, we're just going to make sure that the network behaves a certain way so the frame doesn't do this stuff.
That's all.
So, let's change the behavior of the network, and then we won't have this problem.
So, what does spanning tree protocol do?
It's going to identify how to stop this looping from happening in the environment,
and if that is prevented, then none of this will happen for this type of traffic.
So, let's be clear here.
Knowing unicast traffic, so traffic where we know the actual destination MAC address, is not going to cause loops, no matter what.
Even if spanning tree protocol wasn't there.
It's this type of traffic that is the reason why we end up in the problem we have.
So, spanning tree protocol was designed way back in the day.
We're talking about the 80s.
The 80s, that's right, 1980s, by Radia Perlman, when she was working at Digital Equipment Corp.
Not exam relevant.
Don't worry about that.
All right, but eventually it was standardized as IEEE 802.1D in 1990.
So, with the multitude of Ethernet networks and Ethernet interfaces and Ethernet traffic and frames that were floating around a network,
Radia Perlman saw a problem as the networks grew, and that was the bigger the networks grew, the slower they became, the more problems you had.
Why was that?
Well, traffic just kept exponentially multiplying, and as a result of that, we had what?
We had broadcast storms, MAC address table instability.
So, with spanning tree protocol, Radia came up with a way to stop it all.
So, and the whole premise behind it is identify ports to block so that loops will be eliminated.
It's as simple as that.
Identify ports to block so that loops will be eliminated.
So, in this case, if we block all these ports, then the loops will be eliminated.
So, now, as you can see, if we send out a broadcast frame, flood, flood, flood, that's it.
Now, it arrives up here, and yes, it'll flood, flood, flood, flood, flood, flood, flood.
But look, can't get in.
Can't get in.
Therefore, this is the only one that survives.
It's the only one that survives.
Okay?
And then, again, flood, flood, flood, flood.
Oop, can't flood out the Xs, so can't go that way.
So, now, again, can't get in.
Can't get in.
So, there's only one path the traffic can take.
So, with spanning tree protocol, you identify ports that need to be blocked so that loops are prevented.
Therefore, there ends up being what?
A single, a single loop-free path in your network.
A single loop-free path in your network.
So, essentially, what it does is it eliminates all your redundancy, doesn't it?
It eliminates your ability to use all your redundancy.
So, it doesn't matter whether I have one link there, two links there, three links there, four links there, 10 links there, 100 links there.
I can really only use one when it's all said and done.
Same thing here.
Doesn't matter how many links I have.
In the end, I can really only use one potentially.
And in this case, I'm using neither of them.
So, that's why in a previous discussion, we said spanning tree protocol blocks like 50 plus percent of your links.
That's right.
It blocks 50 plus percent of your links.
That's a lot.
But the thing is, is if one of these links end up failing or having a problem, let's say this one here fails.
It fails.
Well, then, this one would become unblocked and we could use that one.
So, the redundancy is there.
It's just not usable unless there is a failure, okay?
Now, I'm going to teach you later on today about something called Ether Channel.
Ether Channel is a way that we can bundle links together, as Andrew has pointed out.
So, if I can bundle those links together, what does that give me the opportunity to do?
It gives me the opportunity for spanning tree protocol to think it's one link as opposed to two links.
And we'll see how that changes this environment for us and how we'll be able to use these links.
So, if you have multiple links between your switches and you're not Ether Channeling them together, then you're only using one link at a time.
If you're Ether Channeling them together, you're going to be able to use more than one link at a time with spanning tree protocol.
All right?
So, spanning tree doesn't ignore it.
Spanning tree is being tricked into thinking it's one link instead of individual links, okay?
It's not ignoring it.
It's essentially being tricked into thinking it's one link when it's all said and done.
All right?
So, what I want you to realize, too, now, is that spanning tree protocol is not just about loop prevention, okay?
Most of us learn about it that way through other means, through other instructors, through whatever.
But I hate stopping at that point because you're not getting a true picture, okay?
Yes, it's a loop prevention mechanism.
Yes, it prevents those broadcast storms.
But what else does it do?
It controls the flow of traffic in our layer 2 infrastructure.
You see that now?
I told you here that with the ports being blocked versus unblocked, doesn't spanning tree protocol control the flow of traffic?
Traffic must flow this way.
There is no exception.
Why?
Because the blocked ports versus unblocked ports.
Meaning that if your ports that are blocked are not the optimal ports to block in your environment,
that means you have suboptimal layer 2 forwarding in your environment, which may not be good.
You may be getting less performance than you should truly be getting in your environment.
Think about your layer 3 environment.
Give me an example of a protocol you use in your layer 3 environment to control the flow of traffic.
Give me an example.
Okay, you could use static routes, right?
That's not a protocol, but, you know, yeah, OSPF is a protocol.
Absolutely.
What else?
EIGRP could use ISIS, right?
So those are protocols.
So think about your layer 3 environment using dynamic routing protocols to control the flow of traffic, right?
Well, what protocol controls your layer 2 flow of traffic?
Spanning tree protocol.
Yeah.
So if it's designed incorrectly or implemented incorrectly, is it possible that traffic could do this?
Sure.
Yeah.
And I have had that issue once that I had to solve.
That's not good, right?
Because we don't want to traverse the layer 2 network multiple times just to come in and out.
Remember, north-south traffic flow.
Not north-south-north-south traffic flow.
No, just north-south traffic flow.
That's all we want to do, folks.
All right?
So just keep that in mind as you evolve your knowledge and level of expertise with various protocols.
Start understanding them more about not just what you might read as their primary purpose, like loop prevention,
but what else do they ultimately control and dictate in your environment?
So now how does spanning tree protocol figure out what ports to block?
Well, we use what are called bridge protocol data units, BPDUs, bridge protocol data units.
These messages are sent every two seconds by default.
And here's an example of what the BPDU might contain.
So I send BPDUs at what?
Every port.
Every two seconds.
Same thing.
Whether their port is blocked or not, we need to be sending BPDUs.
Why?
So that way there we have the opportunity to build the network properly, meaning figure out what the block ports are.
Figure out what the forwarding ports are.
And if anything changes from the last BPDU to this new BPDU, we can make adjustments.
But if nothing has changed and the information is still the same, then we leave it as it is.
So the goal here is that every two seconds the BPDU we receive on an interface from another device is the same, is the same, is the same.
We want spanning tree protocol to be boring because if it's boring, it's stable.
If it's not boring, that means there's changes.
If there's changes, that means our spanning tree environment is not stable.
We want a stable environment.
So we really want the BPDUs to be the same all the time, every two seconds, because if anything changes, that means we have to converge.
We have to adjust.
We have to make maybe unblock this, block this, okay, or unblock this and block this.
So when it's all said and done, the end result is this shouldn't be changing all the time.
If it is, you've got stability issues in your Layer 2 environment.
So things we'll be focused on here as we continue our discussion are things like the root bridge ID, the root path cost, the sending bridge ID, the sending port ID, the max, the message age, max age, right, definitely the max age, 20 seconds.
We'll talk about that more later.
The hello time is two seconds, so that's what it is right there, hello time.
And then our forward delay time is 15 seconds.
So numbers I would want you to know for the certification exam.
So they'll come up again later on.
So all of this information is going to be used to build our spanning tree topology.
Now, we have to take a moment to understand that Cisco's implementation of spanning tree is different than 802.1D.
For example, you've got 802.1D, which is the industry standard for spanning tree protocol, and rapid spanning tree protocol is 802.1W.
Cisco doesn't refer to them this way.
We refer to them as per-VLAN spanning tree plus and rapid per-VLAN spanning tree plus.
Now, what you need to recognize about this is that they are significantly different, meaning they are not compatible with each other.
So if there are products out there you are using that are using these versions, well, they're not compatible with Cisco's versions, and Cisco does not use these versions at all.
Cisco uses these versions.
So you would never mix and match Cisco switches and non-Cisco switches together because Cisco switches use these, non-Cisco switches would use these.
Now, there is another protocol we'll be talking about today that allows you to mix and match different vendor switches like Cisco switches with non-Cisco switches.
We'll mention that later.
We brought it up at the end of yesterday's session, but we'll definitely talk about it today.
But the biggest difference you need to realize here is that when it comes to Cisco's implementation, Cisco is not blocking ports physically.
That's right.
They're not.
See, what Cisco does is they block ports logically on a VLAN by VLAN basis.
So with 802.1D and 802.1W, you would end up with one giant tree like you see here, regardless of the number of VLANs you have.
So if I had 10 VLANs, this is what the topology would look like for all 10 VLANs, and you can't change that.
Okay, but with Cisco, we can manipulate our trees on a VLAN by VLAN basis.
Let me jump ahead to a slide we'll talk about later or show you later.
But for right now, you'll see that I could have two different trees.
I could have my purple tree here, and I could have my red tree.
Two totally different trees.
Look how some ports are blocked for red but unblocked for purple.
So if it has an RP, it means it's unblocked for red, but it's blocked for purple.
If it has an RP, it's unblocked for purple but blocked for red.
So we're blocking logically.
So I can use a multitude of links based on a VLAN by VLAN basis in a Cisco environment because we're not blocking physically.
We're blocking virtually with Cisco's implementation.
So what we have now is we have a multitude of different protocols.
So 802.1D, not functional on Cisco devices, right?
This is the original industry standard implementation spanning tree protocol.
You get one tree, one spanning tree topology blocking your physical ports.
Doesn't matter how many VLANs you have.
One VLAN, there's your tree.
A hundred VLANs, you get one tree.
Every VLAN follows that exact same tree.
Can't change that.
Can't adjust that, okay?
Where Cisco's implementation says we're going to give you one tree for each and every single one of your VLANs.
So if you have 200 VLANs, we're going to give you 200 trees.
And as a result of that, you can manipulate each tree any way you want, and it only affects that tree.
So if I want this tree to use these links, I can.
If I want this tree to use these links, I can.
If I want these, you can control the flow of traffic on your Cisco devices in your layer 2 network on a VLAN by VLAN basis.
So these are not compatible with each other, as I was saying, because they see the trees differently,
and the numbers they use for electing, for example, like the root bridge are calculated differently,
and therefore, you can't use a non-Cisco switch that's running 802.1d with a Cisco switch running Pre-VLAN Spanning Tree Plus.
Now, you can plug them together, and it's going to look like they're working properly,
but the problem is that your Cisco switch sees the spanning tree topology differently than the non-Cisco switch,
and that's why it doesn't work, which means you could have loops in some of your VLANs and not even realize it.
These two are slow.
We really don't use them today anymore.
We would use something like 802.1w and Rapid Pre-VLAN Spanning Tree Plus.
So, again, same idea.
The industry standard version of Rapid Spanning Tree Protocol, but you still only get one tree.
That's it.
All the VLANs are bound by that tree.
We're blocking our ports physically, whereas Rapid Spanning Tree Protocol for Cisco is called Rapid Pre-VLAN Spanning Tree Plus,
and so this is what you would use on your Cisco devices, and you get one tree for each and every single VLAN,
and you can manipulate each and every single VLAN, every tree, however you want to to control your flow of traffic.
So, again, not compatible.
However, these two are compatible with each other, and these two are compatible with each other.
All that simply means is if you have a Cisco switch running Rapid Pre-VLAN Spanning Tree Plus connected to a Cisco switch running
Per-VLAN Spanning Tree Plus, then this switch, when communicating with this switch, will use Per-VLAN Spanning Tree Plus and not Rapid,
right, backwards compatible.
This one's backwards compatible with this one.
Likewise, this one's backwards compatible with this one, but anytime you have a Rapid device connected to a non-Rapid device,
the Rapid device will behave in a non-Rapid way with that device.
Keep that in mind for the exam, all right?
Now, the bottom example here, you can see this was created by Cisco, multiple Spanning Tree Protocol,
but then it became an industry standard called 802.1S.
So, if you use multiple Spanning Tree Protocol or 802.1S on a Cisco device or a non-Cisco device, they behave the exact same way.
So, this would be the protocol you would use anytime you have a Cisco device and a non-Cisco device connected together in a Layer 2 environment, right?
If you're using any of these other options, you're not going to get the results you think you are getting.
You want to go with 802.1S, multiple Spanning Tree Protocol, in those scenarios.
We'll also talk about the benefit of using multiple Spanning Tree Protocol when we get to the discussion that is specifically dedicated to it later on today.
But for right now, we'll leave it alone.
We'll leave it alone.
And what we're going to do is we're going to focus on our algorithm now.
That is the same algorithm used for all of these.
So, that way there, you'll understand them and you'll know them.
And then we'll get into some discussions on some of the features and functions of some of these different protocols as we go along and how we can manipulate them.
So, for each and every single loop, we got to find a port to block.
We block that port.
We break the loop.
And so, you got your block ports and then you've got other types of ports.
You got root ports that are in the forwarding state, designated ports that are in the forwarding state.
So, let's talk about our algorithm.
So, it's basically a four-step process.
You have to elect the root bridge.
Now, notice I'm saying bridge, bridge, bridge, bridge, protocol, data unit, root, bridge, right?
Why?
Because Spanning Tree Protocol was invented when bridges existed.
So, Ratio Perlman created Spanning Tree Protocol when bridges existed, not switches.
There were no switches at the time.
But switches are just more elaborate versions of bridges from back in the day.
Bridges had a small number of ports.
Everything was software-based.
Switches, lots and lots of ports today, hardware-based products and stuff like that.
So, root bridge, root switch, interchangeable nowadays.
Like you can see here, I said root bridge, put a star so you can see that.
But no, non-root switch, right?
Ratio Perlman's days, it was non-root bridge, okay, non-root bridge.
So, just showing you terms interchangeably.
So, if you do see bridge on the exam, then they're just following the actual technological name of things.
But you could see switch.
They could say switch on the exam, and I wouldn't want you to get thrown for a loop based on that.
Bridge and switch, interchangeable.
All right.
So, we're going to go through all of this together here.
First one, elect a root bridge.
Elect a root bridge on Cisco devices for each and every single VLAN, all right?
So, elect a root bridge for each and every single VLAN, therefore a root bridge for each and every single tree.
If these were non-Cisco switches, then they'd just be electing one root bridge.
That's it.
Now, what is the root bridge?
Why does it exist?
Why do we care about it?
Well, read this.
It says the switch that all other switches use as the reference point when building the spanning tree topology.
So, if you think about this for a second, if I had these four switches, and they were all interconnected together.
Let's just do this for fun.
Let's say they're all interconnected together.
If they don't all agree on who the reference point is or the root bridge is, then they're all going to come up with different results, okay?
So, for example, if each and every single one of them said, I'm the root bridge, then they would all come up with different results of which port should be blocked and which port should not be blocked.
If they all elected themselves as the root bridge, what would happen is no ports would be blocked.
That's what would happen in that case, okay?
But here's the deal, right?
All of these switches have to ultimately figure out, hey, we need a single reference point that we can then do our calculations from.
And if we all use that same reference point, then we'll all get the results we need that ultimately build a loop-free topology.
That's why we have the root bridge.
It's just a reference point for all of the calculations to start from.
So, that way there, the results are going to be consistent across all the switches in that environment.
How do we figure out who the root bridge is?
It's going to be the device with the lowest bridge ID, the lowest bridge ID.
So, what is the bridge ID?
It's a value that every single one of our switches will have in relation to spanning tree protocol.
And the bridge ID is made up of two parts.
It's made up of a bridge priority number and a MAC address.
You'll see here the bridge priority is a value from 0 to 65,535 with the default value being 32,768.
And then you have a MAC address.
This is known as the base Ethernet MAC address on our devices.
So, we type in show version and we scroll right down to the bottom.
Well, not right down to the bottom, but you'll see here something called the base Ethernet MAC address.
This is used on our devices for things like spanning tree protocol.
It's also used for LACP and a whole bunch of other protocols whenever we need to make decisions like we're trying to make right now.
So, this is not associated with any single port.
It's not associated with anything like that.
It is basically a chassis MAC address to represent this particular device for certain decision-making processes.
So, that is what's used in this particular case, that base Ethernet MAC address.
So, you have this bridge priority combined with the base Ethernet MAC address.
Now, whenever we're trying to do our election here to figure out who's going to be the root bridge, what's going to happen?
Well, we're going to send out BPDUs, send out BPDUs, BPDUs, BPDUs, BPDUs.
All the switches are sending out BPDUs.
So, they're all going to get each other's BPDUs.
And in the end, what's going to happen is they're going to be able to compare.
Compare what?
Compare things like the priority.
So, look, it says priority first.
So, we compare priority first.
And what's going to happen is the switches are going to try to figure out who has the what?
Lower priority.
The lower priority first.
If one switch stands out with the lowest priority, then it is the root bridge.
By default, they're all 32,768, the priorities.
So, what happens then?
To break the tie, to break the tie, they look at that base Ethernet MAC address.
Who has the lowest base Ethernet MAC address?
And the odds of you having two switches with the same base Ethernet MAC address are worse than you winning the lottery.
You have a better chance of winning the lottery than having two switches with the same base Ethernet MAC address.
Let's be clear about that.
And your odds of winning the lottery are pretty bad.
So, in the end, right, that lowest MAC address will be guaranteed to break your tie.
Now, before we actually do an example of this, let's understand why something like 802.1d is not compatible with Cisco's Purveyland Spanning Tree Plus.
It's because of the bridge priority.
It's one of the things.
When you look at an 802.1d bridge priority, it is 16 bits.
So, therefore, it's a value from 0 all the way up to 65,535.
And it can be any of those values.
And you can manipulate it any way you want.
So, it doesn't matter if it's VLAN 10 or 20 or 30 or 40.
That bridge priority is the same.
The bridge priority, right, is going to be for the entire device regardless of the number of VLANs you have.
Why? Because you only get one tree.
You only get one tree.
And all the VLANs are just going to follow this tree.
Okay, but remember, Cisco doesn't do that.
Cisco says, hey, we're going to give you a different tree for each and every single VLAN.
So, they need to be able to differentiate the different spanning tree messages for each and every single tree on a VLAN by VLAN basis.
So, their entire bridge priority is still 16 bits.
Okay, it's still 16 bits.
But now, look at the VLAN number is thrown in there.
So, your bridge priority on a Cisco device is going to be a bridge priority number with the VLAN number that is part of it.
So, how many possible VLAN numbers are there, folks, based on our discussion yesterday?
How many possible VLAN numbers are there?
Well, if you don't know, take 2 to the power of 12.
That will give you your answer.
2 to the power of 12 is 4096.
0 through 4095, as Conrad has pointed out.
0 through 4095.
So, when you now look at the bridge priority, I cannot manipulate this bridge priority like I could manipulate this.
I can manipulate this in increments of 1.
But here, because it's the top 4 bits, I can't do that anymore.
That's why we're no longer compatible.
Because if we look, for example, here, on a Cisco device, this might be my priority, 32,778.
How do we get that priority?
32,768 plus 10.
The VLAN number.
You see VLAN 10?
VLAN 10.
Okay?
So, 32,778 for a Cisco device means VLAN 10.
That's right.
32,778 actually means VLAN 10.
There is no other option.
That actually means VLAN 10.
Just like if we had 32,768 plus VLAN 20, then that would be 32,788.
This actually means VLAN 20 for our Cisco device.
But what about a non-Cisco device?
A non-Cisco device, something like 32,768, means 32,768.
Sorry, I meant 78.
Did I say 68?
78.
32,778, that means what?
That means 32,778.
On a Cisco device, that would mean 32,768 plus VLAN 10.
That's the difference.
So, they don't use those numbers the same way.
That's why you can't connect them together and get it to work properly.
Because one device is going to see the network one way, the other device is going to see the network the other way.
They're going to make different decisions.
You're probably going to end up with ports that should be blocked that aren't blocked, ports that are blocked that shouldn't be blocked.
Therefore, you maybe have some loops.
So, because you can only manipulate four bits in the 16, because you can't manipulate these,
those are set in stone based on the VLAN.
That means there's only so many possible combinations for this.
And those combinations would be this, either 0, which would be 0, 0, 0, 0, or 4,096 would be 0, 0, 0, 1,
or 8,192, which would be 0, 0, I want to go with 1, 0, and 12, 28 would be 0, 0, 1, 1, and so on and so forth.
So, you only have 16 possible values that you can manipulate or play around with.
And then you combine that with the VLAN number.
So, if it's VLAN 10, if it was 0 plus 10, then it would be 10, which is for VLAN 10.
If it's VLAN 20, it would be 20.
But if you've got 4,096, well, then you've got 4,096 plus 10, that would bring you up to 4,106, as an example.
And so, the device knows, because these are all the only combinations that exist.
It looks at a number, essentially, let's put it this way.
Let's say you had the number 20,490.
Your device looks at this number and says, okay, which one of these is closest?
It's this one right here.
Lowest, but closest.
Lower than this number, but closest.
It's that one.
Okay?
So, subtract 20,480 from 20,490.
So, 20,480, subtract it, and you get what?
10.
So, this is VLAN 10.
There you go.
That's the only option.
No other combination can give you VLAN 10.
It's not possible.
Right?
So, if it's 24,586, that would also be VLAN 10.
If it's, as we said, 4,106, that's also VLAN 10.
So, that's how it makes the reference.
That's how it does it.
Right?
You're not going to have to necessarily do that on the exam, but I'm just trying to really
get you knowledgeable about how all these decisions are being made in regards to our
algorithm when it works out.
So, let's go ahead and test you now on your understanding of electing the root bridge.
So, remember what we said.
Look at priority first.
If one has a lower priority, that's the root bridge.
If priorities are tied, then you got to look at the MAC address.
So, give it a try here.
Is ASW1 or is ASW2 going to be the root bridge if they were battling it out?
Chat in.
Remember, lower is better.
So, number one, ties are not allowed.
So, you always got to be able to break a tie with Spanning Tree Protocol.
All right.
So, let's look at our priority first, 32,778 versus 32,778.
When you look at the output of Show Spanning Tree, whenever you look at the bridge ID information,
this is the local device information.
Whenever you look, local device information.
That's what you're looking at.
All right.
Now, if you don't know how to look at the MAC address, you just read it left to right.
So, since we're tied, priorities tied, we got to use the MAC address to break the tie.
Start at the left.
D versus D, tied.
4 versus 4, tied.
A versus A, tied.
0 versus 0, tied.
2 versus 2, tied.
A versus A, tied.
6 versus 6, tied.
3 versus E, we have a winner.
E versus 3.
Now, those are hexadecimal values.
So, with hexadecimal, we got 0 through 9 and then A, B, C, D, E, F.
So, which one's lower?
Is 3 lower or is E lower?
Yep, 3 is lower.
So, this is our winner.
This is our winner.
All right.
So, definitely something that you need to be able to do for the certification exam.
You need to be able to go through this process of identifying first priority.
And if one of them stands out with the lowest priority, then that's your winner.
Don't even go any further than that.
But if two or more have the exact same lowest priority, then you're going to have to go ahead and start looking at the MAC addresses from left to right and knock them off one at a time, one at a time, until you get to the differentiator.
And then there's your winner.
And there's your winner.
All right.
So, let's go ahead and do this one.
Of these four devices now, ASW1, ASW2, DSW1, DSW2, who is going to be our root bridge in our demo topology?
All right.
If you don't know where to begin, and if you get overwhelmed on certification exams, the easiest thing for you to do is divide and conquer.
Divide and conquer.
And the best thing to do is to pick two at a time.
Just compare two at a time.
So, for example, let's do ASW1 versus ASW2.
So, priority, priority, tied, tied.
Let's start tied, tied, tied, tied, tied, tied, tied, tied, tied, tied, tied, tied.
Three versus E.
Okay.
So, now that we figured out that ASW1 is better than ASW2, all I have to do is knock that off the list.
Now, I go with ASW1, and let's go down to DSW2 as an example.
And let's look at priority.
Priority's tied.
So, we got to look at MAC address now.
So, we got four versus D. Stop right there.
Stop right there.
Four is lower than D, so now you are the weakest link.
Goodbye.
So, now we can look at DSW2 versus DSW1.
Look at your priority.
In this case, it's tied.
So, now we look at our MAC two versus four.
We can stop right there because two is lower than four.
Now we have our winner.
There's our root bridge.
See how quickly I was able to do that?
You want to be able to do it that fast for a certification exam,
be able to look at all the devices, look at that information,
and just go through it as quickly as possible and identify who that root bridge is.
You don't want to waste time on that.
Cisco expects you at this level to be able to do that without even thinking, essentially,
expanding to protocol.
So, what if we had this, for example?
The root bridge.
So, now this one is super simple because all you're doing is looking at priorities
and you're like, okay, wait a second, all the priorities are different.
Which one's lower?
We're good to go.
Now what?
Let's try this.
Who's the root bridge now?
So, when we look at priorities, well, you're too high.
You're too high compared to the other two.
So, now we're looking at these two.
They're tied.
Can't have ties.
So, now we've got to break the tie.
If we're working left to right, left to right, three versus E, three is lower, you're gone.
So, there you go.
There's some different examples of how you're going to approach it.
And then we'll see here that our root bridge is definitely DSW1.
And now I'm going to expand out and show you everything else that goes along.
In the previous screen, all we saw was this information here.
And we had to make our decision based on that.
But if you look here, when we look at the output of show spanning tree, when you look at all the information, look at the top.
See where it says root ID?
Root ID says what?
Well, this is the information of the root bridge.
It actually says the root bridge has this priority and this is its MAC address.
So, when you have all this information here, you can see that it's the same as this and this.
So, if you're looking at this output and that is the same as that, well, you can conclude that it's the root bridge.
But wait a second, it actually tells you, doesn't it?
Yeah, it says this bridge is the root bridge.
So, just different ways that you can identify that it's the root bridge.
Another way is all of this.
Every port on the root bridge is going to be a designated port.
We're going to get to that shortly.
And the forwarding state.
That is a must.
So, if they decided not even to give you this, and they said, which of the following is the root bridge?
Look for the device with every port as a designated port.
That is your root bridge.
And so, let's just take a quick peek at our switches in our environment.
And first of all, we'll type in show VLAN.
Nope, show spanning tree on ASW1.
And what I want you to see, first and foremost, you have a tree for every VLAN on your Cisco devices.
So, there's my tree for VLAN1.
Now, here's a tree for VLAN10.
Now, here's a tree for VLAN20.
Now, here's a tree for VLAN50 and VLAN100.
Because remember, we created a bunch of VLANs yesterday just for fun as we were manipulating different things.
So, all the VLANs you create, spanning tree will automatically create a tree for it for you as we go along.
So, we're just going to focus, though, on VLAN10 here.
So, I'll type in spanning tree for VLAN10.
We're running per VLAN spanning tree plus.
That's what IEEE means.
If you were running rapid per the VLAN spanning tree plus on your Cisco device, it would be RSTP.
That would show up there.
I'll show you that later, a little bit more.
But you'll see here that the root ID information is different than the bridge information.
Remember, the bridge information is the local device's information in this case.
So, if the root ID information is different than the local ID information, then that means you're not the root bridge.
That's one way that you can figure that out pretty quick.
Also, it doesn't say that you're the root bridge.
Instead, what does it say?
It says the root bridge has this priority and this MAC address, which is different than this.
Well, the priority is the same.
The MAC address is different.
But it also says your cost to get to the root bridge is four.
We'll talk about cost here momentarily.
But it tells you your cost to get to that root bridge is four.
The port you're going to use to get to the root bridge is port 47.
So, you can give it one size zero, size 47 on the device.
And if you come down here, you'll see that that port is actually known as the root port in this particular case.
More on that later.
These ports are designated ports in this case.
And notice how this one's blocked in this example.
But being able to read this and understand what you're looking at would be important for the certification exam.
So, so far, if this is the same as this, then you know you're the root bridge.
So, even if they omitted a lot of other information, how can you tell?
It's got the same information.
Or all the ports are designated as the root bridge.
So, we can look at this and say you're not the root bridge.
Why?
Because not all ports are designated, number one.
Number two, it doesn't say you're the root bridge.
Number three, the priority and addresses aren't the same.
So, a lot of different ways you can verify that.
And they might only give you one piece of the puzzle or one piece of that information.
But knowing that, all of those are possible ways to do it.
It will help you answer questions on the certification exam.
So, you never know how they're going to want to trick you on the exam.
All right.
So, that is our root bridge.
So, now that we've figured out who the root bridge is, what's our next step?
The next step is to find on all the remaining switches in that Layer 2 environment the root ports.
The thing about the root port is you always got to remember this.
And it's a way to check your work.
There can only be one root port for every other switch.
Okay.
So, the root bridge has zero root ports.
The root bridge, zero root ports.
But every other switch is going to have one and only one root port.
And what does the root port do?
The root port is the port on the switch that is the quickest way to get to the root bridge.
That's what it is.
It's the best way to get to the root bridge.
So, the best way to diagram this out is for you to stand on your switch.
Stand on it.
And then ask yourself, should I go this way, this way, this way, this way, this way, this way, or this way?
Well, we already know that we can't go this way because it's a dead end, a dead end, a dead end.
So, those are not going to be root ports at all.
And your switch would know that.
Why?
Because, remember, we've already gone through Step 1, electing the root bridge.
So, we know the root bridge is reachable out of one of these four ports.
We just have to figure out now which port is the best one to use to get to it.
And we'll label that as our root port.
So, when you look at this switch here, which is not going to be the same as this one because this one has different values pertaining to it
because this network is actually different than this one when it comes to MAC addresses and things like that.
So, the default MAC addresses, the bases in it on these actual devices are different than the ones that this diagram was built based on.
Just that way there we can show you how to do things later on.
But what I want you to realize is you can see, right, this one has a root port.
So, we've got to figure that out.
In this case, it was 47, but it's not going to be 47 in this diagram.
And we'll see why that is when we just simply do the math.
So, what do we have to do first and foremost?
We have to understand that the root port is selected based on something known as cost.
So, it's important for you to understand this concept of cost in regards to spanning tree protocol.
So, cost is based on interface values.
So, you'll see here that there's this thing called the short method.
The short method says if it's a 100-meg interface, it gets a cost of 19.
If it's a 1-gig interface, it gets a cost of 4.
If it's a 10-gig interface, it gets a cost of 2.
And then we have the long method that says if it's a 100-meg interface, it gets a cost of 200,000.
A 1-gig interface gets a cost of 20,000, and a 10-gig interface gets a cost of 2,000.
Your equipment, based on its age, the version of the operating system will determine whether the default short method or long method.
Short method was the original method that was used before long method existed.
So, short method is not actually a good option for today.
So, if you have older switches that are using short method,
you definitely want to make sure they're using the long method along with all your other switches.
And here's the reason why.
The short method, there's not enough room for higher-speed interfaces when it comes to cost.
Look at this.
1-gig is 4, 10-gig is 2.
So, let me ask you this.
What do you think the cost would be of a 2-gig interface?
What would the cost be of a 2-gig interface?
So, take a look at this number.
If a 1-gig is 4 and a 10-gig is 2, what would a 2-gig interface be?
What do you think?
Remember, lower is better.
Lower cost is better.
Yeah, right?
3, because it would have to fit in between, right?
2-gig is 3.
Okay, so what do you think the cost of a 3-gig interface is?
It's 3.
What about a 4-gig interface?
It's 3.
What about a 5-gig, 6-gig, 7-gig, 8-gig, 9-gig?
It is 3.
Well, that's a problem, right?
And you might be saying, well, why is it a problem?
Super simple.
I'll diagram it out for you.
Folks, right now, I have 2 1-gig links.
That's what I have, 2 1-gig links.
So, the cost of each of these links is what?
Each link has a cost of 4.
Pretty straightforward.
Cost of 4, cost of 4.
Pretty straightforward.
All right.
So, what happens, though, if we do an Ether Channel Bundle?
So, we did an Ether Channel Bundle now.
Spanning Tree Protocol sees 1 2-gig link.
So, what's the cost of our 2-gig link, according to Spanning Tree Protocol?
Cost is 3, we said.
Okay.
Let's go over here.
If we Ether Channel Bundle all of these together, we now have 1 4-gig link, according to Spanning Tree Protocol.
What's the cost of a 4-gig link?
It's 3.
Oops, that's no good now, because Spanning Tree Protocol is going to make a bad decision based on bad information.
What if we had 8 links?
1, 2, 3, 4, 5, 6, 7, 8.
Bundle them all together.
Now, you got 1 8-gig link, which equals a cost of 3.
You see the problem?
They're all treated the exact same way.
So, this is garbage nowadays for most of us, because most of us have links between our switches that are anywhere from 1-gig to 4-gigs to 8-gigs.
to 10-gigs to 40-gigs to 20-gigs, right?
And all of those would be treated with really low costs.
Really low costs.
Or, sorry, a cost of 3, not low cost, a cost of 3.
There's not enough room, okay?
So, long method is the way to go nowadays.
And how would you change to a long method?
Well, you'd want to do it on all your switches, because if you have short method on some, long method on the other, the costs don't make sense.
Right?
Because lower is always better.
So, if it's 4 on this device, but 200,000 on another device, that doesn't work.
That doesn't work.
It's got to be doing it the same way.
So, configure terminal, spanning tree, path, cost, method, and you just change it to long.
That's all you have to do.
Now, if you're using multiple spanning tree protocol, it automatically uses long.
Automatically.
So, as soon as you change this multiple spanning tree protocol, it uses long automatically for you.
But if you're using per-VLAN spanning tree plus or rapid per-VLAN spanning tree plus, it's using the short method.
Most cases by default.
But many of your new switches might be just defaulting to long.
Right?
But for the exam, right, be aware that if the scenario is about adjusting your cost to make room for your ether channel links, your higher speed links,
then just switching to a long method will solve your problem.
Do show span VLAN 10 now, you'll see.
And this is for the whole device.
It's not on a VLAN.
It'll affect all VLANs.
Now, you'll see that the cost is $20,000 for my what?
For my 10-gig links.
Oh, 1-gig link.
So, now that it's $20,000 for my 1-gig link, you'll see here that I have room in here now.
So, a 2-gig link, a 2-gig link is $10,000.
A 4-gig link would get a cost of $5,000.
An 8-gig link would get a cost of $2,500.
And then you got your 10-gig at $2,000.
And then your 100-gig would be $200, giving you room in between $200 and $2,000 for what?
20-gig links, 40-gig links, 80-gig links, up to 100-gig.
So, 100-gig gets $200.
And then your 1,000-gig links would get $20.
And your 10,000-gig links would get a cost of $2.
And then once we get higher than 10,000-gig links, then we're going to have to come up with a new calculation.
We're going to have to go to the super long method then and adjust the whole thing.
All right.
So, there you go.
So, cost is on an interface-by-interface basis.
So, we know we have a cost of 4.
We know we have a cost of 4.
Why?
They're all 1-gig links in this particular case.
All right.
What's another thing we have to be aware of then?
Let me clean this up.
Another thing we have to be aware of.
So, I'm just going to use short method for my calculation today.
But be aware that you might have to use either short or long on the certification exam for your calculations.
So, now what we need to recognize is that our cost is going to be cumulative.
Meaning that cost has to be added from there all the way back to the root bridge.
So, it's cumulative from you to the root bridge.
So, if we go to our BPDU really quickly, recognize that we have our root path cost listed in there.
Our root path cost listed in there.
So, when I send a BPDU, the root path cost indicates how far I am away from the root bridge.
So, DSW1 sends a BPDU, the root path cost is going to be what?
It's going to be a big old 0 in this case.
The root path cost is 0.
Why?
Because it is the root bridge.
You can't get any closer than being the root bridge.
So, anytime the root bridge sends out a BPDU, it says my root path cost is 0.
So, now I can take my number 4.
So, 4 plus 0.
That is my cumulative cost.
That's how I get that cumulative cost.
So, same thing here.
BPDU comes out this interface.
Root path cost of 0.
So, you've got 4 plus 0 for a grand total of what?
Total cost of 4.
So, now I know that there's a total cost of 4 here.
There's a total cost of 4 here.
But now, this is going to be different.
Why?
Because we have to realize that the BPDU is coming from DSW2.
So, my decision about going this way has to be based on decisions that DSW2 has made.
So, DSW2, let's say, has chosen to go this way, over to the root bridge.
So, what is the root path cost from DSW2 to get to the root bridge?
Well, root bridge would be saying my root path cost is 0.
DSW2 would have a value of 4 for its interface.
So, 4 plus 0 equals 4.
So, the cost to go from DSW2 to DSW1, DSW2 figured out is 4, just like over here.
Now, DSW2, when it sends its BPDU, it says my root path cost equals 4.
My root path cost equals 4.
So, now my 4 plus your 4 is the cumulative cost of 8.
And then my 4, because you're going to send out two BPDUs, my 4 plus your 4 equals a grand total of 8.
So, that's how the cumulative cost is calculated.
So, the root path cost has to be sent in that BPDU telling the downstream switch, hey, I am so far away from the root bridge.
So, then you take that number plus your interface number, you add them together, and you got your results.
So, we now know, based on this information, that we have a total cost, a cumulative cost of 4, of 4, of 8, and of 8.
That's what we have.
So, with that in mind now, we have to pick the lowest cost path.
So, the lowest cost path is going to be this one, and this one, not this one, and not this one.
So, we no longer have to worry about 47 and 48.
They are not good enough based on cost.
Now, we're left with two.
Why?
You cannot have ties.
No ties.
Anybody ever watch The Incredibles?
No capes.
Right?
Well, no ties right here.
So, if there's a tie in cost, now you have to look at this tiebreaker right here.
This tiebreaker says, look at the upstream bridge ID.
Upstream bridge ID.
So, upstream would mean up here.
So, what is the bridge ID of DSW1?
What is the upstream bridge ID?
Well, if we go back to this slide from before, we'll see that the bridge ID is 32,778 plus this MAC address.
That information is going to be in here.
Sending bridge ID.
So, sending bridge ID.
Sending bridge ID, because there's two different BPDUs, one for each of those links.
So, folks, which of these is going to have the lower bridge ID?
Well, if it's the bridge ID of DSW1, in this scenario, it's the same.
It's the same in this scenario.
That's right.
So, we have a tie again in this scenario.
So, to break the tie, we now have to look at what?
Lowest upstream port ID.
The lowest upstream port ID.
So, is that in the BPDU as well?
Yes, it is.
Look at this.
Sending port ID.
So, when DSW1 sends out its BPDU, there's a port ID in there.
For example, this port will be 128.21.
For example, this port will be 128.21, and this one's going to be 128.22.
Let's take a peek at that.
Go to DSW1 here as an example.
You'll see that it's listed right here.
128.21, 128.22.
If we go back to our slides, we'll see in our slides from this example, same thing.
128.21, 128.22 for this.
So, it sends its port ID in its BPDU.
So, now, when ASW1 has those BPDUs, it's looking at what?
Well, it figured out with the route path cost that its total cost was four.
Total cost was four, so we have a tie.
It then looked at the sending bridge ID.
It figured out that, oh, the bridge ID is tied in those two different BPDUs.
Then it looks at the sending port ID, and it says, oh, this one says 128.1.
This one says 128.2.
Therefore, this one is the winner and becomes my root port.
There you go.
That's it.
We're done.
The tie will always be broken with this every time because no two interfaces can have the same port ID.
Now, you might be asking, well, is it possible that the upstream bridge ID could be the deciding factor?
Well, the only way the upstream bridge ID could be the deciding factor, for example, would be in a situation if we had,
let's say this was an Ether Channel bundle here, this was an Ether Channel bundle here,
and let's say the total cost this way was eight and the total cost this way was eight.
So, if the total cost of each of those is eight, we have a tie.
Now, when we look at the upstream bridge ID, this bridge ID would be compared to this bridge ID.
Now, who would win in this case?
Well, obviously, it would be this one.
So, then this is the loser and we have our winner.
It's over.
So, you can see how bridge ID must be checked.
I've had in the past students say, well, we don't have to check the bridge ID because it is tied, but it's not always going to be tied.
Look at this scenario.
It wouldn't be tied if it was done this way.
So, pay attention to that on the exam.
Always go through cost, bridge ID, then port ID every time.
Don't cut corners unless you know for sure that you did not need to look at the bridge ID.
Be careful with that.
So, that's ASW1 down.
Let's go down to ASW2.
Stand on it.
I'm going to do this really, really quick now.
I'm going to do this really, really quick because it's the same step over and over and over again.
So, all you have to do is learn the steps.
That's it.
Just learn the steps.
You're done.
And then you just repeat them over and over and over again.
And you can practice them on the same picture, same diagram.
Because all you do is learn the steps.
Learn the steps.
Memorize the steps.
That's how you get through the algorithm.
So, in the end here now, what do we got?
I can go this way.
If I go this way, it's 4 plus 0, 4 plus 0, 4 plus 4, 4 plus 4.
Right?
So, we know that we got 8.
We got 8.
We got – whoa, what did I do?
I hit the subtitles button.
There we go.
All right.
Never done that before.
All right.
So, we got 4.
We got 4.
We got 8.
That's what we have.
So, we can eliminate these.
We don't matter anymore.
So, we got cost is tied, upstream bridge ID.
So, we know.
Look, this is when you know 100% it's going to be tied.
Why?
Because both of them are attached to the same device.
So, immediately you know that that's a tie.
There's no way that cannot be a tie in this scenario.
If both links go to the exact same switch, it's tied every time.
The bridge ID.
All right.
So, now we've got this, which is the port ID.
So, we got 128.23 and 128.24.
So, 23 is the winner.
So, you come back down to this side.
You follow it.
And you're like, this is the root port in this case.
All right.
So, then the same thing for this one.
So, we're going to stand on this switch.
We can go this way, this way, this way, this way, this way, this way, this way, this way.
We've got 4, 4, 4, 4, 8, 8, 8, 8.
Based on what we talked about before.
So, no good, no good.
We can eliminate those.
So, now it's between these four here.
So, again, they're all going to the same device.
So, this is going to be tied.
So, port IDs.
We got 128.17.18.19.20.
17 is the winner because it's the lowest.
There is my root port.
Let's solidify those right there.
Okay.
That's what you want to be able to do.
So, figure out who the root bridge is.
Figure out who the root ports are.
The only way to do that is come back.
If you're not familiar with that, come back.
Review.
Go through the steps.
Pause the video.
Write some things out.
Draw your own little diagram.
Do the math yourself.
That's how you're going to practice it.
Okay.
So, the 120.
We're going to come back to that Conrad a little later.
All right.
What does that actually mean?
But it's a number.
That number there is something you can manipulate to control the decision-making process,
and I'll teach you that today.
So, we're going to come back to that number.
All right.
So, now that we've figured out who the root port is, we're going to go ahead,
and we are going to take a look at the designated port now.
So, once you're done, you move on.
Once you're done, you move on.
Now we're on phase three, step three.
So, what is a designated port?
Well, first of all, you need one designated port for every single one of these.
You need one designated port for every single one of these.
What are these?
Links.
Connections.
Call them collision domains if you want to.
Call them segments if you want to.
Call them links if you want to.
Right?
Call them cables between switches if you want to.
The idea here is every single one of these need a designated port.
So, what does that mean?
It means one side has to have a designated port, and that's what you're figuring out.
Which side gets the designated port?
One, and only one per link.
So, when you position yourself, for example, on the link, you say to yourself,
is this going to be the designated port, or is this going to be the designated port?
And it's based on what?
Again, the lowest cumulative cost to the root bridge, just like we did with our root ports.
There's a few shortcuts here I want you to know about.
All ports on a root bridge are designated, and we saw that earlier.
All ports are designated.
So, immediately on an exam in the real world,
you don't have to do any math on any links that are connected.
Designated port, designated port, designated port, designated port,
designated, designated, designated, designated, designated.
Done.
You just eliminated all these links.
Now, you figured out the designated port here.
You figured it out here.
Here, here, here, here, here.
You don't have to worry about those links anymore.
It was that easy.
Also, it says here designated ports are always on the opposite side of root ports.
So, if you look at this scenario, I have a root port here.
This makes that automatically a designated port.
I have a root port here.
This makes that automatically a designated port.
I have a root port here.
This makes that automatically a designated port.
You might be saying, well, of course it does, Raymond.
It's the root bridge.
That's so silly.
No, but you got to think of a bigger environment.
What if I had another switch here?
So, we have three layers now.
Why?
Because we did.
Now, for this switch, we have a bunch of PCs connected here.
Which way are we going to go to get to the root bridge?
Well, we have no choice but to go this way.
It's the only way to go.
So, we know that this is going to be our root port.
Designated ports are always on the opposite side of root ports.
There you go.
Shortcut.
So, in the exam, if you see a topology that's something like this,
and this is the root bridge, and you figure out that this is a root port,
then you know this is a designated port.
You figure out that this is a root port, you know this is a designated port.
You know that automatically.
Shortcuts to help you get through questions faster and in the real world.
So, let's go ahead and actually figure out our designated ports in this scenario here.
That we have left.
So, we have this one left.
We have this one left.
We have this one left and this one left.
That's it.
So, what are we going to do?
We're going to stand on our link and we're going to ask ourselves,
if I walk this way, how far is it from here, this dot, how far from here to here?
How far?
That's what I want to know.
How far from there to there?
I don't care about the distance from here to here.
This doesn't matter.
I don't calculate that.
How far from ASW2 to DSW1 to the root bridge?
Well, we know based on the root port calculation that it's four.
So, that's already figured out.
It's four.
So, the next question is, if I walk this way, how far from here to here?
Again, it's four.
It might be different.
It could be three.
If it was three, let's pretend it's three.
If it's three, who's the winner?
We've already done, right?
Because cost is four versus three.
Lower is better.
We know it's three.
We're going to use three then.
So, this would be the winner and this would be the designated port.
That's how you figure it out.
But, in our case, cost is tied.
So, if cost is tied, what do you do?
Upstream bridge ID.
So, with the upstream bridge ID, who are we comparing here?
We're comparing the bridge ID of DSW2 to the bridge ID of ASW2.
That's what we're comparing right now.
So, cost is tied, but let's compare our bridge ID.
So, we said ASW2 and DSW2.
All right, folks.
Here's your chance to shine.
ASW2 versus DSW2.
Who has the lower bridge ID?
Go.
Absolutely, DSW2.
Perfect.
So, since it's DSW2, we have found our winner.
We don't have to look at port ID in this particular scenario.
So, we now know that this is the designated port.
Now, the cool thing is is that, by default, both of these links are going to be the exact same answer.
So, since we figured out one, we automatically know the other one in this particular case.
So, that's good.
All right.
So, we have now figured out those two links.
Let's now stand on this link and say, if I go this way, how far from here to here?
If I go this way, how far from here to here?
Well, we know, based on our route path calculation before, that it was four and four over here.
So, we have a tie again.
So, to break the tie, what do we do?
We look at the upstream bridge ID.
Now, if it wasn't tied, if one of them was lower, that's the one we would use.
But in this case, we have a tie, so let's look at our upstream bridge ID next.
So, now it's DSW2 versus ASW1.
So, folks, who is it?
Chat in.
Is it DSW2 or is it ASW1?
Yeah, it's DSW2 again.
Why?
Priority is tied, but if we look at the MAC address, four is lower than D.
Excellent job.
So, we know now that DSW2 is going to be the preferred option.
So, designated port over here, designated port over here.
Okay.
So, let's fill those in.
Perfect.
So, remember we said one designated port per link.
So, we figured out our designated port here, here, here, here, here, here, here, here, here, here, here, and here.
I think we've got them all.
We have them all.
All right.
Now, let's not forget about those ports that go down to our end stations.
They're still participating in spanning tree protocol.
Now, right now, we're only focusing on VLAN10.
So, I want you to remember that these ports are in VLAN10.
These ports are in VLAN20.
These ports are in VLAN50.
What does that mean?
It means that if this is the tree for VLAN10, this port doesn't matter, this port doesn't matter, this port doesn't matter.
Why?
Because they're not in VLAN10.
Only the user ports that are in VLAN10 matter.
Now, my question to you folks is this.
Do you think they will be root ports, designated ports, or blocked ports?
What do you think it is?
If you don't know the answer, I want you to guess.
What are these going to be?
Root port, designated port, or blocked port?
All right.
Conrad in with one answer.
Designated port.
Louisa's designated port, I think.
Come on, folks.
I need you to guess here.
Do you think it's going to be designated port, root port, or blocked port?
Well, here's the thing.
Ask yourself this.
Does it make sense for it to be a blocked port?
Yes or no?
Because if it's a blocked port, do your users get to communicate?
No, they don't.
So, definitely not a blocked port.
Okay.
Can it be a root port?
Well, what is a root port based on my definition?
The port on the switch that is the fastest way or the best way to get to the root bridge.
And you can only have one.
So, is the fastest way to the root bridge through the PCs?
Do we already have one?
Yeah.
Okay.
So, it can't be blocked.
It can't be root port.
Now, remember what I said.
Every single link in Spanning Tree must have a designated port.
Remember?
Every single link in Spanning Tree Protocol must have a designated port.
So, what do you think?
The ports that go down to the end users has to be designated ports.
There you go.
All right.
And then, once we're done going through these steps, we're down to step four.
Transition the root port and the designated ports to the forwarding state so we can send
and receive traffic, and every other port goes to the blocking state.
So, you'll see here that right now all these root ports and designated ports will now be
able to send and receive frames, and everything else is going to get blocked that doesn't
have RP or DP associated with it.
And we're done.
So, your root ports and designated ports transition to the forwarding state, are able to send
and receive frames.
They'll populate the MAC address table based on source MACs of received frames.
They'll forward frames based on the destination MAC address.
All those in the blocking state do not send or receive frames.
They do not populate the MAC address table.
They will accept BPDUs and send them to the switch system module.
They'll receive and respond to network.
I'm going to erase this word.
I don't like that word.
Control messages, meaning things like CDP, LLDP, DTP, VTP.
What else?
STP, Spanish Reporter.
All those control protocol messages are still allowed in and out of blocked ports.
So, what are we really blocking here?
We're blocking end user traffic.
We're blocking data traffic, voice traffic, that type of traffic.
Traffic that is not control traffic.
Even management traffic.
For example, like Telnet and SSH traffic can only flow through the network on the unblocked ports.
So, management messages, I don't like there because it makes you think,
like, oh, well, Telnet and SSH can go through blocked ports.
No, it can't.
No, it can't because that would be a type of end user traffic still.
So, it's the control traffic we're talking about here.
So, end user traffic only allowed on root ports and designated ports.
Management traffic only root ports, designated ports, stuff like that.
Control traffic is allowed on all ports.
Because the control traffic doesn't cause a loop, okay?
Remember that.
So, control traffic is generated from here, sent to here, it's done.
Control traffic would not be in a loop.
Andrew says, are you still a designated port if we're using port fast and client?
So, you're talking about here.
If we enable port fast, are these still designated ports?
Absolutely, yes.
Because even though you're port fast, you're still participating in Spanning Tree Protocol.
Right.
That was a lot.
And so, if you are unfamiliar with that algorithm, you struggle with that algorithm,
you got to go back and review, go back and review, go back and review,
and make sure that you become more comfortable with that algorithm.
So, with that said, I would encourage you to make sure that you have the ability to figure out
who the root bridge is for the exam, who the designated port is for the exam,
who the root ports are for the exam, and ultimately the block ports.
Now, here's the kicker.
They may not be asking you, who is the root bridge?
Who is or what is the root port?
Or what is the designated?
They might not be asking you that.
They might be asking you a more involved question where they stipulate that they want traffic to flow
from here to there.
But right now it's flowing from here to there.
How are you going to manipulate that?
That is where you have to understand that algorithm and how you would manipulate that algorithm
to change the way the environment looks.
Because by manipulating certain aspects that the algorithm depends on, you can change the tree.
And that's more than likely what they would be testing you on when it's all said and done.
So, you really have to know the algorithm.