Spanning Tree Protocol · · 2 min read

STP Configuration Checklist: Hardening Spanning Tree Before Go-Live

This is the capstone article: a comprehensive pre-deployment checklist covering all STP hardening requirements. Organized by switch role, this checklist ensures your campus network STP implementation is secure, predictable, and ready for production traffic.

Pre-Deployment STP Hardening Checklist

This checklist guides you through configuring and verifying a production-grade STP topology. Follow it section by section during a maintenance window, testing at each step.

1. Planning Phase

Before any configuration, plan the topology carefully. Document:

2. Core Switch Configuration

2.1 Set STP Mode

spanning-tree mode rapid-pvst

2.2 Configure Root Bridge

spanning-tree vlan 1-4094 root primary
spanning-tree vlan 1-4094 priority 4096

2.3 Enable PortFast

spanning-tree portfast default

2.4 Enable BPDU Guard

spanning-tree portfast bpdu-guard default
errdisable recovery cause bpduguard
errdisable recovery interval 30
interface range Gi1/0/3-24
spanning-tree guard root
exit

2.6 Enable Loop Guard on Trunks

interface range Gi1/0/1-2
spanning-tree guard loop
exit

3. Distribution/Access Switch Configuration

Repeat steps 2.1-2.6 on all distribution and access switches.

3.1 Secondary Root (if applicable)

spanning-tree vlan 1-4094 root secondary
spanning-tree vlan 1-4094 priority 8192
interface Gi1/0/1
spanning-tree port-priority 0
exit

interface Gi1/0/2
spanning-tree port-priority 32
exit

4. Verification Commands

Check Root Election

show spanning-tree root

All switches should report the same root bridge.

Check Port Roles

show spanning-tree

Expected:

Check for Inconsistent Ports

show spanning-tree inconsistentports

Should be empty (no Root Guard or Loop Guard blocks in steady state).

Check MAC Stability

show mac address-table dynamic

MAC addresses should be stable (not flapping between ports).

5. Failover Testing

Test Root Failover

Shutdown the primary root's uplink. Verify:

Test Access Port Failover

Shutdown an access switch's primary uplink. Verify:

Test BPDU Guard

Connect a switch to an access port. Verify:

show interfaces status err-disabled

Port should show "err-disabled bpduguard".

6. Production Sign-Off

7. Long-Term Operations

Summary: STP Best Practices

  1. Explicit configuration: Don't rely on defaults.
  2. Rapid PVST+ only: Never use legacy 802.1D or PVST+.
  3. Root bridge in core: Primary at core, secondary at distribution.
  4. Deterministic topology: Use port priorities for predictability.
  5. Guards on every port: BPDU Guard (access), Root Guard (distribution downlinks), Loop Guard (trunks).
  6. Monitor relentlessly: Keep logs, alert on errdisable events.
  7. Document everything: Topology documentation is critical.
  8. Test failover: Verify convergence before production deployment.

Read next

© 2025 Ping Labz. All rights reserved.