Oftentimes, we're going to want to have
redundancy inside of our networks,
and in the world of switching that
might equate to having more than just one path.
So if PC-1 wants to talk to PC-4, well,
if this link goes out, by having a redundant path already
in place, that redundant path can still be used.
However, in the world of switching,
if we do have parallel paths consider a broadcast,
a broadcast, maybe an ARP request that PC-1
sends into the switch.
That broadcast is forwarded out the trunk,
received by Switch-2, forwarded out the trunk,
received by Switch-3, forwarded out the trunk,
we see by Switch-1 again, who then forwards it,
and that could cause a switching loop, a layer 2
loop caused by a single broadcast initiated
by a PC on a VLAN.
Well, because it's not desirable to have frames that just loop
forever on the network, we have a protocol named Spanning Tree
Protocol, whose job it is to identify
parallel paths on the layer 2 network,
and then wherever there are redundant paths
to go ahead and logically block on ports,
so there's only one path through that network at any given time.
And to perform this quote unquote
magic of identifying parallel paths and blocking them,
the Spanning Tree Protocol sends and receives little BPDUs.
That stands for a bridge protocol data
unit, which in the world of the Spanning Tree
is the language of love.
It's how these switches can communicate and talk
to each other regarding the Spanning Tree,
and which ports should be forwarding
and which ports should be blocked.
And during that process, one of the switches
is going to be identified as the root.
Think of it as the King Kong of the Spanning Tree topology,
and it's referred to as the Root Bridge.
And the reason is called a Root Bridge,
is because when this was implemented or developed
many, many years ago we had bridges,
layer 2 switching devices called bridges.
Now we use switches instead of bridges, however,
the term is still referred to as the Root
Bridge for the King Kong of the Spanning Tree topology.
You can think of the Root Bridge as the winner,
and as a result of winning, the Root Bridge
is given the opportunity of forwarding
on all ports for that VLAN.
In this case, we're looking at the VLAN 100.
So if Switch-1 is the Root Bridge,
the winner of the Spanning Tree, who are the losers?
Well, they're not quite losers, but they're simply
switches, others switches, that didn't become the Root Bridge.
And in our topology here, that would be Switch-3 and Switch-2,
which are the non-root bridges.
And by using BPDUs, Switch-2 and Switch-3
can identify what is the optimal or fastest path
to reach the root.
And in this topology, it would be Switch-2's gig 1 slash 0,
so that would be put in a forwarding state,
and Switch-3's gig 0 slash 1, and it would
be put in a forwarding state.
And also those ports that are the fastest
path to get to the root, those are referred to as root ports.
And then when it comes down to this segment between Switch-3
and Switch-2, if both these ports are forwarding,
we're going to have a loop.
So Switch-2 and Switch-3 are also
going to have a little face off and duke it out.
They're going to be sending BPUs back and forth to determine
which of these two switch's ports should be forwarding
and which should be blocking.
And as Switch-2 wins, it's going to go ahead and be forwarding
on its port, and Switch-3, if it lost for this segment,
we'd go ahead and block from a Spanning Tree
perspective on that port.
So any frames that do come in to gig 0 slash 2 from Switch-2
would simply be dropped, put in the bitbucket,
and also if this port is blocked,
Switch-3 is not going to be forwarding any data frames out
that port up to Switch-2.
And Spanning Tree is going to keep that block in place
until there's some kind of other change in the network.
An example would be this path between Switch-1 and Switch-2
fails, or the cables cut, which would also cause that path
to fail, and then Spanning Tree could reconfigure the topology
and then start forwarding on this port
and take advantage of the additional links that
are in the network to forward traffic.
So that's the basic concept of Spanning Tree,
to identify parallel paths in the layer 2 network,
and then block on one or more ports
so that we don't have the possibility for a layer 2 loop
to happen inside of our switch network.
In this Nugget, we've identified that if we
have parallel paths in our layer 2 network,
we could have a switching loop, and to help identify
parallel paths and to block on one or more ports
so we don't have a loop, we have the protocol
of Spanning Tree, the Spanning Tree Protocol, that
can dynamically identify those parallel paths
and block on one or more ports to prevent a loop.
I hope this has been informative for you,
and I'd like to thank you for viewing.