To prevent spanning tree loops, nonaggressive UDLD with the default interval of 15 seconds is fast enough
to shut down a unidirectional link before a blocking port transitions to the forwarding state (with default
spanning tree parameters).
When the UDLD aggressive mode is enabled, the UDLD can error disable the ports on the link to prevent the
traffic from being discarded under the following scenarios:
•
One side of a link has a port (either Tx and Rx) stuck.
•
One side of a link remains up while the other side of the link has gone down.
UDLD Functions
UDLD performs the following functions
•
Sends a probe packet on every active interface on which UDLD is configured to keep each device
informed about its neighbors.
•
Learns about the neighbors and keeps the updated neighbor information in a cache table
•
Sends several echo messages whenever it detects a new neighbor sending UDLD packets or whenever
a neighbor requests a resynchronization of the caches
•
Shuts down the affected port and notifies the user when one-way connection is detected. Devices on
both ends of the link must support UDLD in order for the protocol to successfully identify and disable
unidirectional links
•
Reestablishes the connection with the neighbor when a port on a bidirectional link stops receiving UDLD
packets if aggressive mode is enabled. After eight failed retries, the port goes into disabled state
Detecting Unidirectional Links
UDLD operates by using two mechanisms:
Neighbor database maintenance
UDLD learns about other UDLD-capable neighbors by periodically sending a hello packet (also called an
advertisement or probe) on every active interface to keep each device informed about its neighbors. When
the switch receives a hello message, it caches the information until the age time (hold time or time-to-live)
expires. If the switch receives a new hello message before an older cache entry ages, the switch replaces the
older entry with the new one. Whenever an interface is disabled and UDLD is running, whenever UDLD is
disabled on an interface, or whenever the switch is reset, UDLD clears all existing cache entries for the
interfaces affected by the configuration change. UDLD sends at least one message to inform the neighbors to
flush the part of their caches affected by the status change. The message is intended to keep the caches
synchronized.
Event-driven detection and echoing
UDLD relies on echoing as its detection mechanism. 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 is 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
LAN Switching Configuration Guide Cisco IOS XE Everest 16.5.1 (Cisco ASR 900 Series)
39
UniDirectional Link Detection (UDLD) Protocol
UDLD Functions