129
instance
region-name
vlan-mapping modulo
snmp-agent trap enable stp
Use snmp-agent trap enable stp to enable SNMP notifications for new-root election events
or spanning tree topology changes.
Use
undo snmp-agent trap enable stp to disable SNMP notifications for new-root election
events or spanning tree topology changes.
Syntax
snmp-agent trap enable stp [ new-root | tc ]
undo snmp-agent trap enable stp
[ new-root | tc ]
Default
SNMP notifications are disabled for new-root election events.
In MSTP mode, SNMP notifications are enabled in MSTI 0 and disabled in other MSTIs for spanning
tree topology changes.
In PVST mode, SNMP notifications are disabled for spanning tree topology changes in all VLANs.
Views
System view
Predefined user roles
network-admin
Parameters
new-root: Enables the device to send notifications if the device is elected as a new root bridge.
This keyword applies only to STP, MSTP, and RSTP modes.
tc: Enables the device to send notifications if the device receives TCN BPDUs. This keyword
applies only to PVST mode.
Usage guidelines
If no keyword is specified, the snmp-agent trap enable stp command applies to SNMP
notifications for different events as follows:
• In STP, MSTP, and RSTP modes, the command applies to SNMP notifications for new-root
election events.
• In PVST mode, the command applies to SNMP notifications for spanning tree topology
changes.
Examples
# Enable SNMP notifications for new-root election events.
<Sysname> system-view
[Sysname] snmp-agent trap enable stp new-root
stp bpdu-protection
Use stp bpdu-protection to enable BPDU guard globally.
Use
undo stp bpdu-protection to disable BPDU guard globally.