UDLD or Unidirectional Link Detection is a cisco proprietary layer 2 messaging protocol that uses echos as a mechanism between a pair of devices. UDLD messaging allows the switch to advertise its identity and port identifier pair as the message originator, as well as a list of all switch/port pairs heard on the same segment.
UDLD can detect a unidirectional link by doing the following:
- UDLD messaging from a neighbor does not contain the exact switch/port pair matching the receiving switch and its port in the lest of detected neighbors. this means that the neighbor does not hear this switch at all, or the neighbor’s port sending these UDLD messages is different from that neighbor’s port receiving the switch’s own UDLD messages.
- UDLD messages arriving from a neighbor have the exact same switch/port originator pair used by the receiving switch. This means there is a self looped port.
- a switch has detected on a single neighbor but its UDLD messages contain more than on switch/port pair in the list of neighbors. This means that a shared media interconnection with an issue in its capability to provide full visibility between all connected devices.
Any of these symptoms will trigger UDLD and set the port into an err-disabled state.
UDLD can also sometimes manifest itself with a sudden loss of all incoming UDLD messages without the port going down. UDLD has two modes of operations regarding sudden loss of arriving UDLD messages.
Normal mode if UDLD messages cease to be received, a switch will try to reconnect with the neighbor up to eight times, if it fails UDLD does nothing and the port will remain up.
In Aggressive mode, UDLD messages stop arriving a switch will still try to reconnect up to eight times, however if it fails it will put the port into an Err’Disabled state.
UDLD can be configured on a per port or global basis, once the port is put into an err-disable state the only way to bring it back up is to shut the port down and bring it back up or using the udld reset command in priv EXEC mode.