Detection (UDLD) is a Layer 2 protocol that enables devices connected through
fiber-optic or twisted-pair Ethernet cables to monitor the physical
configuration of the cables and detect when a unidirectional link exists. All
connected devices must support UDLD for the protocol to successfully identify
and disable unidirectional links. When UDLD detects a unidirectional link, it
marks the link as unidirectional. Unidirectional links can cause a variety of
problems, including spanning-tree topology loops.
UDLD works with the
Layer 1 mechanisms to determine the physical status of a link. At Layer 1,
autonegotiation takes care of physical signaling and fault detection. UDLD
performs tasks that autonegotiation cannot perform, such as detecting the
identities of neighbors and shutting down misconnected interfaces. When you
enable both autonegotiation and UDLD, the Layer 1 and Layer 2 detections work
together to prevent physical and logical unidirectional connections and the
malfunctioning of other protocols.
A unidirectional link
occurs whenever traffic sent by a local device is received by its neighbor but
traffic from the neighbor is not received by the local device.
UDLD supports two
modes of operation: normal (the default) and aggressive. In normal mode, UDLD
can detect unidirectional links due to misconnected interfaces on fiber-optic
connections. In aggressive mode, UDLD can also detect unidirectional links due
to one-way traffic on fiber-optic and twisted-pair links and to misconnected
interfaces on fiber-optic links.
In normal mode, UDLD
detects a unidirectional link when fiber strands in a fiber-optic interface are
misconnected and the Layer 1 mechanisms do not detect this misconnection. If
the interfaces are connected correctly but the traffic is one way, UDLD does
not detect the unidirectional link because the Layer 1 mechanism, which is
supposed to detect this condition, does not do so. In case, the logical link is
considered undetermined, and UDLD does not disable the interface. When UDLD is
in normal mode, if one of the fiber strands in a pair is disconnected and
autonegotiation is active, the link does not stay up because the Layer 1
mechanisms did not detect a physical problem with the link. In this case, UDLD
does not take any action, and the logical link is considered undetermined.
UDLD aggressive mode
is disabled by default. Configure UDLD aggressive mode only on point-to-point
links between network devices that support UDLD aggressive mode. With UDLD
aggressive mode enabled, when a port on a bidirectional link that has a UDLD
neighbor relationship established stops receiving UDLD packets, UDLD tries to
reestablish the connection with the neighbor and administratively shuts down
the affected port. UDLD in aggressive mode can also detect a unidirectional
link on a point-to-point link on which no failure between the two devices is
allowed. It can also detect a unidirectional link when one of the following
or twisted-pair links, one of the interfaces cannot send or receive traffic.
or twisted-pair links, one of the interfaces is down while the other is up.
One of the fiber
strands in the cable is disconnected.
Detect Unidirectional Links
UDLD operates by
using two mechanisms:
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.
UDLD clears all
existing cache entries for the interfaces affected by the configuration change
whenever an interface is disabled and UDLD is running, whenever UDLD is
disabled on an interface, or whenever the switch is reset. 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.
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 aggressive
mode, the link is considered unidirectional, and the interface is shut down.
If UDLD in normal
mode is in the advertisement or in the detection phase and all the neighbor
cache entries are aged out, UDLD restarts the link-up sequence to resynchronize
with any potentially out-of-sync neighbors.
If you enable
aggressive mode when all the neighbors of a port have aged out either in the
advertisement or in the detection phase, UDLD restarts the link-up sequence to
resynchronize with any potentially out-of-sync neighbor. UDLD shuts down the
port if, after the fast train of messages, the link state is still