Overview & Thematic Scope
Unidirectional Link Detection (UDLD) is a Layer 2 protocol that detects and disables one-way fiber links caused by miswired pairs, faulty transceivers, or unidirectional media converters. This troubleshooting-focused FAQ answers the most common configuration, compatibility, and error-resolution questions from network engineers deploying UDLD on fiber ports in enterprise and datacenter environments.

Frequently Asked Questions
- Q1: What is UDLD and why is it required on fiber ports?
- UDLD is a Cisco-proprietary Layer 2 protocol that detects unidirectional links on fiber and copper ports. It is required on fiber ports because a broken receive strand or faulty transceiver can create a one-way link that passes Spanning Tree BPDUs in only one direction, leading to bridging loops and blackholed traffic. UDLD exchanges echo packets with neighbors; if a neighbor does not echo back within a set interval, the port is placed in err-disabled state.
- Q2: What is the difference between UDLD normal mode and aggressive mode?
- Normal mode detects unidirectional links only when the physical layer still reports the link as up and UDLD can exchange packets. Aggressive mode additionally retries eight times after the initial detection window and err-disables the port if no echo is received, catching cases where the link is flapping or a transceiver has failed silently. Aggressive mode is the recommended setting for fiber uplinks between switches and for any link where a unidirectional condition could cause a loop.
- Q3: How do I configure UDLD on a fiber port?
- Enable UDLD globally with
udld enableand set aggressive mode withudld aggressive, then enable it on the interface withudld port aggressive. On Cisco IOS, the global command enables UDLD in normal mode on all fiber ports, while the interface-level command overrides it for that specific port. Verify withshow udldandshow udld interfaceto confirm neighbor state is bidirectional. - Q4: Why does my fiber port go into err-disabled state after enabling UDLD?
- A port enters err-disabled state when UDLD detects a unidirectional link or when aggressive mode exhausts its retry attempts. The most common causes are a broken or crossed receive strand, a failing SFP transceiver, or a media converter that does not pass UDLD packets. Check
show udld interfacefor the reason, verify fiber polarity and TX/RX alignment, and replace the transceiver if the neighbor never transitions to bidirectional. - Q5: Which SFP and transceiver types support UDLD on fiber ports?
- UDLD operates at Layer 2 and is supported on most standard Ethernet fiber interfaces, including 1G SFP, 10G SFP+, 25G SFP28, and 40G/100G QSFP ports, provided the transceiver and link partner pass Layer 2 frames transparently. It does not work on passive optical splitters, some unmanaged media converters, or WDM systems that terminate or regenerate the Layer 2 frame. Always verify that both ends of the link run the same UDLD mode and interval before assuming transceiver incompatibility.
- Q6: How do I recover a port that UDLD has err-disabled?
- Recover the port by fixing the underlying unidirectional condition, then issuing a shutdown and no shutdown on the interface or using
errdisable recovery cause udldwith a recovery interval. Automatic recovery is useful in production, but you must still correct the root cause—such as a bad patch cord or failed optic—or the port will re-enter err-disabled state. Confirm recovery withshow interfaces status err-disabledandshow udld neighbors. - Q7: Does UDLD work with third-party switches and non-Cisco fiber links?
- UDLD is a Cisco-proprietary protocol and only forms neighbors with devices that also run UDLD; it will not detect unidirectional links on a link to a non-UDLD switch. For multivendor fiber links, use IEEE 802.3ah Ethernet OAM or IEEE 802.1ag Connectivity Fault Management instead, or ensure both ends are Cisco devices running compatible UDLD versions. Mixing UDLD with third-party equipment typically results in the port remaining in an undetermined state rather than detecting a fault.
- Q8: What are the best practices for UDLD on fiber uplinks in production?
- Enable aggressive UDLD on all inter-switch fiber uplinks and use normal mode only where aggressive mode could cause unnecessary outages. Set a consistent message interval (typically 15 seconds) on both ends, document all fiber paths, and monitor UDLD syslog messages for err-disable events. Pair UDLD with BPDU Guard and Loop Guard to prevent Layer 2 loops, and always test failover after any fiber re-patching or transceiver swap.
Leave a comment