Use it on fibre links between switches, and when a port is err-disabled with the cause udld.
UDLD Unidirectional Link Detection Reference
UDLD is a Cisco protocol that checks whether a link carries traffic in both directions. If one direction has failed while the link still shows up — or fibres are cross-patched — it err-disables the port.
1. show udld <interface> — bidirectional, or something else?
2. Err-disabled with cause udld → read Tx and Rx light on both ends; one strand is failing or the pair is crossed.
3. No neighbour shown → the other end does not run UDLD; the link is unprotected.
4. After repair: udld reset or shutdown / no shutdown.
UDLD enabled on both ends in the same mode → each port hears the other → each sees its own identity echoed back → state bidirectional → port stays up
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
udld port aggressivePrimary Commands
Configuration and operational commands for this Topic.
Show Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
show udld neighborsShowDisplay UDLD neighbor and bidirectional relationship information.
Use when: You want to confirm the UDLD neighbor on each fiber port matches the cabling.
Quick note: An empty neighbor list for a port with UDLD enabled means no UDLD frames are received from the far end.
Cisco IOS XE · mixedshow udld interface <interface>ReferenceDisplay interface-specific UDLD operational state.
Cisco IOS XE · mixedshow udld [<interface>]ReferenceShows the UDLD mode and operational state for all ports or one port, including the neighbor seen on the link.
Use when: A fiber link carries traffic in one direction only, or a port went err-disabled with a UDLD reason.
Quick note: Bidirectional state "Unidirectional" means this switch does not see itself echoed by the neighbor. In aggressive mode the port is err-disabled.
Cisco IOS / IOS XE · state · verifiesVerification & 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 UDLD: bounded example and recovery Verify boundary
Use an isolated redundant-switch lab with an independent management path and a reviewed UDLD mode on both ends. Observe a healthy relationship, then simulate only a supported controlled peer-message-loss condition. Record actual detection, logs, protection action and topology behavior; do not expect a single universal shutdown time.
Correct the underlying condition before any supported reset/re-enable, restore exact mode/timers and verify the relationship and original frame flow. Recovery commands change state. Do not perform a one-way production fiber experiment or enable repeated auto-recovery merely to hide recurring errdisable. This is an authored test design, not a performed failure.
Step 2 UDLD: first failed boundary Narrow the fault
An absent neighbor can mean unsupported/disabled peer, transmit/receive loss, timeouts or physical problems. Correlate both ends before declaring one-way fiber. An errdisabled interface identifies a protection outcome; inspect the recorded cause rather than repeatedly recovering the port.
Keep carrier state, UDLD relationship, STP role and user traffic separate. A link can have carrier while the expected bidirectional protocol exchange is unhealthy. Conversely, an empty neighbor table does not by itself show an attacker or a specific bad strand. Check release-supported mode/timer behavior.
Step 3 Failure isolation workflow Narrow the fault
- A port is err-disabled with cause udld. One direction of the link failed, or the strands are crossed. Check transmit and receive on both ends with the transceiver readings before resetting the port.
- Two links between the same switches went down together. Their fibres are swapped between the links.
- No UDLD neighbour is shown on a link. The other end does not run UDLD, or runs it on a different port; the link is unprotected.
- Ports went err-disabled during a neighbour's reload or upgrade. Aggressive mode reacting to the silence.
- The state is "undetermined". Normal mode has lost contact and will not act; check whether the neighbour is still sending.
- The port returns and drops again. Automatic recovery is on and the fibre fault remains.
- UDLD is enabled globally but not active on a copper port. The global command covers fibre ports only; configure the port itself.
Both ends must run UDLD in the same mode. Normal mode acts only on positive evidence of a one-way link; aggressive mode also shuts the port when the neighbour falls silent. Check the fibre pair with the transceiver readings before resetting the port.
show udld <interface>— mode, state (bidirectional, undetermined, unidirectional) and the neighbour seen.show udld neighbors— UDLD neighbours per port.show interfaces status err-disabled— ports shut by UDLD.show interfaces <interface> transceiver detail— light levels in each direction.
ReferenceWhat it is1 section · depth on demand
Mechanics & mental model
UDLD (Unidirectional Link Detection) is a Cisco protocol that checks whether a link carries traffic in both directions. If it finds that one direction has failed while the link still shows up, it disables the port.
ReferenceWhy it matters1 section · depth on demand
Why it matters operationally
A fibre link has one strand for each direction. One strand can fail, or two links can be cross-patched, and both ports still report a link. Spanning tree then stops receiving BPDUs on one side, concludes the path is clear, and opens a blocked port — creating a loop. UDLD detects the condition at Layer 1 and removes the link before that happens.
ReferenceHow it works2 sections · depth on demand
How it works
The check. Each UDLD port regularly sends a message containing its own device and port identity, and the identities of the neighbours it has heard from on that port. A port that receives messages from its neighbour and finds its own identity echoed in them knows both directions work. If the neighbour's messages arrive but do not list this port, the neighbour is not hearing it: the link is unidirectional, and the port is err-disabled.
The same comparison catches miswiring, where a port's transmit strand leads to one device and its receive strand comes from another.
Two modes.
| Mode | When messages from a known neighbour stop arriving |
|---|---|
| Normal | The port is marked undetermined and left up. UDLD acts only on positive evidence of a one-way or miswired link |
| Aggressive | The port tries to re-establish contact for about eight seconds, then err-disables |
Aggressive mode also catches a link where both directions have failed without the port going down, at the cost of shutting a port when the neighbour merely stops sending — during a software upgrade, for example.
Configuration.
udld enable ! global: normal mode on all fibre ports
udld aggressive ! global: aggressive mode on all fibre ports
!
interface GigabitEthernet1/0/1
udld port aggressive ! per port, also for copper
Both ends of the link must run UDLD, in the same mode; a port whose neighbour does not answer never forms the relationship and is not protected. Messages are sent every 15 seconds by default.
Recovery. A port disabled by UDLD returns with udld reset, with shutdown / no shutdown, or automatically if errdisable recovery cause udld is configured.
UDLD complements Loop Guard: UDLD works on the physical link and also covers designated ports; Loop Guard works per VLAN on the spanning-tree level and also covers a neighbour that has stopped sending BPDUs for other reasons.
UDLD: observation versus configuration
Scope: supported Cisco IOS / IOS XE UDLD on a deliberately selected link, with both peers and media model known. udld port aggressive changes protection behavior; it is not a status query. Read show udld and supported interface/neighbor detail, relevant logs, interface error/optical state and errdisable reason.
Compare local/remote device and port identity, neighbor echo information and timers. Normal/aggressive behavior depends on whether an explicit unidirectional condition or an aged/lost neighbor condition is detected. Do not promise that every physical failure is detected identically or before STP changes state.
Reference: Cisco UDLD operation.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
UDLD: detecting one-way links
A fibre link can fail in one direction while the interface stays up. Spanning tree may then unblock a port and create a loop. UDLD is a Layer 2 protocol that catches this, and Cisco's UDLD document describes how:
- Each side sends UDLD packets with its device and port ID, and expects to see its own ID echoed back.
- If it isn't echoed, the link is unidirectional.
- Normal mode detects miswired fibre pairs but marks a link "undetermined" rather than disabling it.
- Aggressive mode disables the port when the neighbour's information expires and eight one-second retries fail.
The default message interval is 15 seconds.
Normal compared with aggressive mode (document)
| Normal | Aggressive | |
|---|---|---|
| Miswired fibre pairs | Detected; port err-disabled | Detected; port err-disabled |
| Traffic stops in one direction, cabling correct | "Undetermined"; port stays up | Port err-disabled after 8 retries |
| Best for | Links where Layer 1 detects failures well | Point-to-point fibre and copper where one-way failures are possible |
Timing (document)
| Value | Default |
|---|---|
| Message interval | 15 s (configurable 1–90 s) |
| Neighbour information expiry | About 3 × interval (45 s) |
| Classic STP time to forwarding | max age + 2 × forward delay = 50 s |
The document recommends choosing an interval so that UDLD expiry happens before spanning tree could move a blocked port to forwarding. With Rapid STP that comparison is only approximate, so validate it on your platform.
SW1(config)# interface TenGigabitEthernet1/1/1
SW1(config-if)# udld port aggressive
SW1(config)# udld message time 7
SW1# show udld TenGigabitEthernet1/1/1
Interface Te1/1/1
---
Port enable administrative configuration setting: Enabled / in aggressive mode
Port enable operational state: Enabled / in aggressive mode
Current bidirectional state: Bidirectional
Current operational state: Advertisement - Single neighbor detected
Message interval: 7000 ms
SW1# show udld neighbors
%UDLD-3-DISABLE: Unidirectional link detected on port Te1/1/1. Port disabled
SW1# udld reset
Deployment rules (document)
| Rule | Reason |
|---|---|
| Enable UDLD on both ends, in the same mode | One side alone can't confirm bidirectionality |
| Verify "Bidirectional" on both sides | Proves the protocol actually runs |
| Fix the cabling before recovering | Otherwise the port is disabled again |
| Combine with loop guard where appropriate | Extra protection against unidirectional failures in STP |
Documented example, not captured output.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
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 Network & Protocols → UDLD Unidirectional Link Detection Reference. 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%What changed and what may be affected
Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.
Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Operational notes
Former standalone Cheat Sheet content now lives directly inside the Topic where it belongs.
UDLD — Fast Check
One-way fiber evidence
1. Check UDLD enabled/mode.
2. show udld neighbors.
3. Compare both ends.
4. Read Tx/Rx DOM.
5. Check err-disable/logs.
6. Clean/swap/cross-test physical path.