Administrator Guide

Conguring Loop Guard
Enable STP loop guard on a per-port or per-port channel basis.
The following conditions apply to a port enabled with loop guard:
Loop guard is supported on any STP-enabled port or port-channel interface.
Loop guard is supported on a port or port-channel in any spanning tree mode:
Spanning Tree Protocol (STP)
Rapid Spanning Tree Protocol (RSTP)
Multiple Spanning Tree Protocol (MSTP)
Per-VLAN Spanning Tree Plus (PVST+)
You cannot enable root guard and loop guard at the same time on an STP port. For example, if you congure loop guard on a port on
which root guard is already congured, the following error message is displayed: % Error: RootGuard is configured.
Cannot configure LoopGuard.
Enabling Portfast BPDU guard and loop guard at the same time on a port results in a port that remains in a blocking state and prevents
trac from owing through it. For example, when Portfast BPDU guard and loop guard are both congured:
If a BPDU is received from a remote device, BPDU guard places the port in an Err-Disabled Blocking state and no trac is
forwarded on the port.
If no BPDU is received from a remote device, loop guard places the port in a Loop-Inconsistent Blocking state and no trac is
forwarded on the port.
When used in a PVST+ network, STP loop guard is performed per-port or per-port channel at a VLAN level. If no BPDUs are received
on a VLAN interface, the port or port-channel transitions to a Loop-Inconsistent (Blocking) state only for this VLAN.
To enable a loop guard on an STP-enabled port or port-channel interface, use the following command.
Enable loop guard on a port or port-channel interface.
INTERFACE mode or INTERFACE PORT-CHANNEL mode
spanning-tree {0 | mstp | rstp | pvst} loopguard
0: enables loop guard on an STP-enabled port assigned to instance 0.
mstp: enables loop guard on an MSTP-enabled port.
rstp: enables loop guard on an RSTP-enabled port.
pvst: enables loop guard on a PVST-enabled port.
To disable STP loop guard on a port or port-channel interface, use the no spanning-tree 0 loopguard command in an INTERFACE
conguration mode.
To verify the STP loop guard conguration on a port or port-channel interface, use the show spanning-tree 0 guard
[interface
interface] command in a global conguration mode.
Displaying STP Guard Conguration
To display the STP guard conguration, 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 congured on port or port-channel interfaces.
show spanning-tree 0 guard [interface interface]
932
Spanning Tree Protocol (STP)