Learning objectives
- Explain the purpose and scope of Spanning Tree Protocol.
- Identify important protocols, roles, fields, and terminology.
- Apply the concept to a practical network scenario.
- Use IOS XE commands to verify operational behavior.
1. Core concepts
Layer 2 loops can cause broadcast storms, duplicate frames, and MAC-table instability because Ethernet frames do not have an IP TTL. STP creates a loop-free logical topology by placing selected redundant ports into a non-forwarding state.
2. How it works
Switches exchange BPDUs. The lowest Bridge ID wins the root bridge election. Each non-root switch selects a root port, its best path toward the root. Each segment has a designated port. RSTP improves convergence. PortFast is for edge ports and BPDU Guard protects edge ports from unexpected BPDUs.
Visual walkthrough
3. Worked example
If Switch A has the lowest Bridge ID, it becomes root. Each non-root switch selects its lowest-cost path toward A as root port. On a redundant segment, one port may become alternate and discard to prevent a loop.
IOS XE commands and verification
Syntax and feature availability can vary by device family and software release. Confirm platform support before applying configuration.
show spanning-tree show spanning-tree vlan 10 show spanning-tree root spanning-tree vlan 10 root primary interface gi1/0/10 spanning-tree portfast spanning-tree bpduguard enable
Common mistakes and troubleshooting
- Check physical and interface state before changing higher-layer settings.
- Verify both ends agree on addressing, VLAN, encapsulation, and protocol parameters.
- Use operational show commands; configured text alone does not prove a feature is working.
- Change one variable at a time and verify the result.
Knowledge check
Choose one answer per question. Submit to see why the correct choice is right and why every other option is wrong. These are original practice questions, not Cisco exam questions.
Spanning Tree Protocol quiz
3 questions · explanations for every option · retry enabled