spanning-tree {0 | mstp | rstp | pvst} rootguard
0: enables root guard on an STP-enabled port assigned to instance 0.
mstp: enables root guard on an MSTP-enabled port.
rstp: enables root guard on an RSTP-enabled port.
pvst: enables root guard on a PVST-enabled port.
To disable STP root guard on a port or port-channel interface, use the no spanning-tree 0
rootguard command in an interface configuration mode.
To verify the STP root guard configuration on a port or port-channel interface, use the show spanning-
tree 0 guard [interface interface] command in a global configuration mode.
SNMP Traps for Root Elections and Topology Changes
To enable SNMP traps, use the following commands.
Enable SNMP traps for STP state changes.
snmp-server enable traps stp
Enable SNMP traps for RSTP, MSTP, and PVST+ collectively.
snmp-server enable traps xstp
Displaying STP Guard Configuration
To display the STP guard configuration, use the following command.
The following example shows an STP network (instance 0) in which:
Root guard is enabled on a port that is in a root-inconsistent state.
Loop guard is enabled on a port that is in a listening state.
BPDU guard is enabled on a port that is shut down (Error Disabled state) after receiving a BPDU.
Verify the STP guard configured on port or port-channel interfaces.
show spanning-tree 0 guard [interface interface]
Example of Viewing STP Guard Configuration
Dell#show spanning-tree 0 guard
Interface
Name Instance Sts Guard type Bpdu Filter
--------- -------- --------- ---------- ----------
Tengig 0/1 0 INCON(Root) Rootguard No
Tengig 0/2 0 LIS Loopguard No
Tengig 0/3 0 EDS (Shut) Bpduguard No
Dell#
924 Spanning Tree Protocol (STP)