In the previous lesson, you saw how RSTP works: the Discarding state, the Alternate Port and the fast convergence.
Cisco switches do not run plain RSTP. They run Rapid PVST+: RSTP (IEEE 802.1w) with one instance per VLAN.

Figure 1 – One RSTP Instance per VLAN
Each VLAN elects its own root bridge and converges on its own.
In this lesson, only VLAN 1 exists, so each switch runs one instance.
Answer the question below
A switch carries VLAN 1, VLAN 10 and VLAN 20 in Rapid PVST+. How many RSTP instances does it run?
You work on three switches. SW1 is the root bridge, with the lowest Bridge ID.

Figure 2 – Rapid PVST+ Lab Topology
By default, Cisco switches run classic PVST+ (802.1D). You enable Rapid PVST+ with one command per switch.
Configure the Three Switches
Start with SW1:
SW1# conf t Enter configuration commands, one per line. End with CNTL/Z. SW1(config)# spanning-tree mode rapid-pvst SW1(config)# endThen SW2:
SW2# conf t Enter configuration commands, one per line. End with CNTL/Z. SW2(config)# spanning-tree mode rapid-pvst SW2(config)# endAnd SW3:
SW3# conf t Enter configuration commands, one per line. End with CNTL/Z. SW3(config)# spanning-tree mode rapid-pvst SW3(config)# endRun the same command on every switch. A switch left in classic PVST+ falls back to the legacy timers.
Verify the Mode
Check the mode on SW3:
SW3# show spanning-tree summary Switch is in rapid-pvst mode Extended system ID is enabled Portfast Default is disabled Portfast Edge BPDU Guard Default is disabled Portfast Edge BPDU Filter Default is disabled Loopguard Default is disabled PVST Simulation Default is enabled but inactive in rapid-pvst mode Bridge Assurance is enabled EtherChannel misconfig guard is enabled Configured Pathcost method used is short UplinkFast is disabled BackboneFast is disabled Name Blocking Listening Learning Forwarding STP Active ---------------------- -------- --------- -------- ---------- ---------- VLAN0001 1 0 0 1 2 ---------------------- -------- --------- -------- ---------- ---------- 1 vlan 1 0 0 1 2The first line confirms the mode. VLAN0001 has one blocking port and one forwarding port.
Answer the question below
Which command switches a Cisco switch to Rapid PVST+?
Now look at the roles RSTP gives to the ports of SW3:
SW3# show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol rstp Root ID Priority 24577 Address 50ba.7604.6500 Cost 4 Port 1 (GigabitEthernet0/0) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 5043.cd04.6700 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi0/0 Root FWD 4 128.1 P2p Gi0/1 Altn BLK 4 128.2 P2pYou can see:
rstp: the instance runs Rapid Spanning Tree
Gi0/0 Root FWD: the Root Port toward SW1, forwarding
Gi0/1 Altn BLK: the Alternate Port, an immediate backup in the Discarding state
P2p: a point-to-point link, where RSTP can move fast

Figure 3 – SW3 Root Port and Alternate Port
BLK in the output is the Discarding state. The Alternate Port already knows a second path to SW1.
Answer the question below
Which role does the output show for SW3 Gi0/1?
Cut the Root Port of SW3 and watch what happens to the Alternate Port.
Shut Down the Root Port
On SW3, shut down G0/0:
SW3# conf t Enter configuration commands, one per line. End with CNTL/Z. SW3(config)# int g0/0 SW3(config-if)# shutdown %LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to administratively down %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to down SW3(config-if)# end
Figure 4 – The Alternate Port Becomes the Root Port
Verify the New Root Port
Check VLAN 1 again on SW3:
SW3# show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol rstp Root ID Priority 24577 Address 50ba.7604.6500 Cost 8 Port 2 (GigabitEthernet0/1) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 5043.cd04.6700 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi0/1 Root FWD 4 128.2 P2pG0/1 is now the Root Port, in the Forwarding state. The path to SW1 goes through SW2, so the cost rises from 4 to 8.
RSTP skips the Listening and Learning delays of classic STP. The Alternate Port moved to Forwarding in under a second, where classic STP would take up to 50 seconds.
Answer the question below
After the shutdown, which SW3 port is the Root Port?
Restore the Link
Bring G0/0 back up before the next step:
SW3# conf t Enter configuration commands, one per line. End with CNTL/Z. SW3(config)# int g0/0 SW3(config-if)# no shutdown %LINK-3-UPDOWN: Interface GigabitEthernet0/0, changed state to up %LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up SW3(config-if)# endG0/0 is the Root Port again, and G0/1 goes back to Alternate.
Answer the question below
After the no shutdown, which role does SW3 G0/1 take again?
SW2 and SW3 both reach SW1 with a cost of 4. To pick the Designated Port on the link between them, they compare their Bridge IDs, and SW2 wins with 28673 against 32769.
Lower the priority of SW3 to change the result.
Change the SW3 Priority
Set the VLAN 1 priority of SW3 to 28672, the same as SW2:
SW3# conf t Enter configuration commands, one per line. End with CNTL/Z. SW3(config)# spanning-tree vlan 1 priority 28672 SW3(config)# endThe priority is now the same on both switches: 28672 + VLAN 1 = 28673. The MAC address breaks the tie:
SW3: 5043.cd04.6700
SW2: 50b3.1604.6600
5043 is lower than 50b3, so SW3 now has the lower Bridge ID.

Figure 5 – The Alternate Port Moves to SW2
Verify on SW2
The Alternate Port has moved. Check it on SW2:
SW2# show spanning-tree vlan 1 VLAN0001 Spanning tree enabled protocol rstp Root ID Priority 24577 Address 50ba.7604.6500 Cost 4 Port 1 (GigabitEthernet0/0) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 28673 (priority 28672 sys-id-ext 1) Address 50b3.1604.6600 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi0/0 Root FWD 4 128.1 P2p Gi0/1 Altn BLK 4 128.2 P2pSW2 G0/1 is now the Alternate Port, and SW3 G0/1 forwards as the Designated Port.
Answer the question below
Which switch now holds the Alternate Port on the SW2–SW3 link?
Answer the question below
You set a switch to priority 4096 in VLAN 10. Which priority value does show spanning-tree vlan 10 display?