Concept Guide
– Spanning Tree Protocol (STP)
– Rapid Spanning Tree Protocol (RSTP)
– Multiple Spanning Tree Protocol (MSTP)
– Per-VLAN Spanning Tree Plus (PVST+)
• When enabled on a port, root guard applies to all VLANs congured on the port.
• You cannot enable root guard and loop guard at the same time on an STP port. For example, if you congure root guard on a port on 
which loop guard is already congured, the following error message displays: • % Error: LoopGuard is configured. 
Cannot configure RootGuard.
• When used in an MSTP network, if root guard blocks a boundary port in the CIST, the port is also blocked in all other MST instances.
To enable the root guard on an STP-enabled port or port-channel interface in instance 0, use the following command.
• Enable root guard on a port or port-channel interface.
INTERFACE mode or INTERFACE PORT-CHANNEL mode
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 
conguration mode.
To verify the STP root guard conguration on a port or port-channel interface, use the show spanning-tree 0 guard 
[interface interface] command in a global conguration mode.
Enabling SNMP Traps for Root Elections and Topology 
Changes
To enable SNMP traps individually or collectively, use the following commands.
• Enable SNMP traps for spanning tree state changes.
snmp-server enable traps stp
• Enable SNMP traps for RSTP, MSTP, and PVST+ collectively.
snmp-server enable traps xstp
Conguring Spanning Trees as Hitless
You can congure STP, RSTP, MSTP, and PVST+ to be hitless (congure all or none as hitless). When congured as hitless, critical protocol 
state information is synchronized between the RPMs so that RPM failover is seamless and no topology change is triggered.
To be hitless per spanning tree type or for all spanning tree types, use the following commands.
• Congure LACP to be hitless.
CONFIGURATION mode
redundancy protocol lacp
• Congure all spanning tree types to be hitless.
CONFIGURATION mode
redundancy protocol xstp
970
Spanning Tree Protocol (STP)










