spanning-tree trap

Syntax

spanning-tree trap {new-root | topology-change [vlan] | errant-bpdu | root-guard-inconsistency | loop-guard-inconsistency} no spanning-tree trap {new-root|topology-change [vlan] | errant-bpdu | root-guard-inconsistency | loop-guard-inconsistency}

Description

This command enables SNMP traps for new root, topology change event, errant-bpdu received event, root-guard inconsistency, and loop-guard inconsistency notifications. It is disabled by default.

Thenoform of this command disables SNMP traps for new root and topology change event notifications.

Command context

config

Parameters

new-root

Enables SNMP notification when a new root is elected on any PVST vlan on the switch.

topology-change

Enables SNMP notification when a topology change event occurred in specified PVST vlan on the switch.

errant-bpdu

Enables SNMP notification when an errant bpdu is received by any PVST vlan on the switch.

root-guard-inconsistency

Enables SNMP notification when the root-guard finds the port inconsistent for any PVST vlan on the switch.

loop-guard-inconsistency

Enables SNMP notification when the loop-guard finds the port inconsistent for any PVST vlan on the switch.

Authority

Administrators or local user group members with execution rights for this command.

Examples

Commands enabling spanning-tree trap features:
switch(config)#spanning-tree trap新的根启用时发送通知a new root is elected topology-change Enable notifications which are sent when a topology change occurs errant-bpdu Enable notifications which are sent when an errant bpdu is received root-guard-inconsistency Enable notifications which are sent when root guard inconsistency occurs loop-guard-inconsistency Enable notifications which are sent when root guard inconsistency occurs switch(config)#spanning-tree trap new-root switch(config)#spanning-tree trap topology-changevlan Enable topology change notification for the specified PVST vlan id. switch(config)#spanning-tree trap topology-change vlan<0-64> Enable topology change information on the specified vlan id. switch(config)#spanning-tree trap topology-change vlan 1 switch(config)#spanning-tree trap errant-bpdu switch(config)#spanning-tree trap root-guard-inconsistency switch(config)#spanning-tree trap loop-guard-inconsistency
Commands disabling spanning-tree trap features:
switch(config)#no spanning-tree trapnew-root Disable notifications which are sent when a new root is elected topology-change Disable notifications which are sent when a topology change occurs errant-bpdu Disable notifications which are sent when an errant bpdu is received root-guard-inconsistency Disable notifications which are sent when root guard inconsistency occurs loop-guard-inconsistency Disable notifications which are sent when root guard inconsistency occurs switch(config)#no spanning-tree trap new-root switch(config)#no spanning-tree trap topology-changeinstance Disable topology change notification for the specified PVST vlan id. switch(config)#no spanning-tree trap topology-change vlan<0-64> Disable topology change information on the specified PVST vlan id. switch(config)#no spanning-tree trap topology-change vlan 0 switch(config)#no spanning-tree trap errant-bpdu switch(config)#no spanning-tree trap root-guard-inconsistency switch(config)#no spanning-tree trap loop-guard-inconsistency