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
Section titled “Diagram”Classes
Section titled “Classes”configuration (iosxe.devices)
Section titled “configuration (iosxe.devices)”Name | Type | Constraint | Mandatory | Default Value |
---|---|---|---|---|
udld | Class | [udld] | No |
udld (iosxe.devices.configuration)
Section titled “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 |
By detecting unidirectional links, UDLD prevents network loops and forwarding issues, ensuring reliable bidirectional communication on Ethernet interfaces.
UDLD Parameters
Section titled “UDLD Parameters”Key Components:
Global Enable/Disable (
enable
): Turns UDLD on or off globally for all supported interfaces.Aggressive Mode (
aggressive
): Enables aggressive mode globally or per interface, allowing automatic error-disable and recovery for unidirectional links.Message Interval (
message_time
): Sets the interval (in seconds) for UDLD messages exchanged between devices.Recovery Interval (
recovery_interval
): Specifies the time (in seconds) after which error-disabled ports are re-enabled.Interface-Specific Configuration (
interface
,port_aggressive
,port_enable
): Allows UDLD settings to be applied to individual interfaces.
Key Parameters Briefly Explained:
enable
: Globally enables UDLD.aggressive
: Enables aggressive mode for automatic recovery.message_time
: Sets the UDLD message interval.recovery_interval
: Sets the recovery interval for error-disabled ports.interface
,port_aggressive
,port_enable
: Configures UDLD per interface.
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.
Sample Configuration
Section titled “Sample Configuration”The following configuration describes how to set up UDLD on a Cisco IOS-XE device. It includes global enabling, aggressive mode, message time, recovery interval, and 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
Section titled “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