Lesson 5 — STP and Rapid PVST+ Basics
Week 3 outline
- Week 3 overview
- Lesson 1Switch MAC Learning and Forwarding
- Lesson 2VLANs and Broadcast Domains
- QuizSwitching & VLAN Fundamentals
- Lesson 3Trunks, 802.1Q, and Native VLAN
- Lesson 4Voice VLANs
- QuizTrunking & Voice VLANs
- Lesson 5STP and Rapid PVST+ Basics (current step)
- Lesson 6EtherChannel and LACP Basics
- QuizRedundancy: STP & EtherChannel
- LabVLAN and Trunk Lab (progressive)
- Lesson 7CDP and LLDP Neighbor Discovery
- CheckpointWeek 3 Checkpoint
STP and Rapid PVST+ Basics
Explain why redundant switch links need loop prevention, work a root election and port-role assignment by hand, and read Rapid PVST+ roles and states in show spanning-tree.
Lesson orientation
What you'll learn (5 objectives)~42 min: video → lesson → check → apply → lab prep
Learning objectives
- Explain how a Layer 2 loop causes a broadcast storm because Ethernet frames have no TTL
- Elect a root bridge from bridge IDs — priority then MAC — and justify per-VLAN priority
- Assign root, designated, and blocking/discarding ports using path cost and the tie-break order
- Distinguish classic STP states from Rapid PVST+ roles and discarding/learning/forwarding states
- Read show spanning-tree to confirm the root, the local port roles, and per-VLAN behaviour
Terms you will see
Time breakdown
- Read the notes20 min
- Rapid PVST+ Visual Lab10 min
- Build-the-tree practice6 min
- Lab stage — read and steer the tree6 min
Assigned video

