Enabling traps and Viewing trap configuration


no spanning-tree trap
[[errant-bpdu | loop-guard | new-root] | [topology-change [vlan<vid-list | instance [instance-ID] {cstt}|root-guard]]

Enables or disables SNMP traps for errant-BPDU, loop guard, new root, and root guard event notifications.


Enables SNMP notification when an errant BPDU is received. Designed for use with BPDU filtering.


Enables SNMP notification when a loop guard inconsistency is detected. Designed for use with the Loop Guard option.


Enables SNMP notification when a new root is elected on any VLAN configured for RPVST+ on the switch.


Enables SNMP notifications when a root-guard inconsistency is detected.


Enables notifications sent when a topology change occurs.


Shows the spanning tree topology history changes.

Default for all of the above options: Disabled

The no form of the command disables traps on the switch.


show spanning-tree traps

Displays the current spanning tree trap configuration on the switch.

Viewing spanning tree traps in the default configuration

switch(config)# show spanning-tree traps

 Status and Counters - STP Traps Information

 Trap Name              | Status
 ---------------------- + --------
 errant-bpdu            | Disabled
 new-root               | Disabled
 root-guard             | Disabled
 loop-guard             | Disabled