UDLD operates by using two methods:
How UDLD maintains neighbor databases
The process of UDLD neighbor database maintenance ensures that each device stays updated about its neighbors, maintains synchronized
caches, and handles exceptional cases like errors or configuration changes.
The key components involved in the process are:
-
UDLD-capable neighbors: Devices that exchange UDLD hello packets for neighbor discovery and synchronization.
-
Hello packets: Periodic packets sent to exchange device information and keep caches updated.
-
Cache entries: Stored information about neighbors with an expiration mechanism (age time).
-
Configuration changes: Events such as port status changes, UDLD enable/disable actions, or device resets that trigger cache
clearing.
The process involves the following stages:
-
Hello packet exchange and neighbor discovery
-
Cache updates
-
Cache clearing during configuration changes
-
When a port is disabled, UDLD is disabled on a port, or the device is reset, all cache entries for affected ports are cleared.
-
UDLD sends a message to neighbors to inform them of the change, prompting the synchronization of their caches.
-
Handling multiple UDLD neighbors per interface
-
Interfaces do not support multiple UDLD neighbors.
-
If a UDLD PDU (protocol data unit) with multiple device IDs in the echo TLV (type, length, value) is received, the interface
enters an error-disabled state to prevent ambiguity.
The process ensures accurate and synchronized neighbor database maintenance. However, interfaces receiving multiple device
IDs will be placed in an error-disabled state to avoid misconfiguration.
Event-driven detection and echoing
UDLD relies on echoing as its detection operation. Whenever a UDLD device learns about a new neighbor or receives a resynchronization
request from an out-of-sync neighbor, it restarts the detection window on its side of the connection and sends echo messages
in reply. Because this behavior is the same on all UDLD neighbors, the sender of the echoes expects to receive an echo in
reply.
If the detection window ends and no valid reply message are received, the link might shut down, depending on the UDLD mode.
When UDLD is in normal mode, the link might be considered undetermined and might not be shut down. When UDLD is in aggressive
mode, the link is considered unidirectional, and the port is disabled.
UDLD reset options
If an interface becomes disabled by UDLD, you can use one of the following options to reset UDLD:
-
The udld reset interface command.
-
The shutdown interface configuration command followed by the no shutdown interface configuration command restarts the disabled port.
-
The no udld { aggressive | enable} global configuration command followed by the udld { aggressive | enable} global configuration command reenables the disabled ports.
-
The no udld port interface configuration command followed by the udld port [ aggressive] interface configuration command reenables the disabled fiber-optic port.
-
The errdisable recovery cause udld global configuration command enables the timer to automatically recover from the UDLD error-disabled state, and the errdisable recovery
interval
interval global configuration command specifies the time to recover from the UDLD error-disabled state.
The udld port disable command disables UDLD on fiber-optic LAN ports.
Note:
This command is only supported on fiber-optic LAN ports.
Default UDLD configuration
Default UniDirectional Link Detection (UDLD) configuration governs network communication integrity by detecting unidirectional
links.
The default settings for UDLD configuration are as follows:
| Feature |
Default Setting |
|
UDLD global enable state
|
Globally disabled
|
|
UDLD per-port enable state for fiber-optic media
|
Disabled on all Ethernet fiber-optic ports
|
|
UDLD per-port enable state for twisted-pair (copper) media
|
Disabled on all Ethernet 10/100 and 1000BASE-TX ports
|
|
UDLD aggressive mode
|
Disabled
|
|
Fast UDLD per-port enable state
|
Disabled on all ports
|
This set of configurations ensures that UDLD operates under default settings until explicitly enabled or modified to suit
specific network environments.