Spanning Tree Protocol Part 1 (Day 20)
By Jeremy's IT Lab · Opens externally on YouTube
- Assigned watch
- ~10 min
The link opens in a new browser tab. Return here when you finish watching.
Watch for these concepts
- The lowest-bridge-ID root election playing out
- Each non-root switch selecting one root port by lowest cumulative cost
- The leftover redundant port ending in blocking or discarding
Go beyond the video
The assigned video introduces the idea. CCNA Practice Labs completes the learning path: clarify core concepts, explore how each device behaves, visualize the communication path, check your understanding, and prepare for hands-on lab work.
Watch the concept → understand it → visualize it → practice it → apply it.
Ethernet has no TTL
An IP packet carries a TTL that each router decrements until it reaches zero, which kills packets caught in a routing loop. An Ethernet frame has no such field. If a Layer 2 loop exists, a frame can circulate indefinitely — there is no mechanism in the frame itself to stop it.
Now combine that with the flooding behaviour from Lesson 1. A broadcast floods out both links of a redundant pair. Each copy reaches the other switch, which floods it again, back across both links. Copies multiply on every pass. Within seconds the links saturate, switch CPUs spike, and the MAC table flaps as the same source MAC keeps appearing on different ports on each lap. That is a broadcast storm, and it takes the entire Layer 2 network down.
Convergence follows five moves. Switches exchange Bridge Protocol Data Units and agree on one root bridge as the reference point. Every non-root switch then picks its single root port, its best path toward the root. Each link segment gets one designated port, the forwarding port onto that segment. Any remaining redundant port is put into blocking — the classic name — or discarding, the rapid name. If the topology changes, the tree recomputes and a standby port takes over. Classic 802.1D can take around 50 seconds to do this: max-age 20 seconds plus two 15-second forward-delay stages. Modern switches run the rapid version and converge in seconds.
Root election: lowest Bridge ID wins
The Bridge ID is the bridge priority followed by the switch's MAC address. The switch with the lowest Bridge ID becomes root. Priority is compared first — the range is 0 to 65535, the default is 32768, and it is configured in steps of 4096. Lower wins. If priorities tie, the MAC address breaks it, and again lower wins.
Cisco runs a separate spanning tree per VLAN, called PVST+ or Rapid PVST+. To keep Bridge IDs distinct per VLAN, the switch adds the VLAN ID to the base priority — the extended system ID — so the effective priority is normally the base plus the VLAN number. The practical consequence is useful: VLAN 10 and VLAN 20 can elect different roots and therefore block different physical ports, which lets you load-balance traffic across redundant links instead of leaving one idle.
Port roles and how they are chosen
| Role | Where it appears | State |
|---|---|---|
| Root port | One per non-root switch — its best path to the root | Forwarding |
| Designated port | One per segment, including every port on the root bridge | Forwarding |
| Alternate / blocked | The leftover redundant port | Blocking (802.1D) / Discarding (Rapid) |
- Every port on the root bridge is designated and forwarding. The root never blocks — this alone answers many exam questions.
- On each non-root switch, the root port is the port with the lowest cumulative path cost to the root.
- On each segment, whichever end has the lower cost to the root owns the designated port.
- The remaining port — the higher-cost side of the redundant link — blocks or discards.
Path cost is speed-based and cumulative: each link adds a cost according to its speed, and the switch sums them along the path to the root. Lower total wins.
| Link speed | STP port cost |
|---|---|
| 10 Mbps | 100 |
| 100 Mbps | 19 |
| 1 Gbps | 4 |
| 10 Gbps | 2 |
Reading show spanning-tree
VLAN0010
Spanning tree enabled protocol rstp
Root ID Priority 24586
Address 0011.1111.1111
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24586 (priority 24576 sys-id-ext 10)
Address 0011.1111.1111
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------
Gi0/1 Desg FWD 4 128.1 P2p
Gi0/2 Desg FWD 4 128.2 P2pRead it top-down. The protocol line confirms rstp, meaning Rapid PVST+. Compare Root ID against Bridge ID: when they match and the output says this bridge is the root, this switch is the root for VLAN 10. On a non-root switch you would instead see the neighbour's address as Root ID, one interface with Role Root and status FWD, and the redundant interface with Role Altn and status BLK. The priority 24576 sys-id-ext 10 line shows the per-VLAN arithmetic: 24576 plus VLAN 10 gives the 24586 above it.
! Make THIS switch the root for VLAN 10 (lowers priority to 24576)
Switch(config)# spanning-tree vlan 10 root primary
! Equivalent explicit form
Switch(config)# spanning-tree vlan 10 priority 24576root primary lowers the priority so this switch wins the election instead of leaving it to the lowest MAC. Do it per VLAN — that is exactly how you split VLAN 10 and VLAN 20 across different roots for load balancing. There is a matching root secondary for the backup core.
When the tree reorganises around the wrong switch
What you should retain
- Ethernet has no TTL, so a Layer 2 loop becomes a broadcast storm; STP blocks redundant paths to leave one active path.
- The root is the lowest Bridge ID — priority first, then MAC — and every port on the root bridge is designated and forwarding.
- Each non-root switch has exactly one root port, the lowest cumulative cost to the root; the leftover port blocks or discards.
- Cost is speed-based and cumulative: 1 Gbps is 4, 100 Mbps is 19.
- Ties break on sender Bridge ID, then sender port priority, then sender port ID.
- Rapid PVST+ is a fast per-VLAN tree with states discarding, learning, and forwarding.
Before you read on
Three switches, all at default priority 32768, base MACs ending SW1 …1111, SW2 …2222, SW3 …3333. All links are 1 Gbps (cost 4), wired as a triangle. (1) Which switch is root, and why? (2) SW2 has one port direct to SW1 and one reaching SW1 via SW3 — which is its root port? (3) On the SW2–SW3 segment, which end is designated and which port blocks?
See it happen
Rapid PVST+ Visual Lab
Run an election and watch the port roles resolve, then change a priority and watch the tree re-converge around a different root. Root election and role assignment are the hardest part of this lesson to hold in your head from prose, and this is the one place where watching it happen genuinely beats reading about it.
Prepare for the lab
Week 3 Lab — VLAN and Trunk (stage 3 of 4)
The redundant trunk links you built in Lesson 3 are a ready-made loop. This stage reads and then steers the tree over that same topology — no new cabling, just a second link between SW1 and SW2 with the default STP already running on it.
This lesson prepares you to:
- • Identifying the root bridge and local port roles from show spanning-tree vlan 10
- • Predicting the root from the bridge IDs before running the command
- • Setting a deterministic root with spanning-tree vlan 10 root primary
- • Observing that VLAN 20 stays rooted elsewhere — per-VLAN spanning tree in practice
Keep the topology: Lesson 6 bundles these same two links into an EtherChannel.
Open the labStudy deeper
Topic guides extend this lesson — they do not replace the first-party walkthrough above.
STP & EtherChannel
For broadcast storms, BPDU format, and the STP version history in depth — the background this lesson compresses into one paragraph
