π Lab Overview
This laboratory exercise focuses on understanding Spanning Tree Protocol convergence behavior, analyzing Topology Change Notification (TCN) BPDU processing, and troubleshooting network failures. You will simulate direct-link failures, indirect failures, and measure convergence timing to understand STP behavior during topology changes.
π― Lab Objectives
- Understand direct-link failures and how STP detects topology changes
- Master Topology Change Notification (TCN) BPDU processing
- Comprehend indirect failures and BPDU loss scenarios
- Monitor STP convergence timing and optimize performance
- Analyze MAC address table aging during topology changes
- Troubleshoot convergence delays and network instability
- Configure and test failover scenarios in production-like environments
π’ Real-World Scenario
You are a network engineer at a financial institution managing a three-switch STP topology. During business hours, a critical link fails between the root bridge and a distribution switch. Your task is to:
- Monitor and document TCN BPDU exchanges
- Verify MAC address table updates during convergence
- Measure convergence time and validate network stability
- Test alternate path activation and traffic resumption
π Network Topology
Three-Switch STP Topology with Redundant Links (Same as Lab 4.1):
Figure 1: Three-Switch STP Triangle Topology - Root Bridge (SW-A) with two active forwarding links to SW-B and SW-C, STP blocks redundant link between SW-B and SW-C to prevent loops
π Prerequisites
β οΈ Important: Complete Lab 4.1 (Root Bridge Election & Port Role Configuration) before starting this lab. All switches should have Rapid PVST+ configured with proper priority settings.
βοΈ Step-by-Step Lab Execution
1Monitor Initial STP Status Before Link Failure
Document baseline topology before simulating link failure
show spanning-tree vlan 1
show mac address-table
show interfaces trunk
Expected Output on SW-A (Root Bridge):
VLAN0001
Bridge ID Priority 4097 (priority 4096 sys-id-ext 1)
Address aabb.ccdd.eeff
Root ID Priority 4097
Address aabb.ccdd.eeff β I am the root
RootPort β
Interface Role Sts Cost Prio.Nbr Type
Gi0/1 Desg FWD 4 128.1 P2p
Gi0/2 Desg FWD 4 128.2 P2p
βΉοΈ Documentation: Record MAC address table entries and verify they are stable. This baseline is critical for comparing before/after convergence behavior.
2Enable Detailed Logging on All Switches
Configure timestamp and debug logging to capture TCN BPDU events
configure terminal
service timestamps log datetime msec
logging buffered 8192 debug
spanning-tree logging portfast bpdu-guard
spanning-tree logging portfast bpdu-filter
exit
Enable real-time debug output:
terminal monitor
debug spanning-tree events
debug spanning-tree bpdu
β Verification: Each console should show timestamped debug messages as events occur.
3Simulate Direct-Link Failure (SW-A to SW-C Link)
Disable link between SW-A (Root) and SW-C to trigger failure detection
configure terminal
interface gi0/2
shutdown
exit
exit
Immediately observe console output on all switches:
show spanning-tree vlan 1
show spanning-tree vlan 1 detail
π‘ What's Happening:
- Step 1: SW-A detects link failure on Gi0/2
- Step 2: SW-C detects failure on its Root Port (Gi0/1)
- Step 3: SW-C sends TCN BPDU upstream toward root
- Step 4: Root Bridge (SW-A) sends Configuration BPDU with TC flag set
- Step 5: All switches reduce MAC aging time temporarily
- Step 6: SW-C transitions Gi0/2 to Root Port role
4Document Convergence Timeline & Port State Changes
Record sequence of events and timing as network reconverges
show spanning-tree vlan 1 detail
show spanning-tree statistics vlan 1
show log | include "TCN\|Root\|transition"
Expected Convergence Timeline:
| Time (Seconds) |
Event |
STP Element |
| T+0 |
Link failure detected |
Port transitions to Discarding state |
| T+0-1 |
TCN BPDU sent upstream |
Topology Change Notification |
| T+1-3 |
Root Bridge receives TCN |
Configuration BPDU with TC flag sent |
| T+3-6 |
Alternate port promotes to Root Port |
Port transitions through ListeningβLearningβForwarding |
| T+6 |
Full convergence (Rapid PVST+) |
All ports in stable state |
β Rapid PVST+ Advantage: Convergence typically completes in 6 seconds with Rapid PVST+, compared to ~50 seconds with classic 802.1D STP.
5Verify New STP Topology After Convergence
Confirm traffic now flows via alternate path (SW-A β SW-B β SW-C)
show spanning-tree vlan 1
show spanning-tree root
show mac address-table
Expected Output on SW-C (After Convergence):
Bridge ID Priority 12289
Root ID Priority 4097
Address aabb.ccdd.eeff β Still SW-A (no re-election)
RootPort Gi0/2 β Changed from Gi0/1 (now via SW-B)
Interface Role Sts Cost Prio.Nbr Type
Gi0/1 Desg FWD/Discarding
Gi0/2 Root FWD 8 128.2 P2p β Direct path cost now higher
β Convergence Complete: SW-C now reaches root bridge via SW-B. Gi0/2 is now the Root Port with cost 8 (4+4 through SW-B).
6Re-enable Failed Link & Observe Re-convergence
Bring link back online and watch topology stabilize
configure terminal
interface gi0/2
no shutdown
exit
exit
Monitor convergence again:
show spanning-tree vlan 1 detail
β±οΈ Timing Observation: With Rapid PVST+, port transitions directly to Forwarding state through rapid handshake mechanism instead of waiting for Forward Delay timers.
7Simulate Indirect Failure - BPDU Filtering
Configure port to simulate BPDU loss while physical connectivity remains
configure terminal
interface gi0/1
spanning-tree bpdu-filter enable
exit
exit
Monitor console on all switches:
show spanning-tree vlan 1 detail
π‘ What's Happening:
- Step 1: BPDU filter enabled on SW-B Gi0/1
- Step 2: SW-C stops receiving Configuration BPDUs from root via SW-B
- Step 3: Max Age timer begins on SW-C
- Step 4: When Max Age expires, SW-C assumes root path invalid
- Step 5: SW-C recalculates topology and transitions Gi0/2 through states
8Monitor Max Age Timer & Convergence Delay
Document impact of Max Age timeout on convergence timing
show spanning-tree vlan 1 detail | include "Root\|Port 2\|Max Age\|Cost"
Expected Convergence Timeline for Indirect Failure:
| Time (Seconds) |
Event |
Impact |
| T+0 |
BPDU filter activated |
No immediate change; port appears up |
| T+0-20 |
Max Age timer running |
SW-C still believes root is reachable |
| T+20 |
Max Age expires |
SW-C transitions Root Port to Listening state |
| T+20-35 |
Listening + Learning states |
Default 15 seconds per state = 30 second delay |
| T+35 |
Port transitions to Forwarding |
Full convergence in 35 seconds (vs 6 sec for direct failure) |
β οΈ Impact of Indirect Failures: Indirect failures cause much longer convergence times (~35 seconds) because STP must wait for Max Age timer before detecting the problem. This is why monitoring link quality is critical.
9Remove BPDU Filter & Verify Recovery
Restore normal BPDU flow and confirm rapid convergence back to optimal state
configure terminal
interface gi0/1
no spanning-tree bpdu-filter enable
exit
exit
Verify convergence:
show spanning-tree vlan 1 detail
β Recovery: SW-C should quickly detect restored BPDU flow and return to optimal path through SW-B via direct link with lower cost.
10Trigger Topology Change & Monitor MAC Aging Reduction
Observe how MAC aging time changes during TCN processing
show mac address-table aging-time
show spanning-tree vlan 1 summary
Disable SW-A to SW-C link again (from earlier scenario):
configure terminal
interface gi0/2
shutdown
exit
exit
Immediately run on all switches:
show mac address-table aging-time
Expected Behavior During TCN:
- Global aging time during topology change: 15 seconds (reduced)
- Duration of reduced aging: ~30-35 seconds (varies by platform)
- After TCN processing: Returns to 300 seconds (default)
π‘ Why MAC Aging Reduction Matters:
- Prevents stale MAC entries from causing frame misdelivery
- Forces switches to relearn MAC locations via new paths
- Reduces unnecessary flooded frames during convergence
- Critical for business applications requiring fast failover
π Lab Completion Checklist
Convergence Testing Checklist
- β Direct-link failure scenario completed successfully
- β TCN BPDUs observed and documented during convergence
- β MAC address table aging reduction verified during topology change
- β Convergence time measured for direct failure (~6 seconds with Rapid PVST+)
- β Indirect failure scenario completed with BPDU filtering
- β Max Age timer impact documented (~35 seconds for indirect failure)
- β All port role transitions (Discarding β Listening β Learning β Forwarding) verified
- β Root Bridge remained stable (no re-election) during failures
- β Alternate paths activated correctly when primary links failed
- β Network recovered successfully after link restoration
- β Debug output logged and analyzed for all scenarios
- β Results documented in convergence measurement template
π‘ Key Concepts & Learning Outcomes
Direct-Link Failure Flow
- Link Detected as Down: Physical interface change detected immediately
- TCN BPDU Generated: Affected switch sends Topology Change Notification upstream
- Root Bridge Responds: Root sends Configuration BPDU with TC flag
- MAC Aging Reduced: All switches shorten aging time for faster relearning
- Port Role Changes: Alternate/Backup ports promoted through state transitions
- Convergence Complete: Network stabilizes (~6 seconds with Rapid PVST+)
Indirect Failure Characteristics
- Detection Delay: Requires Max Age timer to expire (~20 seconds default)
- Physical Link: Link remains up but BPDU flow is interrupted
- Port Behavior: Port doesn't immediately transition but waits for Max Age timeout
- Convergence Time: ~35 seconds total (20 sec wait + 15 sec transitions)
- Real-World Example: Unidirectional link failure, dirty fiber optic, or upstream switch CPU overload
Direct vs. Indirect Failures Comparison
| Aspect |
Direct Failure |
Indirect Failure |
| Detection Mechanism |
Link state change event |
Max Age timer expiration |
| Physical Link Status |
Down/Disabled |
Up but BPDU loss |
| TCN Timing |
Immediate (1-2 sec) |
Delayed (20+ sec) |
| Total Convergence |
~6 seconds (Rapid PVST+) |
~35 seconds |
| User Impact |
Brief service interruption |
Extended downtime |
π Best Practices & Optimization
STP Convergence Best Practices
- Always use Rapid PVST+ mode for faster convergence than classic 802.1D STP
- Monitor convergence timing regularly to identify network instability
- Enable proper logging for troubleshooting topology changes
- Test failover scenarios during maintenance windows
- Document baseline convergence times for trend analysis
- Consider timer optimization for ultra-low-latency environments
TCN BPDU Processing Best Practices
- Ensure all switches are synchronized on STP mode and timers
- Monitor for excessive topology changes indicating instability
- Verify MAC aging reduction is functioning during topology changes
- Use debug logging only during troubleshooting; disable in production
- Document topology change events for compliance and auditing
β Lab Completion Indicator: You have successfully completed Lab 4.2 when you can explain direct vs. indirect failure scenarios, understand TCN BPDU processing, measure and optimize convergence timing, and troubleshoot network instability during topology changes.