Hands-On Lab: Verifying Spanning Tree Port States on Catalyst Switches

This hands-on lab observes a switch port transitioning through the Spanning Tree Protocol states of blocking, listening, learning, and forwarding as it comes online, and covers the show commands used to check a port's current state and role.

STP Port StatesBlocking to Forwarding TransitionSpanning Tree Verification

~3 min read · Updated Sep 22, 2026

Lab Objective

Observe a switch interface progress through Spanning Tree Protocol's port states after being enabled, and use show commands to identify a port's current state and role at any given moment.

Lab Purpose

Understanding STP port states is essential both for recognizing normal, expected link startup delay and for diagnosing situations where a port remains stuck in an unexpected state, such as permanently blocking when it should be forwarding.

Lab Topology

Switch1 ---- Gi1/0/5 ---- Switch2

A redundant second link also exists between
Switch1 and Switch2 via Gi1/0/6, creating a
loop that STP must resolve

Task 1: Verify Current Spanning Tree Operation

Use a show command to display the current Spanning Tree state and role of both Gi1/0/5 and Gi1/0/6 on Switch1.

Task 2: Trigger a State Transition

Shut down and then re-enable Gi1/0/5, and immediately begin checking its state repeatedly to observe the transition sequence.

Task 3: Identify the Port Roles

Determine which of the two redundant links is in the forwarding state (either root or designated) and which is blocking.

Task 4: Confirm the Final Stable State

After allowing sufficient time for convergence, confirm both ports have reached their final stable state.

Solution and Verification

Switch1# show spanning-tree vlan 1

Interface     Role  Sts  Cost   Prio.Nbr  Type
Gi1/0/5       Desg  FWD  4      128.5     P2p
Gi1/0/6       Altn  BLK  4      128.6     P2p

Switch1(config)# interface gigabitethernet1/0/5
Switch1(config-if)# shutdown
Switch1(config-if)# no shutdown

Switch1# show spanning-tree interface gigabitethernet1/0/5

-- Checked repeatedly over roughly 30-50 seconds:

Interface        Role Sts Cost
Gi1/0/5          Desg BLK 4      (immediately after no shutdown)
Gi1/0/5          Desg LIS 4      (a few seconds later)
Gi1/0/5          Desg LRN 4      (a few seconds after that)
Gi1/0/5          Desg FWD 4      (finally stable, ~30-50 sec total)

Switch1# show spanning-tree vlan 1

Interface     Role  Sts  Cost   Prio.Nbr  Type
Gi1/0/5       Desg  FWD  4      128.5     P2p
Gi1/0/6       Altn  BLK  4      128.6     P2p
-- Gi1/0/5 is Designated/Forwarding (actively
-- carrying traffic), while Gi1/0/6 remains
-- Alternate/Blocking (physically connected but
-- not forwarding, ready as backup) -- this is
-- exactly the expected result of STP resolving
-- the redundant loop between the two switches

Key Takeaway

A port cycling through Blocking, Listening, Learning, and finally Forwarding after being enabled is completely normal behavior taking up to 30-50 seconds with classic 802.1D STP — a port that never progresses beyond Blocking or Listening after this delay window signals a genuine problem worth investigating further, rather than simply needing more time.

Written & researched by Dr. Shahin Siami

Related Articles

Hands-On Lab: Assigning Spanning Tree Priority to Multiple VLANs Simultaneously

This hands-on lab configures Spanning Tree bridge priority across several VLANs in a single command using a VLAN range, rather than repeating the configuration individually for each VLAN, and verifies the priority was correctly applied to every VLAN in the range.

Continue

Hands-On Lab: Configuring Spanning Tree Root Bridges Using the IOS Macro Command

This hands-on lab uses the spanning-tree root primary and root secondary macro commands to configure a primary and backup root bridge without manually calculating priority values, and verifies IOS automatically selects an appropriate priority relative to the current root.

Continue

Hands-On Lab: Configuring Spanning Tree Protocol Root Bridges Manually

This hands-on lab manually influences Spanning Tree root bridge election by adjusting bridge priority on two competing switches, verifying which switch becomes root before and after the change, and confirming the resulting port roles update accordingly.

Continue

Hands-On Lab: Restricting Allowed VLANs on Trunks and Changing VTP Version

This hands-on lab covers restricting which VLANs are permitted to cross a specific trunk link, preventing unnecessary broadcast traffic and improving security, and separately covers safely changing a switch's VTP version within an existing domain.

Continue

Hands-On Lab: Changing the Native VLAN and Shutting Down Unused Ports

This hands-on lab covers changing a trunk's native VLAN away from the default VLAN 1 for security purposes, and shutting down unused switch ports as a baseline hardening practice, verifying both changes with appropriate show commands.

Continue

Hands-On Lab: Configuring Extended VLANs on Cisco Catalyst Switches

This hands-on lab covers creating VLANs in the extended range above 1005, explains why VTP version matters for supporting them, and verifies an extended VLAN functions identically to a standard-range VLAN once created.

Continue