Cisco CCNA ICND2 640-816

Switch STP: Understanding the Spanning-Tree Protocol

by Jeremy Cioara

Start your 7-day free trial today.

This video is only available to subscribers.

A free trial includes:

  • Unlimited 24/7 access to our entire IT training video library.
  • Ability to train on the go with our mobile website and iOS/Android apps.
  • Note-taking, bookmarking, speed control, and closed captioning features.
Video Title Duration

Review: Rebuilding the Small Office Network, Part 1

Review: Rebuilding the Small Office Network, Part 2

Review: Rebuilding the Small Office Network, Part 3

Switch VLANs: Understanding VLANs

Switch VLANs: Understanding Trunks and VTP

Switch VLANs: Configuring VLANs and VTP, Part 1

Switch VLANs: Configuring VLANs and VTP, Part 2

Switch STP: Understanding the Spanning-Tree Protocol

00:00:00 - It is time to arm ourselves with another tool that we can use
00:00:05 - in our networks and that is the spanning tree protocol. We're
00:00:09 - going to take a look at what spanning tree protocol is all
00:00:12 - about and how it helps in a good switch design. We'll start
00:00:16 - off by taking a look at some good switch design practices. I mean,
00:00:18 - we've moved from the CCENT level now into the CCNA.
00:00:22 - So our networks have grown from the small business network
00:00:26 - to a medium to enterprise class local area network environment
00:00:30 - where our switches tend to be like rabbits. You leave them in a
00:00:33 - room for a while and you come back and there's just switches
00:00:35 - everywhere and you go, ah. How do I manage this? We'll take a look at some
00:00:39 - good switching design practices to handle the multiplying switches.
00:00:43 - We'll then look at what switch loops are because that's one
00:00:46 - of the crises that you run into when you're setting up a large
00:00:50 - switch network. And then we'll see how to stop the switch loops.
00:00:55 - I'll give you the answer right now. It's spanning tree. Spanning tree
00:00:57 - protocol. So after we talk about what spanning tree does we'll
00:01:01 - get into the specifics of spanning tree operation. Spanning
00:01:04 - tree is one of those protocols that has a very simple goal but there's
00:01:08 - a lot of complexity in how it accomplishes that goal.
00:01:13 - When you design a switch network it's best to approach it
00:01:16 - in layers and to take a layered approach. What you see right here
00:01:20 - is a picture of an extremely large network that is designed
00:01:24 - in three separate layers that CISCO has dictated as the access layer,
00:01:28 - distribution layer, and the core layer. It's kind of hard for me
00:01:32 - to talk about this picture without really getting into the
00:01:35 - growth of a network. Imagine yourself. Imagine
00:01:39 - you created a company that makes iPhone accessories.
00:01:44 - You know, the Apple iPhone they make accessories for that. Now
00:01:47 - when you create this company you start off with you and
00:01:50 - ten employees. Are you going to deploy a switch network that looks
00:01:54 - like this? No. Not for ten people unless you're just going for
00:01:58 - way overkill. You're going to deploy a network that looks something
00:02:02 - like, oh, where's my pen? Something like this, where we have one switch
00:02:07 - with our ten employees attached and maybe some little, you know, not even a
00:02:11 - CISCO. You've got like a little NetGear or something connecting you off to the
00:02:14 - internet. Now, your iPhone accessory store starts to grow and
00:02:17 - you hire a few more people to produce those accessories. And so
00:02:20 - you don't move to a model again, like this; you just plug in another
00:02:23 - switch with the crossover cable and attach those users right
00:02:27 - there. And you continue to grow and continue to grow and eventually
00:02:30 - max out those two switches and, you know, plug-in another switch
00:02:34 - in there and now you've got your official servers on your network
00:02:37 - and maybe, well, you're still probably using a NetGear. You've got
00:02:40 - fifty, sixty different employees that are working out of the
00:02:43 - office and you're starting to get a little nervous feeling
00:02:46 - in your system because you know you've been daisy chaining these
00:02:49 - switches. They're almost all maxed out. But you also know if any
00:02:53 - one of those switches go down you're going to cut your network
00:02:56 - in half and you're going to have a pretty catastrophic
00:02:59 - outage. Which, when your company has grown to this point people
00:03:02 - are depending on those systems to be in place. So
00:03:06 - what you do is you take all the money you've been making
00:03:09 - out in your store, you take all those switches, put them in a
00:03:11 - closet somewhere and you buy one of these switches which is
00:03:16 - maybe a CISCO 4000 series or 6500 series
00:03:19 - switch that has a bunch of blades. You've got the dual fan tray action.
00:03:23 - You've got the dual redundant power supply down here. This
00:03:26 - is where the plugs go in, and you've got the fans and the power supply
00:03:29 - that kicks on it makes a lot of noise. You know, you got the big mother
00:03:32 - of all switch, and all these devices are plugging in there. You now
00:03:35 - have upgraded to a CISCO router that connects you off to the
00:03:38 - internet. And eventually you just, you know, keep on going and max out this
00:03:42 - switch and you start daisy chaining your old switches that you
00:03:46 - pull of the closet from this guy to get some more ports.
00:03:49 - And, you know, at this point you're probably in the hundreds of employees
00:03:52 - at the company. And you start to get that nervous feeling
00:03:55 - in your system again, thinking, well this is a great switch,
00:03:58 - you know, it's got the dual power supplies and fan trays and
00:04:01 - supervisor modules and all that kind of stuff. But what if that
00:04:05 - switch goes down. That's the core of my whole company. So that's where
00:04:08 - you buy a second one. You got money at this point, right? So you get
00:04:11 - a second one. Hook them up to where they're redundant and they back
00:04:14 - each other up. And now you're starting to approach a model that
00:04:19 - looks like this. Where you have distribution layer switches
00:04:23 - which are providing core services or essentially routing services,
00:04:28 - VLAN services and so on, that are attached on here to access
00:04:32 - layer switches. Now with this layered approach it allows you
00:04:36 - to have easy and manageable growth. This is CISCO's model. They
00:04:39 - created this model right here. The access layer is where the
00:04:43 - devices actually plug into the network. We have servers connecting
00:04:46 - to the network on their access layer switch. PC's plugging into
00:04:50 - the network on their switches. The distribution layer is where
00:04:53 - your major segments happen. You have kind of these modules that
00:04:57 - are created here. You know, maybe you've got your sales
00:05:00 - group over here which has a 100 or 200, 300
00:05:03 - different sales people inside of it. Or it could be floor
00:05:06 - four of your building that you own. You've segmented into
00:05:10 - one big group. You've got the dual redundant 4500
00:05:14 - or 6500 series switches there. Over here, you've got your
00:05:17 - server farm network, where all your servers are isolated.
00:05:20 - You have a separate VLAN over here for that. And now you eventually
00:05:24 - reach a core layer and when you get to this point you're probably
00:05:27 - at thousands of employees. The core layer is considered the
00:05:30 - backbone of a network.
00:05:34 - Now think of this as a campus model. And when I say campus
00:05:39 - I'm talking about a literal college campus. Or maybe you have
00:05:43 - the college of business over here. You've got the college of
00:05:47 - art over here. And you know, all the different colleges and they all
00:05:50 - tie back to the backbone of the entire campus network which
00:05:54 - is the core and everything goes through the core and you have other
00:05:56 - buildings that branch off of here with modules that look like
00:05:59 - this. So that's the idea of
00:06:03 - designing a network in a layered approach is designing it
00:06:06 - with modules. Now you see down here a new term, etherchannel. Can provide
00:06:10 - for more bandwidth on key links. What etherchannel is, is where
00:06:14 - you can do something like this. You see these three lines going
00:06:17 - between these. Maybe you've got so much traffic passing through
00:06:22 - the backbone that just one, one hundred megabit per second
00:06:25 - or one thousand megabit per second port isn't enough. What
00:06:29 - etherchannel can do is it can actually take between two
00:06:33 - and eight ports, you can go up to eight and bundle them together into
00:06:37 - a single pipe. So you could have your two switches right here. And if these were two one
00:06:41 - hundred megabit per second ports, etherchannel allows you to tie them together and get two
00:06:45 - hundred mega bits per second of throughput. So that way you can have
00:06:49 - you know, add a bunch of links in there and channel them all to get
00:06:52 - super high bandwidth links between your switches. Now the last
00:06:57 - point I want to make. And the reason we're talking about this ideal
00:07:00 - design right here in this video section, is the redundant
00:07:05 - connection. The redundant connections eliminate a single point
00:07:10 - of failure. So when I have my access layer switch, notice, I always
00:07:15 - have a crossover cable going to both distribution layer switches.
00:07:19 - The distribution layer switches always has a cable going to
00:07:22 - both core layer switches so that if any one device fails in
00:07:27 - the network, we have a backup path that can get us around
00:07:30 - that failure. So redundancy is good, we've determined that. But
00:07:34 - unless you design it the right way redundancy can be very bad.
00:07:39 - To understand why that redundancy is very bad or can be bad
00:07:43 - you have to understand how the switches are going to treat
00:07:46 - those redundant links. By default the switch will send broadcast
00:07:50 - packets out all ports. That's how they're designed. So when this computer
00:07:53 - sends a broadcast packet into the network, the switch says oh,
00:07:57 - I don't know where that goes. I'll send it out every single port
00:07:59 - except the one I received it on. So out those two ports it goes. This
00:08:03 - switch receives it and sends it out to this computer because
00:08:06 - that's the port and then as it receives it on this port, it loops it
00:08:09 - right back to that one. And as it receives it on this board it loops it right back to
00:08:12 - that one. Again the switch receives it on both those ports and
00:08:16 - sends it back out to this PC and then loops right back around.
00:08:19 - This will keep happening eternally. Meaning this broadcast
00:08:23 - will cycle the network blowing up all the devices on the network
00:08:28 - until you shut down the whole network. Meaning turning everything
00:08:30 - off. A lot of you might be thinking, well wait a sec. I
00:08:34 - heard inside of a packet is this field called the TTL.
00:08:37 - That's the time to live. How long a packet survives but
00:08:42 - the TTL is a layer three field, meaning it's up at the network
00:08:46 - layer. Only a router can subtract time from the time to
00:08:51 - live. Now looking at that picture right there, do you see any routers?
00:08:54 - Nope. So what's going to happen is that packet is going to
00:08:57 - cycle the network round and round and round and round destroying
00:09:00 - everything that's out there. So while the redundant connections
00:09:03 - are necessary in business networks we have to have a system
00:09:07 - to manage them so they're not all active at the same time.
00:09:11 - Becaue if they were we'd have that broadcast problem. So the place
00:09:15 - of spanning tree is to drop trees on redundant links. That's my little
00:09:21 - way of remembering it because they're so often, you get all
00:09:24 - these turns, and then spanning tree comes out there, and you're like, well what
00:09:27 - did that do? Just think of a falling tree. It's falling on all
00:09:30 - the redundant links in the network. What spanning tree does
00:09:34 - is find all the best links in your organization. For example,
00:09:39 - it looked at that link and for some reason or another, we'll
00:09:42 - talk about those reasons in a moment; it said that link is better
00:09:46 - than that link. So I want that one to be active. So, the
00:09:50 - tree falls on this redundant link and it goes inactive to
00:09:53 - where it's not in use. So this one's forwarding along life is
00:09:57 - good, until you know, maybe the cable goes bad
00:10:01 - or the port gets shut down or something like that. Spanning tree's
00:10:04 - always watching the network and if something occurs it's going
00:10:08 - to take that tree
00:10:10 - and lift it right back up. And it's going to say okay life is good let's go ahead and
00:10:13 - unblock our redundant connection and allow traffic to forward
00:10:17 - here until we see our main link, which is better for some reason.
00:10:20 - Our main link come back on line then we can go ahead and drop
00:10:23 - the tree on our redundant link again to make it inactive.
00:10:27 - Spanning tree is one of those concepts that is sometimes difficult
00:10:31 - for me to talk about. Because what I described to you right then
00:10:35 - is all it does. That's the whole goal of spanning tree.
00:10:39 - But, go to Google and type in spanning tree protocol
00:10:43 - and just see how many pages and pages and books of information
00:10:47 - are out there on spanning tree. You might think, well, if that's all it does
00:10:51 - is block the redundant links, what's the point of writing
00:10:53 - a book about it. Well networks are not as simple as what I
00:10:58 - just showed you where we have two individual switches connected
00:11:01 - together. Networks have hundreds of switches and spanning tree
00:11:04 - has to find what's the best ones to block. Because if it blocks
00:11:07 - the wrong one you're going to have a very inefficient network.
00:11:10 - So here's the facts. The original spanning tree protocol it's
00:11:14 - official standard is 802.1D. That's the
00:11:18 - technical name for it. Was created to prevent loops. The switches
00:11:23 - will send probes into the network called BPDU's or bridge
00:11:27 - protocol data units to discover loops. So what's going to happen
00:11:30 - and again, take little topology there of our two switches. If we have
00:11:33 - two switches that run spanning tree, they will send probes on
00:11:38 - the network. Now those probes are kind of like broadcast
00:11:41 - packets. They're actually technically multicast. And they'll come into
00:11:44 - the switch and all this probe is, this BPDU is a
00:11:48 - little identifier for the switch. So say this is switch one
00:11:52 - and this is switch two. Switch one sends a probe into the network
00:11:55 - and says, let's say, think of like sonar sounds. And sends out
00:11:59 - a little probe. Now that message comes into the switch and
00:12:02 - since it's a multicast or it's designed, kind of like a broadcast
00:12:06 - packet. It will loop it back around. Switch one will get the probe, open
00:12:10 - it back up and look inside and go wow, this is my probe.
00:12:14 - I sent this out, meaning I see my name inside of this probe
00:12:18 - that means there's some kind of loop in the network. So that's
00:12:21 - when they go into action. These probes also help elect the
00:12:25 - core switch of the network known as the root bridge. There's
00:12:29 - our key term. In our switch network, say we've got, you know, bunches
00:12:33 - and bunches of switches all around the network that are all
00:12:35 - tied together with redundant connections going everywhere. In that
00:12:39 - case we will have one switch which will be elected the root.
00:12:44 - Now that is considered the core switch of the network because
00:12:48 - all the switches will find the best way to reach that root
00:12:52 - bridge then block all the redundant links. Meaning this one's
00:12:56 - going to look and say well the easiest and fastest way for
00:12:58 - me to get there is this link so it's good but I've noticed that
00:13:01 - I can also reach the root through this link and well, not
00:13:05 - that link down there. So I'll block that redundant connection.
00:13:08 - So all the switches find the best way to reach the root
00:13:11 - and then block redundancy. So the key of spanning tree protocol
00:13:16 - is to make sure you're very accurate in the one that you elect
00:13:19 - as the root bridge. The thing that could work out horrible
00:13:23 - for your network is if you just let spanning tree treat everything
00:13:27 - at default. I'm jumping a little ahead of myself but
00:13:32 - by default spanning tree will elect the oldest switch in your
00:13:36 - network as the root bridge. Now I don't mean oldest as in how
00:13:39 - long it's been running. I mean oldest as in manufacturing
00:13:43 - date. So some little, you know, ten megabit per second 1992
00:13:47 - switch that you have stuck in a wiring closet that you
00:13:50 - forgot about gets elected as the root and everybody is like, hey, that's the
00:13:54 - root. Let's find the best way to get there, because that must
00:13:57 - be the center of the network. Everybody finds the best way to
00:13:59 - the closet switch and your network performs horribly. And the
00:14:04 - problem is, is nobody really knows why. Nobody can really put
00:14:07 - a finger on it because it looks like everything's designed
00:14:10 - right, I mean, you're using great equipment and servers are working,
00:14:13 - it's just, things just run slow and people just finally, ah
00:14:18 - I guess that's that's the way it is and you run this beautifully
00:14:21 - expensive network that you've invested all this
00:14:24 - money into that never performs quite like it should.
00:14:28 - Now, I should also mention that every CISCO switch runs spanning
00:14:32 - tree by default. So you can plug in networks together with redundant
00:14:36 - connections and it's not going to have any loops. It's just that it's going
00:14:39 - to be a very inefficient network. Now, you should also keep in mind
00:14:42 - that you are at a CCNA topic at this point. It's not; this
00:14:47 - topic isn't in the CCENT material or the ICND 1
00:14:51 - video series you might have already seen because this is something
00:14:55 - that works for enterprise networks. Meaning, in a CCENT
00:14:59 - level network you're not going to have hundreds of switches.
00:15:03 - You won't even have ten to twenty switches because CCENT
00:15:06 - is focused around small businesses. So when you get to the larger
00:15:10 - networks, the mid-size the enterprise networks, that's where spanning
00:15:14 - tree really plays a role, and a big role at that. It has to elect
00:15:17 - the best switch as the root bridge. So when we're understanding
00:15:21 - our spanning tree network,
00:15:24 - we need to understand more about these BPDU's and how the
00:15:27 - elections work. The way that the elections will happen is all
00:15:32 - the different devices in the network have something known as
00:15:36 - a bridge id.
00:15:40 - That's their name to spanning tree. Remember I said we had like
00:15:44 - switch 1, switch 2. Well it's not that, the switches don't really
00:15:47 - care about their host name, they care about their bridge id. Now that
00:15:51 - bridge id is built of two pieces. You have a priority
00:15:57 - and you have the switch's Mac address. I'll just put Mac add.
00:16:04 - You can see I put priority dot Mac address. Now, by default every
00:16:10 - switch when you pull it out of the box has the same priority.
00:16:13 - 32768. You know somebody just took a dart and threw
00:16:18 - it at the dart board, and they were like ah, let's make it 32768.
00:16:22 - Now I should mention the priority is kind of counterintuitive. When
00:16:25 - you think of priority you think, oh, bigger priority that's better right?
00:16:29 - Not so. Lower is better. So the lower your priority the more chance
00:16:34 - you have to be elected as the root bridge. Now since all the
00:16:39 - priorities are tied when you pull these switches out of the box,
00:16:43 - it has to resort to the Mac address to break the tie.
00:16:47 - Now we're getting to the reason why the oldest switch in the network
00:16:50 - becomes the root bridge. When the manufacturers manufacture
00:16:55 - switches, they will start with the Mac address that's lowest
00:17:00 - in their range. Meaning, you know, say you're CISCO. You'll
00:17:03 - go to the powers that be and acquire a Mac address range that
00:17:07 - you can use for all your devices. You'll start manufacturing devices
00:17:11 - and start from the lowest Mac address and just keep increasing
00:17:13 - the Mac addresses of your devices as it goes. Now keep in mind
00:17:17 - I'm talking about the Mac address of the switch, not one of
00:17:20 - the Mac addresses that it's learned about that's from a device
00:17:23 - that's plugged in. The Mac at the switch itself has a Mac address. So,
00:17:27 - when we have this kind of scenario obviously I just made up these
00:17:30 - Mac addresses aaa bbb ccc. This one will end up being the
00:17:35 - root bridge because it has the lowest Mac address of the three.
00:17:39 - So,
00:17:42 - once that root election happens all the switches in the network
00:17:46 - settle and they say okay that one is the root bridge. Now let's
00:17:49 - find the best way to get to that root bridge. Now, you notice right
00:17:54 - in the middle of the
00:17:56 - picture right here I have a link cost equals nineteen. There's
00:18:00 - a table, I'm going bring up that table in just a few that shows
00:18:04 - all the different speeds of links that you have like a
00:18:07 - 1000 megs per second, a 100 megs per second, 10
00:18:10 - megs per second and down and down and out it goes. Now if you
00:18:14 - have a 10 meg per second link the cost to spanning tree
00:18:17 - is actually 100. A 100 megabit per second link is
00:18:20 - nineteen. And I'll show you the chart later on but that's how
00:18:24 - it determines the best way around the network is based on the
00:18:27 - link costs. So it says okay if this is a 100 mega link it's
00:18:31 - nineteen. 19, 19, we'll just say it's all a 100 meg link everywhere.
00:18:35 - All the switches in the network try and find the best way to get
00:18:38 - to the root. This one looks and it says, well, I see a cost of
00:18:42 - nineteen to get that way, a cost of nineteen plus nineteen
00:18:46 - that way so my root port; I'll just out RP on there, is going to be
00:18:51 - right here because that is the most efficient way to reach
00:18:54 - the root bridge. This one does the same and elects this one
00:18:58 - as its root port. That's the best way to get there. Now the root
00:19:01 - bridge, you know, it's the king of the network and as its reward
00:19:05 - it will never block one of its ports. And by the way a root
00:19:08 - bridge will never have a root port because those are used to reach the root
00:19:12 - bridge. Obviously if it is the root bridge it doesn't need to reach
00:19:16 - itself. So down below you can see the next type of port is
00:19:21 - a designated port. The designated port is just a forwarding port.
00:19:25 - I wish, I wish they would have chose that name instead of saying
00:19:28 - designated port. Designated port means there's one port that
00:19:32 - is forwarding.
00:19:34 - Now there is one designated port per link. This gets kind
00:19:38 - of confusing. A link is a segment between switches, or I guess
00:19:43 - you could say a link is just a switch port.
00:19:46 - Or a link between the switches. If I have a PC attached to this
00:19:50 - switch, this would be a designated port. Meaning, a port that is
00:19:54 - forwarding, because it works. And on another PC over here that's a designated
00:19:59 - port. It's plugged into to a port that is forwarding. Now when it comes to
00:20:02 - a link between switches you'll have one forwarding port
00:20:06 - per link. Now you're kind of looking at this picture and I guess I should back
00:20:10 - up a step. Is that picture a demonstration of a redundant topology?
00:20:15 - Yeah, sure it is. Because if this is, we'll just say
00:20:20 - this is switch 1, switch 2, and switch 3. If switch 1 goes
00:20:24 - down and dies well, switch 3 can still reach switch 2 and
00:20:29 - still has active connections. If switch 2 were to die switch
00:20:32 - 1 could still reach switch 3. It's redundant. But remember,
00:20:35 - a broadcast if we don't block something will
00:20:38 - circle around and around that network everywhere blowing
00:20:41 - up all the devices. So when you are talking about these links;
00:20:45 - we know one of them has to go and we know now that these are
00:20:48 - using these paths to reach the root. We know that it's
00:20:51 - going to be this guy. We know that link is going to die. But before
00:20:55 - it dies we have to realize that every link has to have
00:20:59 - one designated port. Meaning one of these must stay forwarding.
00:21:03 - In this case it will be this one. DP, designated port. The
00:21:10 - other side will assume a blocking state. Meaning,
00:21:15 - switch 3 blocks its port. Now, it's kind of obnoxious because
00:21:20 - if you're sitting on switch 1 doing show commands it's going
00:21:24 - to be like, oh yeah, the port is great, it's forwarding, life is good and
00:21:27 - you're going to think to yourself, wow, I thought I understood spanning tree. Why is that
00:21:31 - forwarding? I thought that link would go down. Well it is down because
00:21:35 - if you block one side of the link, the other side can't communicate,
00:21:38 - so it's disabled but you have to be on switch 3 to be able
00:21:41 - to figure that out.
00:21:43 - Now I want to answer a question that I think is probably circling around
00:21:46 - some of your minds. You might be thinking, well, why is that side
00:21:51 - the designated port and this side get blocked? Why didn't this side get blocked
00:21:56 - and that one be designated? Well, take a guess. Knowing what you
00:21:59 - know about spanning tree, why do you think that would be so?
00:22:06 - Remember these. Bridge id's. The bridge id is that combination
00:22:11 - of priority and Mac address. It's not only used to elect the
00:22:14 - root bridge. Whoever has the lowest one in the whole network becomes
00:22:17 - the root but it's also used to determine who's going to block
00:22:21 - the link. Again lower is better so since this guy is lower he's
00:22:25 - like I'm not blocking my link. Switch 3, you're lower than me or
00:22:29 - higher so your priority is lower or, wait a sec, I'm just, I'm going to stop talking.
00:22:33 - Switch 3 is not as good as switch 2, so it's going to block its link
00:22:37 - and disable that
00:22:39 - effectively taking the whole thing down. Now if any one of these
00:22:42 - links ever dies, spanning tree will recognize that and it will
00:22:46 - unblock this link to resume the connectivity even though
00:22:50 - one of the switches failed in your network.
00:22:53 - I want to point out that even in a network this small, the
00:22:58 - switch that becomes the root effects what links get used. So
00:23:02 - let me just clear off all this chicken scratch. We said this one..woop...
00:23:07 - let me get to where I can draw again. We said this one is going to be the root
00:23:11 - so these links stay active and these switches go through this
00:23:16 - switch to reach each other because this one gets blocked. But
00:23:19 - if let's say this one over here gets elected the root
00:23:23 - then which link gets blocked?
00:23:26 - This one. Because these switches will say these are my root ports,
00:23:29 - that's the best way to get to the root bridge and they will go
00:23:31 - through this switch to reach each other. And now I think you can
00:23:35 - start to see why it's so critical that you play a role
00:23:40 - in who becomes the root bridge. Because if this is the oldest
00:23:44 - switch in your network and these two switches have to go through
00:23:47 - that switch to reach each other then this guy is going to become
00:23:50 - a bottleneck because it's not going to have the speed and capacity
00:23:53 - that some of the newer bigger switches in the network are going
00:23:56 - to have. And I think you can already begin pondering how you're
00:24:00 - able to influence the root election. You know how a root
00:24:04 - bridge is elected it's the priority plus the Mac address. Well
00:24:08 - you can't change the Mac address that's set on the switch. It's
00:24:10 - hard coded but you can change the priority. So by dropping
00:24:15 - that number down and lowering that you can influence the election.
00:24:20 - At this point I think we're getting the feel for spanning tree
00:24:23 - in that what it does and how it does what it does. So here are
00:24:27 - the official two major steps to how spanning tree finds the
00:24:30 - best path. Step one elect the root. If we had our little three switch
00:24:35 - networks, and by the way, anytime you're learning spanning tree that's
00:24:38 - the normal topology that you have. Once you elect the root
00:24:41 - then the switches will find the lowest cost path to the
00:24:46 - root. So they're going to look at the link speeds that they
00:24:48 - have and say, well, the lowest cost path, these are all 100 megabits
00:24:52 - per second. They're all a cost of 19,19, 19, and
00:24:56 - they'll all find the best way to the root. Now just to give you an idea.
00:24:59 - If we had a low speed link; let's say this one was a 10 meg
00:25:03 - link then it will be a cost of 100. So this switch will say
00:25:06 - well, it's either a 100 to go that way or 38 to go
00:25:10 - that way so that's the more efficient way. I'm going to block
00:25:13 - that link. So the cost or the speed of the links
00:25:17 - really do have an influence. Now, I want to add in a couple pieces
00:25:21 - here because I know some of you might be thinking of the bigger
00:25:24 - more advanced topologies. What if you had a situation like
00:25:29 - this. What if that was the root and this switch was trying
00:25:36 - to figure out what link to block. Now, remember this is redundant. We have
00:25:39 - to block one of these links but if all of these were equals, let's
00:25:42 - say they were all 1 gigabit per second connection. Well
00:25:46 - then both paths are a cost of eight for that switch down here
00:25:50 - to reach the root. What it's going to do to break the tie,
00:25:54 - is it's going to choose the switch, the upstream switch, with
00:25:58 - the lower bridge id. Meaning, again remember that priority
00:26:01 - we had, 32768. and then the Mac address.
00:26:06 - If this Mac address is lower than this one over here then it's
00:26:10 - going to say you're the best route. If the other side was lower it would
00:26:13 - say you're the best route and block the opposite one.
00:26:18 - There's only one more topology that can throw a fork in the
00:26:20 - wrench and that was the original one I showed you when I was saying what
00:26:24 - spanning tree did. What if you got a situation like that. Both
00:26:28 - of these we'll say are a gigabit per second so they're both the
00:26:30 - cost of four. That guy's the root. This one, you remember, the root never
00:26:34 - blocks a port, so this switch has to figure out which port to block
00:26:37 - to stop this redundancy. The costs are tied; the
00:26:42 - upstream switch is the same so it can't use the method we used
00:26:45 - over here to break the tie. So what it's going to do is prefer
00:26:51 - the lower port. Just remember in spanning tree lower is better
00:26:55 - on everything. It's going to say I have to block one so since you are
00:26:59 - the higher port I will block you. And this one becomes
00:27:03 - the active link. This one gets the tree dropped on it.
00:27:07 - That is the basic concepts of spanning tree. If you want to
00:27:10 - have a good well-designed redundant network, then spanning tree
00:27:14 - has to play a role. Because you have to have something to disable
00:27:17 - those redundant connections until you need them. So we talked about
00:27:21 - what some good switching practices were. Some design pictures of
00:27:25 - how we should design our network in the three layers,
00:27:28 - access, distribution, and core. With redundant connections across
00:27:31 - all of them. We saw what switch loops are and how to stop them. The
00:27:36 - switch loops happen any time you have redundancy inside of the
00:27:39 - switch or layer two environment. And we stop them by using the spanning
00:27:43 - tree protocol. Finally we looked at some of the specifics of
00:27:46 - spanning tree operation like the root bridge election. Like the bridge
00:27:50 - priority and the bridge and Mac address, combining to create
00:27:54 - the bridge id that's used to elect the root. And then how all the switches
00:27:58 - find the best way to reach that root bridge. Those
00:28:02 - concepts are critical for when we get into the next video which
00:28:05 - is going to be configuring a little bit of spanning tree and
00:28:08 - then we'll get into some of the enhancements that make spanning
00:28:11 - tree better and faster for our networks of today. I hope this has been
00:28:15 - informative for you and I'd like to thank you for viewing.

