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 دقیقه مطالعه · آخرین به‌روزرسانی ۳۱ شهریور ۱۴۰۵

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.

نوشته و پژوهش‌شده توسط دکتر شاهین صیامی

مقالات مرتبط

Hands-On Lab: Final Comprehensive CCNP Troubleshooting Challenge (BGP, DMVPN, and QoS Integration)

This hands-on lab presents a complex multi-layer failure across an integrated BGP-over-DMVPN topology combined with QoS marking, requiring systematic diagnosis of a route reflector misconfiguration, an NHRP registration failure, and an incorrectly applied QoS policy simultaneously affecting the same network.

ادامه

Hands-On Lab: Configuring BGP over DMVPN

This hands-on lab runs iBGP as the routing protocol across the same DMVPN hub-and-spoke topology used in the two previous labs, configuring the hub as a route reflector so spokes learn each other's routes without a full iBGP mesh, combining two previously separate concepts into one integrated design.

ادامه

Hands-On Lab: Configuring OSPF over DMVPN

This hands-on lab runs OSPF as the dynamic routing protocol across the same DMVPN hub-and-spoke topology, configuring the tunnel interface as an OSPF point-to-multipoint network type to correctly handle the hub-and-spoke adjacency pattern without requiring the broadcast network type's DR/BDR election.

ادامه

Hands-On Lab: Configuring EIGRP over DMVPN

This hands-on lab runs EIGRP as the dynamic routing protocol across the DMVPN hub-and-spoke topology built in earlier labs, verifying neighbor relationships form correctly across the multipoint tunnel and routes propagate without requiring per-spoke static configuration on the hub.

ادامه

Hands-On Lab: Configuring HSRP MD5 Authentication

This hands-on lab configures MD5 authentication on an HSRP group, verifying two routers with matching authentication strings form a normal active/standby relationship while a router with a mismatched string is excluded from the group entirely.

ادامه

Hands-On Lab: Configuring Cisco Umbrella-Style DNS Security via DNS Forwarding Redirection

This hands-on lab configures a router to redirect all client DNS queries toward a security-focused DNS resolver using DNS forwarding interception, approximating cloud-delivered DNS security enforcement without requiring per-client configuration changes.

ادامه