Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Loop Guard

Direct answer

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.

When to use this

Use it on root and alternate ports of redundant links — especially fibre uplinks — and when a port shows LOOP_Inc.

First 30 seconds

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.

Operational verification

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

Evidence · next step

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
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE
Key commandspanning-tree guard loop
Scope / prerequisiteUse it on root and alternate ports of redundant links — especially fibre uplinks — and when a port shows LOOP_Inc.
Show · 1Reference · 2
What next?3 suggested next steps
Catalog command links3
Evidence1
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

6 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

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_Inc on a fibre uplink, all VLANs. One-way link: check UDLD and optical levels, then swap strands or the transceiver.
  • LOOP_Inc on all VLANs toward one neighbour with a healthy link. The neighbour has stopped sending BPDUs; check its CPU and software.
  • LOOP_Inc for 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 received counter 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 references

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.

command output · 1
Command lookup Jump straight to Cisco syntax
Key points

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.

Key checks

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

PointDetail
ScopeRoot and alternate ports on point-to-point links
MSTOn non-boundary ports, BPDUs stop only when the port is blocked in all instances; boundary ports are blocked in all instances
Root guardCan't be combined on the same port
Verify rolesshow spanning-tree active or show spanning-tree mst

Loop guard and UDLD

Loop guardUDLD
DetectsMissing BPDUs on a blocked portUnidirectional links at Layer 1/2
ActionBlocks the port per VLANErr-disables the port
CoversAlso software faults that stop BPDUsOnly physical unidirectional faults

Use both on fibre uplinks between switches.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

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
Technical examples

Configuration & expected output

Concrete examples are shown only when the stored reference contains an actual configuration or output shape for this Topic.

Configuration example

Cisco IOS / IOS XE IEEE 802.1D-2004 / 802.1QEnable Loop Guard on all point-to-point links, or on one uplink

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 loop

Expected output

Cisco IOS / IOS XE IEEE 802.1D-2004 / 802.1Qshow spanning-tree inconsistentports

Expected 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.
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

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%
Embedded reference data

Quick lookup tables

Loop Guard · operational reference

Compact state and interpretation boundaries for fast lookup.

State / evidenceInterpretation
Expected BPDUControl-plane liveness
BPDU lossGuard condition
Loop-inconsistentProtective block
UDLDComplementary link-direction check

Loop Guard operational reference

Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.

BoundaryKnown-good for Loop GuardSuspicious signatureNext proof
IntentMatches protection against a non-designated STP port erroneously transitioning toward forwarding when expected BPDUs stop arriving designConfiguration differs from design/peerCompare effective configuration
Control stateStable expected region/role/topology/path statea 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 causeInspect protocol detail and adjacent state
ForwardingExpected VLAN/egress/RIB/FIB pathControl state exists but traffic path disagreesMAC/FIB/CEF/adjacency proof
ClosureOriginal test passes for explained reasonSymptom moved, was bypassed or protection disabledRegression test
Confirmation

Confirm action

Continue?