Switch STP: Configuring Basic STP

Switch STP: Enhancements to STP

General Switching: Troubleshooting and Security Best Practices

Subnetting: Understanding VLSM

Routing Protocols: Distance Vector vs. Link State

Routing Protocols: OSPF Concepts

Routing Protocols: OSPF Configuration and Troubleshooting

Routing Protocols: EIGRP Concepts and Configuration

Access-Lists: The Rules of the ACL

Access-Lists: Configuring ACLs

Access-Lists: Configuring ACLs, Part 2

NAT: Understanding the Three Styles of NAT

NAT: Command-line NAT Configuration

WAN Connections: Concepts of VPN Technology

WAN Connections: Implementing PPP Authentication

WAN Connections: Understanding Frame Relay

WAN Connections: Configuring Frame Relay

IPv6: Understanding Basic Concepts and Addressing

IPv6: Configuring, Routing, and Interoperating

Certification: Some Last Words for Test Takers

Advanced TCP/IP: Working with Binary

Advanced TCP/IP: IP Subnetting, Part 1

Advanced TCP/IP: IP Subnetting, Part 2

Advanced TCP/IP: IP Subnetting, Part 3

Please help us improve by sharing your feedback on training courses and videos. For customer service questions, please contact our support team. The views expressed in comments reflect those of the author and not of CBT Nuggets. We reserve the right to remove comments that do not adhere to our community standards.

comments powered by Disqus

Course Features

Speed Control

Play videos at a faster or slower pace.


Pick up where you left off watching a video.


Jot down information to refer back to at a later time.

Closed Captions

Follow what the trainers are saying with ease.

Offline Training

Our mobile apps offer the ability to download videos and train anytime, anywhere offline.

Accountability Coaching

Develop and maintain a study plan with assistance from coaches.
Jeremy Cioara

Jeremy Cioara

CBT Nuggets Trainer

Cisco CCNA, CCDA, CCNA Security, CCNA Voice, CCNP, CCSP, CCVP, CCDP, CCIE R&S; Amazon Web Services CSA; Microsoft MCP, MCSE, Novell CNA, CNE; CompTIA A+, Network+, iNet+

Area Of Expertise:
Cisco network administration and development. Author or coauthor of numerous books, including: CCNA Voice 640-461 Official Cert Guide; CCNA Voice Official Exam Certification Guide (640-460 IIUC); CCENT Exam Prep (Exam 640-822); CCNA Exam Cram (Exam 640-802) 3rd Edition; and CCNA Voice 640-461 Official Cert Guide.

Stay Connected

Get the latest updates on the subjects you choose.

  © 2015 CBT Nuggets. All rights reserved. Licensing Agreement | Billing Agreement | Privacy Policy | RSS