UDLD
UDLD (Unidirectional Link Detection) is a Layer 2 protocol that monitors the physical configuration of fiber optic and twisted-pair Ethernet links to detect unidirectional communication failures that can cause network loops, forwarding issues, and connectivity problems invisible to standard link-state mechanisms. It operates by exchanging periodic messages between directly connected devices to verify bidirectional connectivity, supporting both normal mode for detection and reporting, and aggressive mode for automatic recovery by error-disabling problematic ports. UDLD is essential for maintaining network stability in fiber optic deployments where physical layer failures can result in one-way communication, preventing spanning tree loops and ensuring reliable network operations in mission-critical environments.
Diagram
Classes
configuration (iosxe.devices)
Name | Type | Constraint | Mandatory | Default Value |
---|---|---|---|---|
udld | Class | [udld] | No |
udld (iosxe.devices.configuration)
Name | Type | Constraint | Mandatory | Default Value |
---|---|---|---|---|
aggressive | Boolean | true , false | No | |
enable | Boolean | true , false | No | |
message_time | Integer | min: 1 , max: 90 | No | |
recovery_interval | Integer | min: 30 , max: 86400 | No |
UDLD detects unidirectional links to prevent network loops and forwarding issues, ensuring reliable bidirectional communication on Ethernet interfaces.
UDLD Parameters
- Global enable/disable
- Aggressive mode (global or per-interface)
- Message interval
- Recovery interval
- Interface-specific configuration
You can use these UDLD parameters to detect and prevent unidirectional link failures in your network. Customize the mode, message interval, and recovery settings to fit your network’s stability requirements and operational needs, especially in fiber optic environments. Adjusting these parameters lets you tailor link monitoring and automatic recovery for enhanced network resilience.
Examples
udld enable
- Globally enables UDLD on all fiber-optic interfaces.
udld aggressive
- Globally enables aggressive mode for UDLD, which attempts to re-establish a link by error-disabling the port if a unidirectional condition is detected.
udld message time 15
- Sets the global UDLD message interval to 15 seconds.
udld recovery interval 300
- Sets the global UDLD recovery interval to 300 seconds (5 minutes), after which error-disabled ports are re-enabled.
interface GigabitEthernet0/1 udld port aggressive
- Configures UDLD aggressive mode on a specific interface.
Sample Configuration
The following configuration describes how to set up UDLD on an IOS-XE device. It includes global enabling, aggressive mode, message time, recovery interval, and an example of per-interface configuration for robust unidirectional link detection.
udld enableudld aggressiveudld message time 15udld recovery interval 300!interface GigabitEthernet0/1 udld port aggressive!interface GigabitEthernet0/2 udld port enable
Example YAML Code
The following YAML code sets up UDLD on an IOS-XE device, specifying global aggressive mode, enabling UDLD, setting the message time, and configuring the recovery interval.
iosxe: devices: - name: Device1 configuration: udld: aggressive: true enable: true message_time: 15 recovery_interval: 300