What you’ll notice is Spanning Tree convergence is very quick
and that’s because we’re running Rapid PVST+
I didn’t make any changes on these switches from the Spanning Tree point of view.
So the command sh run | include span shows the default config
and notice the Spanning Tree used is Rapid PVST.
in the output, it shows us RSTP or Rapid Spanning Tree
but this is actually Rapid Per-VLAN Spanning Tree.
We can change the mode of spanning Tree
but before I do that just to make the point again.
at the moment sh spanning-tree on switch 3
shows that the root port is gigabit 0/1 this port.
If I shut that port down and then type sh spanning-tree again
what you’ll notice is gigabit 0/0 is the root port.
convergence is very quick with Rapid Spanning Tree
because it doesn’t use timers.
So the max age and forward delay timers are not used for convergence.
The switches send messages to each other
with Rapid Spanning Tree to enable quick convergence.
So now if we change the Spanning Tree type or mode to PVST
we should see that Spanning Tree takes a lot longer to converge.
So I’ll change that on all switches; switch 3, switch 4, switch 5.
So back on switch 3 sh spanning-tree
notice we can see that the switch is still learning
which ports are the root port
designated port or blocking port, when in the learning state
traffic will be block
user traffic will only be forwarded
when ports transition to the forwarding state.
At the moment you can see that the Spanning Tree
protocol used are shown here is IEEE
but once again you need to be careful
because on Cisco switches even though it displays IEEE
we're actually using PVST
PVST is once again backward compatible
so it will be able to talk to an 802.1D switch
from another vendor as an example
so we can see IEEE in the output here.
So once again sh spanning-tree
the root port, in this case, is now gigabit 0/0.
So what happened because previously we had switch 1 as the root.
It still has our command sh spanning-tree
shows us that the switch is the root of the topology
but gigabit 0/1 is not shown in the output here
because I need to no shut that port.
So conf t interface g0/1 no shut
sh spanning-tree
notice that port is a listening port
gigabit 0/0 is a blocking port.
So this port is blocking, this port is listening
and what you’ll notice is it will take it a while to converge
I'll put an IP address on this switch
I’ll be waiting and then I'll demonstrate this again.
Put an IP address on switch 1.
I’ll no shut the interface
so ping 10.1.1.1 it can ping itself
switch 3 no shut the interface
Ping 10.1.1.1 ping succeeds so I'll just do that again.
Notice the ping from switch 3 to switch 1 succeeds.
sh spanning-tree convergence has taken place
because gigabit 0/1 is the root port
and it's forwarding but now if I shut down gigabit 0/1
and then try and ping switch 1, the port has gone down
but pings are failing even though we have a redundant link.
sh spanning-tree
shows me that root port is still learning.
Still learning, pings failed, PVST takes a long time to converge
and take 30 seconds for that convergence take place.
As you can see there, it's just happened
sh spanning-tree
shows us now that gigabit 0/1 is forwarding.
But once again if I no shut gigabit 0/1
and did the ping again, the ping would fail
because it now needs to learn that this is the better path.
sh spanning-tree
notice the root port gigabit 0/1 is in the listening state.
So we have listening, then we have learning
and after while it should go to forwarding
but that can take 30 seconds
so it’s still learning, now it's gone to forwarding
and now pings will succeed.
So ports have different states.
in a blocking state, user traffic is not forwarded
the switch doesn’t learn MAC addresses based on frames received.
This is a stable state for a port.
A listening and learning port do not forward frames either
listening ports don’t learn MAC address based on frames received
In other words, they don’t update the MAC address table.
A learning port does update the MAC address table.
This is a temporary state or transitionary state
while the switch has learned the topology.
In a forwarding state frames are forwarded
MAC addresses are learned and this is a stable state
in other words, this is not a transitionary state
this state will stay that way until there's change in the topology.
A disabled port doesn’t receive6:01 PM 6/21/2017 frames, doesn’t forward frames
doesn’t learn about MAC addresses on a port
and this port will stand at state until you enable the port.
Now if we change that to Rapid Spanning Tree
So spanning-tree mode rapid-pvst
what we should notice is that convergence takes place a lot quicker.
I’ll only enable Rapid Spanning Tree on switch 1, 2 and 3
sh spanning-tree rather sh spanning-tree
shows us that the Spanning Tree mode now enabled
is Rapid Per-VLAN spanning Tree
we’ve got a path cost using gigabit 0/1
so as you can see gigabit 0/1 is the root port.
The switch can ping switch 1
I'll shut that port down and when we do a ping again
it instantly can ping switch 1
even though we’ve just seen the interface go down in the output here
because Spanning Tree converge is a lot quicker when using Rapid Spanning Tree.
So the moral of the story is that in the real world
you wanna use Rapid PVST rather than PVST.