Use it on root and alternate ports of redundant links — especially fibre uplinks — and when a port shows LOOP_Inc.
Loop Guard
Loop Guard protects blocking ports on redundant links: if a port stops receiving BPDUs (for example due to a unidirectional link), it moves to loop-inconsistent instead of wrongly going to forwarding and creating a loop.
1. spanning-tree guard loop puts a port in loop-inconsistent if BPDUs stop arriving.
2. Protects against unidirectional links on root/alternate ports.
3. show spanning-tree inconsistentports.
Loop Guard on root/alternate ports → BPDUs stop arriving (unidirectional link, neighbour software fault) → port loop-inconsistent instead of forwarding → fix the link → BPDUs return → port recovers to its role
Inspect peer/link counters, physical path, UDLD if used, and BPDU reception.
Continue only after interpreting the current observation.Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
spanning-tree guard loopPrimary Commands
Configuration and operational commands for this Topic.
spanning-tree guard loopReferenceEnable Loop Guard on an interface.
Use when: Protect a non-designated/redundant switch link from unsafe transition if expected BPDUs disappear.
Quick note: Investigate BPDU receive path and physical/unidirectional causes.
Cisco IOS XE · mixedspanning-tree loopguard defaultReferenceEnable Loop Guard globally to stop alternate/root ports from forwarding when BPDUs stop.
Use when: Apply loop protection consistently across appropriate switch-to-switch ports.
Quick note: Audit PortFast/edge exclusions and physical design.
Cisco IOS / IOS XE · mixedShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 First 30 seconds Verify boundary
Immediate answer: Correlate missing expected BPDUs with loop-inconsistent state on the exact non-designated port before changing timers or guard configuration.
Verification chain: expected BPDU reception → Loop Guard scope → BPDU loss → loop-inconsistent state → BPDU return/recovery → forwarding
Stop condition: Loop-inconsistent protects against a unidirectional/control-plane failure point; it does not by itself locate the physical cause.
Step 2 Operational verification and known-good state Verify boundary
show spanning-tree inconsistentports
show spanning-tree vlan 10
show spanning-tree summary
show udld Gi1/0/2
The first lists the affected VLANs and ports. In the VLAN view the port shows BKN* and *LOOP_Inc. The summary shows whether Loopguard Default is enabled; the UDLD command reports whether the link is seen as bidirectional.
Known-good: Loop Guard is active on inter-switch uplinks, show spanning-tree inconsistentports is empty, and UDLD reports the fibre links as bidirectional.
Step 3 Verification and output interpretation Verify boundary
Inspect spanning-tree inconsistent-port output, interface counters, logs and peer-side state. A loop-inconsistent condition indicates that expected BPDUs stopped arriving on a guarded STP role. Confirm whether the data path is unidirectional, whether the peer stopped sending BPDUs, and whether the control protocol is affected by loss or filtering. Recovery should follow restoration of valid control-plane reception.
Step 4 Verification & troubleshooting Narrow the fault
1. show spanning-tree inconsistentports → VLAN, port and Loop Inconsistent.
2. show logging | include LOOPGUARD → when it started.
3. Test the link direction: show udld <port>, input counters on the interface, and optical levels with show interfaces <port> transceiver.
4. On the neighbour: is its port designated, and is its BPDU sent counter increasing?
5. Repair the link or the neighbour. The port recovers by itself.
Step 5 Failure signatures and troubleshooting branches Narrow the fault
LOOP_Incon a fibre uplink, all VLANs. One-way link: check UDLD and optical levels, then swap strands or the transceiver.LOOP_Incon all VLANs toward one neighbour with a healthy link. The neighbour has stopped sending BPDUs; check its CPU and software.LOOP_Incfor a single VLAN. That VLAN was removed from the trunk or deleted on the neighbour's side.- A loop formed although Loop Guard is configured. The port that opened was a designated port, was not covered by the guard, or BPDU Filter is involved.
- The command is rejected. Root Guard is configured on the same port.
Step 6 When the problem is really fixed Narrow the fault
- BPDUs are received again on the port (the
receivedcounter increases). - The port left loop-inconsistent by itself and has its normal role.
- UDLD shows the link as bidirectional.
- The physical or neighbour-side cause was found, not just waited out.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
A blocking port that stops hearing BPDUs would normally become designated and forward; if the link is only broken in one direction that creates a loop. Loop Guard puts the port in loop-inconsistent instead and restores it when BPDUs return. It protects ports that receive BPDUs (root, alternate); it does nothing on designated ports. It complements UDLD and cannot be combined with Root Guard on the same port.
show spanning-tree inconsistentports → Loop Inconsistent. show spanning-tree vlan 10 → BKN* with *LOOP_Inc. show spanning-tree summary → Loopguard Default. show udld <if> and interface error counters → look for a one-way link.
ReferenceWhat it is1 section · depth on demand
What it is
Loop Guard watches the ports that are supposed to be receiving BPDUs — root ports and alternate ports. If the BPDUs stop while the link stays up, the port is put into loop-inconsistent state, which blocks it, instead of being allowed to start forwarding.
ReferenceWhy it matters1 section · depth on demand
Why it matters
Spanning tree reads silence as absence: if no BPDU arrives, nobody is there, so the port may become designated and forward. But silence can also mean the neighbour is there and its BPDUs are being lost — one strand of a fibre pair broken, a faulty transceiver, a neighbour whose control plane has stopped. Then a port that was blocking opens while every other port keeps forwarding, and a loop forms. Loop Guard closes exactly that gap.
ReferenceImportant terms & boundaries6 sections · depth on demand
Key points
- Interface:
spanning-tree guard loop. Global:spanning-tree loopguard default, for all point-to-point links. - Acts on non-designated ports (root, alternate). It does nothing on designated ports.
- State
BKN*, type*LOOP_Inc, per VLAN; logged as%SPANTREE-2-LOOPGUARD_BLOCK. - Recovers automatically when BPDUs return (
LOOPGUARD_UNBLOCK). - Complements UDLD: UDLD detects a one-way link and disables the port; Loop Guard also covers a neighbour that stops sending while the link is fine.
- Cannot be combined with Root Guard on the same port, and has no purpose on edge ports.
In depth
Loop guard: don't start forwarding just because BPDUs stopped
The Catalyst 9300 optional STP features guide describes loop guard (spanning-tree loopguard default, disabled by default) as preventing alternate and root ports from becoming designated ports after a unidirectional link failure. It only works on point-to-point links, and the guide calls it most effective when enabled across the whole switched network.
The problem it solves
A blocked port stays blocked because it keeps receiving BPDUs from the designated port on the other end. If the link becomes unidirectional (for example a failed fibre strand), the BPDUs stop arriving. Without loop guard, the port ages out the information, becomes designated, starts forwarding, and creates a loop.
C9300(config)# spanning-tree loopguard default
C9300(config)# interface TenGigabitEthernet1/1/2
C9300(config-if)# spanning-tree guard loop
%SPANTREE-2-LOOPGUARD_BLOCK: Loop guard blocking port TenGigabitEthernet1/1/2 on VLAN0010.
C9300# show spanning-tree inconsistentports
Name Interface Inconsistency
-------------------- ---------------------- ------------------
VLAN0010 TenGigabitEthernet1/1/2 Loop Inconsistent
%SPANTREE-2-LOOPGUARD_UNBLOCK: Loop guard unblocking port TenGigabitEthernet1/1/2 on VLAN0010.
The port recovers automatically when BPDUs arrive again.
Documented points
| Point | Detail |
|---|---|
| Scope | Root and alternate ports on point-to-point links |
| MST | On non-boundary ports, BPDUs stop only when the port is blocked in all instances; boundary ports are blocked in all instances |
| Root guard | Can't be combined on the same port |
| Verify roles | show spanning-tree active or show spanning-tree mst |
Loop guard and UDLD
| Loop guard | UDLD | |
|---|---|---|
| Detects | Missing BPDUs on a blocked port | Unidirectional links at Layer 1/2 |
| Action | Blocks the port per VLAN | Err-disables the port |
| Covers | Also software faults that stop BPDUs | Only physical unidirectional faults |
Use both on fibre uplinks between switches.
Documented example, not captured output.
Quick reference
Loop Guard protects non-designated ports (root and alternate) from moving to forwarding when BPDUs stop arriving, which happens with unidirectional links. Instead the port enters loop-inconsistent state and recovers automatically when BPDUs return.
spanning-tree loopguard default
show spanning-tree inconsistentports
Documented example, not captured output.
Combine Loop Guard with UDLD on fibre links for a second, independent protection against unidirectional failures.
Mechanics and state ownership
A root or alternate port expects a BPDU from its neighbour every hello interval. After three are missed the stored information expires. Without protection the port would now consider itself the best on the link, take the designated role and move through learning to forwarding.
With Loop Guard the port goes loop-inconsistent at that point instead. It stays blocked for as long as the silence lasts and returns to its previous role when BPDUs are heard again. If the link actually goes down there is nothing to guard — the port is simply down.
In Rapid PVST+ every VLAN has its own BPDUs, so the check is per VLAN. That produces one case worth knowing: if a VLAN is removed from the trunk on the neighbour's side, BPDUs for that VLAN stop and the port becomes loop-inconsistent for that VLAN only, although the link is perfectly healthy.
State model and protocol mechanics
Loop Guard protects selected non-designated spanning-tree ports against a failure mode where BPDUs unexpectedly stop arriving and a port might otherwise transition toward forwarding. Instead, the port can enter loop-inconsistent state until valid BPDUs are received again, preserving the assumption that the blocked path must continue hearing the control plane.
Limits and common misconceptions
Loop Guard does not show a cable is bad and it does not detect every possible Layer-2 loop. It should not be combined thoughtlessly with features that intentionally suppress BPDUs. A loop-inconsistent state is protective and can be the correct healthy reaction to missing control-plane input. Distinguish BPDU loss from ordinary STP blocking and from root-protection behavior.
ReferenceConfiguration & state1 section · depth on demand
Design and configuration model
Use Loop Guard on network-facing redundant links where loss of received BPDUs must not cause a blocked path to become forwarding. It is especially relevant when unidirectional failures are a realistic risk. Coordinate its placement with UDLD or physical-layer protections rather than treating all mechanisms as interchangeable; they observe different evidence and operate at different layers.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Configuration & expected output
Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.
Configuration example
Assumptions: Lab switch; Rapid PVST+ (spanning-tree mode rapid-pvst); VLAN 10 exists.
spanning-tree loopguard default
!
! or per interface:
interface GigabitEthernet1/0/2
spanning-tree guard loopExpected output
show spanning-tree inconsistentportsExpected state: Failure signature when the alternate uplink stops receiving BPDUs.
%SPANTREE-2-LOOPGUARD_BLOCK: Loop guard blocking port GigabitEthernet1/0/2 on VLAN0010.
Name Interface Inconsistency
-------------------- ---------------------- ------------------
VLAN0010 GigabitEthernet1/0/2 Loop Inconsistent
Number of inconsistent ports (segments) in the system : 1
! Illustrative output, not captured Evidence.Gi1/0/2 no longer hears BPDUs from the upstream switch although the link is up — suspect a one-way fibre or a faulty transceiver. Without Loop Guard this port would have gone forwarding and closed a loop.Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Switching → STP → STP Enhancements → Loop Guard. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Quick lookup tables
Loop Guard · operational reference
Compact state and interpretation boundaries for fast lookup.
| State / evidence | Interpretation |
|---|---|
| Expected BPDU | Control-plane liveness |
| BPDU loss | Guard condition |
| Loop-inconsistent | Protective block |
| UDLD | Complementary link-direction check |
Loop Guard operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Boundary | Known-good for Loop Guard | Suspicious signature | Next proof |
|---|---|---|---|
| Intent | Matches protection against a non-designated STP port erroneously transitioning toward forwarding when expected BPDUs stop arriving design | Configuration differs from design/peer | Compare effective configuration |
| Control state | Stable expected region/role/topology/path state | a root/alternate port entering loop-inconsistent after BPDU reception stops, one-way link behavior, Loop Guard placed on an inappropriate edge/designated-only port, or repeated recovery without finding the lost-BPDU cause | Inspect protocol detail and adjacent state |
| Forwarding | Expected VLAN/egress/RIB/FIB path | Control state exists but traffic path disagrees | MAC/FIB/CEF/adjacency proof |
| Closure | Original test passes for explained reason | Symptom moved, was bypassed or protection disabled | Regression test |