Specifications
2-272
Catalyst 2950 and Catalyst 2955 Switch Command Reference
78-15304-01
Chapter 2 Cisco IOS Commands
spanning-tree guard
spanning-tree guard
Use the spanning-tree guard interface configuration command to enable root guard or loop guard on
all the VLANs associated with the selected interface. Root guard restricts which interface is allowed to
be the spanning-tree root port or the path-to-the root for the switch. Loop guard prevents alternate or
root ports from becoming designated ports when a failure creates a unidirectional link. Use the no form
of this command to return to the default setting.
spanning-tree guard {loop | none | root}
no spanning-tree guard
Syntax Description
Defaults Root guard is disabled.
Loop guard is configured according to the spanning-tree loopguard default global configuration
command (globally disabled).
Command Modes Interface configuration
Command History
Usage Guidelines You can enable root guard or loop guard when the switch is operating in the per-VLAN spanning-tree
(PVST) or the multiple spanning-tree (MST) mode. However, you cannot enable both features at the
same time. The MST mode is available only if you have the enhanced software image (EI) installed on
your switch.
When root guard is enabled, if spanning-tree calculations cause a port to be selected as the root port, the
port transitions to the root-inconsistent (blocked) state to prevent the customer’s switch from becoming
the root switch or being in the path to the root. The root port provides the best path from the switch to
the root switch.
When the no spanning-tree guard or the no spanning-tree guard none command is entered, root guard
is disabled for all VLANs on the selected interface. If this interface is in the root-inconsistent (blocked)
state, it automatically transitions to the listening state.
loop Enable loop guard.
none Disable root guard or loop guard.
root Enable root guard.
Release Modification
12.1(6)EA2 This command was first introduced. It replaced the spanning-tree
rootguard command.
12.1(9)EA1 The loop keyword was added.