So let's look at that practically.
Yeah, I've got to switch one, switch two and switch three, switch two and switch three are connected
to a hub.
So that's following the topology shown in this Cisco guide.
I've just booted up the switches, so you can see they're coming up at the moment.
So these are brand new switches with no configuration at all.
Okay.
So on switch one, I'll set the host name to switch one.
Switch to, I'll set the host name to switch to.
You may be able to hear that.
My CPU.
He's maxed out while the switches are booting up.
So at the moment my gene is three.
VMM is at 87%, local CPU 62%.
But that'll settle down in a moment, which it now has.
So show shows.
Spanning tree.
So show spanning tree.
At the moment, the switch is not to the root.
You can see it's got a path cost to get to the route on gigabit zero one.
So I'm assuming that switch three is the route show show spanning tree.
We can see in the output here that switch three is the route switch of the topology.
So I'll change that.
I'm going to go onto switch one and top spending tree vlan one route.
And actually I'll just set it by priority.
So priority and let's set it to zero.
So show spanning tree.
We can see that the switch is now the root of the spanning tree for VLAN one.
We are running rapid pivot on the switch.
So some ports are still in the learning state.
But then they go to forwarding so we can see all ports on the switch are forwarding.
Those are the two ports of interest on switch one.
On switch to shows spanning tree.
So there's the come on show spending tree.
We're running rapid spending tree.
Podcast to get to the root is for out of Port one, which is gigabit zero zero.
Gigabit zero zero is the root port.
And notice how GIGABYTE zero one is the alternate port on the switch.
It's in the blocking state.
That's what we learnt in the Cisco document.
An alternate port on the switch means that there is a port on another switch that's the designated port.
In other words, it has a better path to get to the root bridge.
So let's look at switch three.
Show spanning tree on switch three.
It has a part cost of fall out of Port one, which is gigabit zero zero.
So this is the route port of switch three.
We can see that here once again, gigabit zero zero is the route put.
Into this output.
Gigabit zero one is the designated port and gigabit zero two is the back up port.
Back up port is in the blocking state.
Alternate port on switch two is in the blocking state.
So this port is blocking.
This port is blocking.
This is the only port that is forwarding on this segment connected to the hub.
So loops will be blocked in this topology even though we connect it to a hub.
That demonstrates the port roles and status that you get in rapid spanning tree on switch to once again
I'll just move this up a bit.
So on switch to.
Connected to the hub on gigabit.
Zero one.
Gigabit S01 is an alternate port.
That is the roll.
The status of the port is blocking.
Gigabit is zero zero.
On that switch is a route port.
That is the role and the status is forwarding on switch three.
Gigabit.
Zero zero.
This port is the root port.
It has a status of forwarding.
That's the best port to use to get to the root bridge.
Gigabit is zero one.
In other words, this connection is the designated port.
The role is designated.
The status is forwarding this interface.
Gigabit zero two is a backup port.
That is the role the status is blocking.
So blocking or discarding to use the industry standard term is the state of alternate as well as backup
ports.
Route ports and designated ports have the forwarding status in a stable topology.
A state of learning means that traffic is still being discarded on the port.
So as an example.
On Gigabit zero zero.
I'll shut the port down.
Shows spanning tree notice gigabit is everyone is now forwarding gigabit zero two is the alternate put
in a blocking state.
The support here is now the designated port.
It's in the learning status, which will hopefully move to forwarding in a moment.
And there you go.
The reason why it took time to transition to the forwarding state is that this is a shared port, not
a point to point port, point to point ports.
Transition immediately to forwarding shared ports.
Don't they have to go through the timers of learning and then forwarding?
So scrolling up we saw a learning state and then it went to the forwarding state.
That's because it's a shared port, which means a half duplex interface.
In other words, you connect it to a hub.
This port should be configured as a point to point link because it's a direct connection from one switch
to another.
So as an example, what we should be doing is on gigabit zero zero, we should type.
Spanning tree link type.
Point to point, and we want to do that on both sides.
Typically in the real world, your switches would negotiate a point to point link if the duplex was
set to full.
We'll do something similar on switch three.
Gigabit zero zero should be point to point and gigabit is zero.
One should be point to point.
In other words, this link is point to point.
This link is point to point.
So back on switch to shows spanning tree.
Notice the port type is point to point which allows for quicker convergence.
On switch one show spanning tree both gigabit zero zero and gigabit zero one or point to point lengths.