Loop Guard is an STP security mechanism that protects against Layer 2 loops that can occur even with STP enabled. It is applied on non-designated / blocked ports in redundant topologies.

Which problem does it solve?

๐Ÿ”ด A port should stay blocked, but stops receiving BPDUs.

If a switch stops receiving BPDUs on a port, it can falsely believe the loop is gone and open the port โ†’ loop ๐Ÿ’ฅ. Causes: software failure on the upstream switch, hung STP process, CPU overload, misconfigured BPDU filter. Loop Guard prevents the port from entering forwarding in this case.

What Loop Guard concretely does

  1. The port is blocked (Alternate / Non-designated)
  2. The switch stops receiving BPDUs
  3. Instead of going to forwarding, the port is put into the loop-inconsistent state
  4. The port forwards no traffic and stays locked until BPDUs return
  5. When BPDUs return โ†’ normal STP process resumes

โžก๏ธ Fail-safe behaviour ๐Ÿ‘

State Meaning
Blocking / Alternate Normal STP blocking
Loop-inconsistent Loop Guard has intervened
Forwarding Only when BPDUs are received correctly

Classic exam scenario

S1 (Root)
 | \
 |  \
S2---S3

The S2โ€“S3 link is blocked. S3 stops receiving BPDUs on that link.

Loop Guard vs UDLD (important!)

Feature Loop Guard UDLD
Protects against missing BPDUs โœ… โŒ
Protects against unidirectional links โš ๏ธ indirect โœ…
Reaction loop-inconsistent err-disabled
Granularity Per-VLAN Per-port
Depends on STP Yes No

Loop Guard = STP logic ยท UDLD = physical link verification

When to use Loop Guard