STP Field Notes
April 13, 2026
Configuration, verification, and operational behavior of Spanning Tree
spanning-tree mst configuration
Spanning Tree Protocol (STP) Configuration Cheatsheet
1. Verify STP Configuration
Show STP Status for a Specific VLAN
show spanning-tree vlan [vlan-id]
Show STP Details on Interfaces
show spanning-tree interface [interface-id]
Enable STP (Default for most Cisco switches)
no spanning-tree vlan [vlan-id]
Enable PVST+ (Default on Cisco Switches)
Enable Rapid PVST+
spanning-tree mode rapid-pvst
Enable MST
3. Adjust STP Parameters
Set Bridge Priority
spanning-tree vlan [vlan-id] priority [value]
- Default Range: 0-61440, increments of 4096
- Default Value: 32768
Set Bridge Cost
spanning-tree cost [value]
- Default Values: Varies by interface speed (e.g., 100 Mbps = 19)
Set Hello Time
spanning-tree hello-time [seconds]
Set Forward Delay
spanning-tree forward-delay [seconds]
- Default Value: 15 seconds
Set Max Age
spanning-tree max-age [seconds]
- Default Value: 20 seconds
Set Root Bridge Priority
spanning-tree vlan [vlan-id] root primary
- Or use
root secondary for a secondary root bridge
- Use
spanning-tree portfast trunk for trunk ports
spanning-tree bpduguard enable
spanning-tree bpdufilter enable
spanning-tree portfast edge
4. MST Configuration
Define MST Instances
spanning-tree mst configuration instance [instance-id] vlan [vlan-id]
Map VLANs to MST Instances
instance [instance-id] vlan [vlan-list]
Verify MST Configuration
show spanning-tree mst configuration
Examples
Switch# configure terminal Switch(config)# spanning-tree mode pvst Switch(config)# spanning-tree vlan 1 priority 4096
Switch# configure terminal Switch(config)# interface GigabitEthernet0/1 Switch(config-if)# spanning-tree portfast
Switch# configure terminal Switch(config)# spanning-tree mst configuration Switch(config-mst)# instance 1 vlan 10,20 Switch(config-mst)# instance 2 vlan 30 Switch(config-mst)# name MST-PROTOCOL Switch(config-mst)# revision 1
Set Root Bridge Priority
Switch# configure terminal Switch(config)# spanning-tree vlan 1 root primary
Key Concepts
- Root Bridge: The central switch with the lowest Bridge ID.
- Port Cost: Determines the best path to the root bridge; lower costs are preferred.
- BPDU (Bridge Protocol Data Unit): Messages exchanged between switches to maintain STP.
- PortFast: Allows ports to transition to the forwarding state immediately, used for end-user devices.
- BPDU Guard: Prevents unauthorized devices from affecting the STP topology.
- MSTP: Supports multiple spanning trees, allowing different STP instances per VLAN.