UDLD is Unidirectional Link Detection protocol.
A link is considered unidirectional when the link is up on both sides but one of the sides is not receiving packets sent by the remote side while the remote side still receives packets sent by the local side.
Layer 2 protocol works with Layer 1 mechanisms to determine the physical link status.
UDLD detects identities of neighbors and shutting down misconnected ports. It exchanges protocol packets between the neighbors. Both devices on the link must support UDLD and have it enabled.
When enabled, each switch port will have the port’s own device/port ID in the UDLD packets and the neighbor’s device/port IDs seen by UDLD on that port. Neighbor ports should see their own device/port ID in the received packets. If the neighbor doesn’t see their own device/port ID for a specified duration of time, the link is considered unidirectional.
When UDLD kicks in the following console message is displayed for the affected port(s):
UDLD-3-DISABLE: Unidirectional link detected on port 1/2. Port disabled
Port remains shut down unless manually reenabled or until the errdisable timeout expires, if configured.
There are two operational modes: