Hey I'm Clint Garrett Ace Networker and in this video we're going to continue on with our
network switches and switching and we're going to talk about something that I didn't cover in this
video... If you watched this video on spanning tree I went into some of the basic details about
spanning tree on Layer 2 switches and why we need spanning tree on Layer 2 switches.
In this video, we're going to talk about spanning tree protocol root bridge. What is
the root bridge? Why do we need a root bridge? Why do switches decide there's going to be a
bridge? Gonna get into that, gonna get into all those nifty fun little details coming right up!
Okay so again if you watched this video on spanning tree I went into some of the basics and
I use this white board to kind of give you some basic ideas about how spanning tree works and why
we need it. It's used for the third major function of a Layer 2 switch and that is "loop avoidance"
So it's called spanning tree protocol (STP) and in some cases I'm going to get on the white board
as I did in the spanning tree video the first one. In this case I'm going to go straight
to the animations. I'm going to try to use the same diagram the same layout that I used in that
spanning tree video. So let's get to it and let's get into the root bridge election! Spanning Tree
Protocol root bridge election is what really makes spanning tree function correctly on a local area
network to prevent those loops from existing. Now if you watched this other video on spanning tree
protocol STP you saw me explain the basics for how Layer 2 switches use spanning tree to prevent
those loops from existing and why it has to prevent those loops but I also want to quickly
cover how spanning tree started and show you what the root switch is and how the root switch plays
into spanning tree. Spanning Tree Protocol started back when a company that's today called Compaq was
originally called Digital Equipment Corporation or DEC. They actually created the original version of
Spanning Tree Protocol and it was later adopted, modified and used by the IEEE into the IEEE's
own version known as 802.1d. A little side note here: you may or may not need to know that for the
network plus exam but you will definitely need to know that for the CCNA and the CCNP exams if and
when you decide to move up to those, and you'll definitely need to know that if you get into
computer networking as a serious career or business, anyway. Presently most or all
Cisco switches are (up to the present time they've been) running 802.1d version of spanning tree and
it's not compatible with the old DEC version that was used back in the day. And really more
importantly most new switches most news Layer 2 switches are using what's called "Rapid Spanning
Tree Protocol" or RSTP. So we'll get into that as we go into future videos. Just know that that's
basically the history of Spanning Tree Protocol in a very simplified form that brings us to today.
Today's spanning tree hasn't really changed very much as far as the basics of how it functions,
although there is a new loop prevention technology on the horizon called TRILL and that's still being
developed and still being modified so that we can potentially use it in the future. TRILL stands
for Transparent Interconnect of Lots of Links. So we'll get into that as we go into future videos.
Again, for the Network+ exam you don't need to necessarily know this. There are also a lot of
Cisco technologies that are kind of being used and protocols that are being used to try to make
networks a little more efficient in their loop prevention than even what spanning tree can do,
and again we'll get into those as we go along. For the most part, we're still using some form
of Spanning Tree Protocol across the board on most Layer 2 switches on most networks. For now though
we want to look at the root switch in spanning tree on a local area network, what it is, why it's
needed, how it's used. Ok so in the last video on spanning tree we went through I showed you a basic
setup and I showed you a local area network with 5 switches and I'm going to draw those out again.
We had a router here that's kind of our router that was connected to the outside network
and i'll just draw the basics of it here. You've got the cloud or the internet out here
that this is connected to, and then usually you'll have one major switch connected to
that router, and then we had 4 other switches out here. These were just on our local area network
and we'll assume that those are connected by
network cables Cat5, Cat6e, Cat7 ethernet cables. They don't necessarily have to
be. These can be just about any type of connection running between these devices. We
also said that spanning tree is a loop prevention technology, so what spanning tree is trying to do
is it's trying to prevent you from connecting loops that would cause broadcasts. Now we're
going to get into Spanning Tree Protocol root bridge election and what the root bridge is is
the the switch on your local area network that all other Layer 2 switches running spanning tree
will try to create the fastest and most efficient path back to. So in most
cases (not every scenario) and when we get into Per VLAN Spanning Tree, Multiple Spanning Tree
down the road here in future videos you'll deal with more of the semantics of
where that root bridge is on that instance of spanning tree. You may have Per VLAN Spanning
Tree where you've got spanning tree running on each VLAN on the same switches and devices
your root bridge may be different on one VLAN than it is on another VLAN.
Regardless the root bridge on an instance of spanning tree and for this basic understanding of
root bridge we're going to just have one instance of spanning tree existing on this small network.
The root bridge becomes the switch, the Layer 2 switch, that all other switches are trying to
create the fastest path back to while they're preventing loops, while they're avoiding loops
existing for those broadcast storms that we talked about in that other video.
They are trying to create also create the fastest path back so
in a nutshell what in most cases what you want if you have one instance of spanning
tree in most instances again this isn't set in stone or anything this depends on how you
have a network set up but in most instances you want that root bridge to be this switch
next to your router going out to an internet or to an external network of some kind.
You want all other switches while they're preventing those loops from existing whether
it's a loop between two switches like this with an extra cable or cables connected
or connections made or an overall loop in the overall network then sometimes multiples of
those can exist. Whatever it is, when these switches are trying to prevent
loops from existing they also are trying to create the fastest path back to the root bridge. Now
again I'm going to get into more detail in that but for the Network+ exam all you really need to
understand is the function of the root bridge and why we have to have a root bridge on spanning tree
so for this example we're going to say that we have left these switches, we have not configured
the priority setting for spanning tree on any of these Layer 2 switches on this network,
we've just left them at the default. Okay so there are two ways that your switches on your network
that are running spanning tree will determine who the root switch is going to be. And why
do we have a root switch? We have a root switch because we need to know where the most efficient
path is all the switches on your network that are running spanning tree need to know where the most
efficient path is to the most important switch on your local area network. That becomes your
root switch. But there are two different ways that happens: one is through the election process and
I'll just give you an example of this. All (most if not all) Layer 2 switches start out with a
default priority a spanning tree priority of 32768 and this is called the "priority"
That combined with the mac address the primary mac address of that particular switch
is looked at and it's advertised out from each switch on spanning tree.
Let's say you leave all these at default, you don't come in and configure the priority on
the configuration of each switch or on any of these switches on your network you leave
the priority at the default of 32768. Now this is a number that's divisible by 4096
(and we'll get more into detail on that later but) we're just really dealing with the root bridge
here. Why do we have a root bridge? Why do we need one? So the root bridge is going to be the the
most important switch that all the other switches will need to get the most efficient path back to
the fastest path and the most efficient path back to you while they are blocking existing loops or
doing loop avoidance on your network. So to make this really simple, if we start
all these switches up on your network we have them connected with same network cables here
and we leave them at default we don't change any of the configurations on them we leave
them at 32768, if say for instance this switch over here has a mac address that ends in 1111
and this one has 5555 and this one say it has 3333 and this one has 2222 maybe this one has 4444,
what they will do is they will advertise out "my priority number is this" and every single
one of them will default to that 32768 "and my mac address is this" and so all of these switches on
this network if left at default and not changed would elect this switch as the root bridge.
They would then determine "any loops that exist, I'm going to block what interfaces I need to
to leave the most efficient path back to that root switch" Now this can occur if an
administrator or a technician or whoever's setting up and configuring these switches on your network
isn't configuring the root priority at least on the switch that they WANT to be the root switch.
So I've seen this happen you'll you'll take an old switch or you take a new switch and plug it in on
some back end of your network and it may have the lowest mac address and when it advertises that out
all the other switches say "Oh, well it's the root switch" That may not be the case that may not be
how you want your traffic directed, so that's the election process. That's step number one.
Step number two is you as the administrator or the technician go in and you can configure the
priority for spanning tree on every switch or you leave most of them at the default
and you set the priority to a root priority which is the lowest number you can set
that priority to (Default's at 32768) but you can set it to 4096. So if you wanted this to be
the root switch you would set the priority to 4096. That way, it doesn't matter which
what the mac address is on all the others. If they all have 32768 as their default priority
along with whatever mac address they have, this one will still have the lowest value so
it becomes the root switch and when it advertises out "My priority is 4096" Why? Because you as the
administrator or the technician configured that switch that way on its configuration.
You logged into it and you configured it that way. It now has the lowest number value because it has
the lowest number value. All these other switches (these other 4 switches) are going to see that as
the root bridge and while they're blocking loops they're going to determine "Hey, I have the most
efficient path back to the root bridge" Mow we're going to get into more detail on this later on but
this is the primary function of the root bridge is to be the most important switch in that spanning
tree topology. Now this is a default topology of just one instance what they call an "instance" of
spanning tree on this local area network. We will get more detail about Per VLAN Spanning
Tree where you have multiple VLANs configured on your network and each one has a different
version or instance of spanning tree running. You may have 4 VLANs set up on your network and on
one of the VLANs this may be the root switch but on the other 3 VLANs maybe this is the root switch
depending on how you want to direct your traffic and how important that root switch is in that
instance of spanning tree. But just to give you an idea of the root bridge this is one instance of
spanning tree and that is how the root bridge is determined and why we need it and how it's used.
It's always recommended in most cases that you as the administrator the technician go in
and configure the priority number on the root bridge that you intend to be the root bridge.
You can also when you get more elaborate networks you can you can set up
priorities of 8192 as a secondary route so if something happened to
this root bridge let's say this one had a connection to the router over here
it would become the root switch if something happened to this switch here. Say something
happened to this switch and it went down having you configured a secondary priority
number which is a little higher number than this one but visible by 4096. 8192
sorry. Since it's a secondary priority but it's still a lower priority number than the others
it would become the root bridge and traffic would be directed toward it, if something say
happened to your root bridge. So that's the basics of the root bridge and how it works