So in this topology, let's determine why certain ports are set to forwarding and why certain ports
are blocking.
So we'll work through the spanning tree process.
The first decision that needs to be made is election of Route Bridge.
So one of these switches in the topology needs to become the route of the spanning tree.
So on switch one, as we saw previously.
Shows spanning tree shows us that the switch or bridge is the root of the spanning tree.
Switch to.
Is not the root of the spending tree.
So in the output here, we can see that it has a path cost to get to the route switch.
It sees that the route bridge or route switch has a route ID with a priority of this and MAC address
of this, which is different to the local switch MAC address.
So first decision.
How is the route determined?
It's based on lowest bridge ID, which consists of the priority and MAC address.
Switch one has the same priority as switch 232769.
So that can't be used to determine the spanning tree route.
So the tie breaker is based on the MAC address.
So lowest Mac address will win switch one has a lower Mac address when compared to switch two.
Once again, 0011 is the same on both switches, but notice c6ea is greater than c six ac in hexadecimal.
So switch one becomes the root of the spanning tree.
So that's the first decision.
Determine who the route bridge is.
Once again, priority 32768 is the default.
So we've now determined who the root bridges or root switches.
The next decision is that every non root switch needs to determine its root port.
The root port is its best port to get to the root bridge.
The root port is chosen based on lowest path cost.
If there's a tie breaker on that, then it's based on lowest neighbor bridge ID if path costs are the
same.
If that can't be used to determine the root port, then the lowest port priority is used.
The port priority is 128 by default, and if that can't be used, then the lowest port ID is used as
a tiebreaker.
So first decision is based on lowest pot cost.
Here's a table showing you the pot costs of Cisco switches.
They are either based on a 1998 ie triple E cost or 2004 ie triple E cost in the 1998 cost values.
A ten meg link has a cost of 100 hundred meg 19 one Gig four and ten gig two in the I triple E cost
in 2004.
And later, the costs change to the following.
So in our topology, we have gig interfaces on the switches, and if we look at the path cost of various
ports.
Notice the value associated is four.
So these gigabit links have a path cost value of four, which means that the switches are using the
old path cost method to determine the best path to a destination.
Now the first decision is to determine the route port based on the path cost.
In this topology, we have gigabit to zero zero connected directly to switch one gigabit zero one is
also directly connected to switch one.
Gigabit zero three is connected to a hub, which in turn is connected to switch one.
So the path cost of gigabit is zero.
Three would be eight if there was a switch connected here.
But at the moment the path cost is four because we have a hub instead of a switch.
So we have three ports with the same port cost to get to switch one on switch two, we can type show
spending tree three as an example and we can see that gigabit zero zero was chosen as the route port
to get to switch one, but that couldn't have been determined based on the path cost.
It would need to be determined based on something else.
So once again shows spanning tree.
So on switched to its chosen gigabit zero zero as its route port can path cost be used to determine
the best path to the route bridge based on its port numbers?
And the answer is no.
The path cost of this link is for the path.
Cost of this link is for the path cost of this link is four, but that can't be used as the determining
factor.
So the next choice is neighbor bridge ID.
Now this example, switch two is connected to switch one on two ports that are directly connected to
switch one.
So the neighboring bridge ID on both these ports is the same, so that cannot be used as the tiebreaker.
The next decision criteria is based on priority, but the priority of the ports are the same, so that
can be used as a tiebreaker.
So the port number is used as the tiebreaker.
One is a lower number than two.
So hence gigabit is zero zero is chosen as the root port in this topology.
Now once the root ports are chosen on a per segment basis, a designated port needs to be chosen.
The easiest way to work this out is imagine that you have a PC in the middle of the cable and it needs
to get to the root bridge using either the port on the left or the port on the right.
So if I had a PC in this topology, which port would it use to get to the root bridge?
And hopefully it's fairly obvious that this port is closer to the root bridge than this port.
And hence on this segment, gigabit zero zero to gigabit zero zero this port.
Put zero zero on switch.
One is the designated port.
A designated port is the best port to use on a per segment basis to get to the root bridge.
So this port is the best port to use on this top segment to get to the Root Bridge.
What about the segment?
So in this segment, imagine once again that you had a PC here.
What's its best port to use to get to the root bridge?
Well, it would be the sport here on switch one and once again on switch one.
We can see that by typing shows spanning tree notice gigabit is zero one on switch one is the designated
port for this segment.
The same is true for this segment, which is the best port to use to get to the root bridge.
It's going to be gigabit zero three on switch one.
And on this segment, looking at layer two switches running spanning tree, this port is the best port
to use to get to the root bridge.
So we've not chosen a designated port for the stop link.
The second link.
These links through the hub as well as this link.
The last remaining link is this link and the best port to use to get to the root bridge is this port
on switch to any other ports on the network will go blocking.
So this port gigabit zero one is put in the blocking state and so is gigabit zero three also put in
the blocking state now in rapid spanning tree or rapid PVS?
DT These are known as alternate ports.
In other words, on this hub, as an example, if we had a PC connected to it, if this link went down,
PCs could send traffic into the network using this alternate port because it would now transition to
the forwarding state when this link goes down.