UDLD – UniDirectional Link Detection

UDLD – UniDirectional Link Detection

- in Enterprise Infrastructure
7366
0

UDLD is a Cisco proprietary Layer 2 protocol that monitors the state of a port to validate bidirectional communication.

Recall that each port in a switch is bidirectional, with a transmitter (Tx) and a receiver (Rx) to exchange bits.

The switch sends a special frame to the destination mac address 01-00-0C-CC-CC-CC-CC that identifies the device and port id; the local switch expects to receive a reply from the remote equipment with similar information from the remote switch. If the switch receives this reply, it considers the link to be bidirectional; otherwise, it is considered unidirectional.

UDLD messages are sent every 15 seconds by default. UDLD can detect a one-way link after approximately three times the time interval in which UDLD messages are sent (45 seconds total, using the default value).

UDLD has two operation modes:

  • Normal: When a unidirectional link condition is detected, the port can continue its operation. UDLD simply marks the port as having an undetermined state and generates a Syslog message.
  • Aggressive: When a one-way link condition is detected, the switch takes action to re-establish the link. UDLD messages are sent once per second for 8 seconds. If none of these messages are repeated, the port is placed in an errdisable state to not be used.

UDLD is disabled by default and must be configured on both sides for it to work.

UDLD can be configured on a per-port basis, although you can enable it globally for all fiber optic ports on the switch.

Enable globally (applies to fiber ports only)

Switch(config)# udld { enable | aggressive | message time seconds}
  • Enable = Normal operation mode
  • Aggressive = Aggressive operation mode

Enable or disable UDLD on each interface:

Switch(config-if)# udld { enable | aggressive | disable}

Verification command:

!
# show udld g0/1
!

Copper media do not suffer from the physical layer conditions that allow a unidirectional link. However, you can enable UDLD on non-fiber links individually, if desired.

When first configuring UDLD you have no record of any neighbors on the link. If the neighbor switch does not yet have UDLD enabled, messages will not be played. UDLD will keep trying (indefinitely) to detect a neighbor and will not disable the link.

Once the neighbor has UDLD configured, both switches know about each other. From that point on, if the messages are not repeated, the link can be accurately considered as unidirectional.

In an EtherChannel, UDLD only acts on the physical link it detects as unidirectional. The other members of the EtherChannel operate normally.

Once UDLD aggressive mode has put a switch port in the errdisable state, you must use the following command to re-enable it:

Switch# udld reset

The above command resets all ports forwarded to errdisable via UDLD; another option is to configure errdisable’s RECOVERY feature to recover the ports every so often.

UDLD is a feature that can be used to avoid layer2 loops with Spanning-Tree, because STP can pass a port from BLOCKING to FORWARDING state due to a unidirectional link; this is where UDLD takes relevance by sending to errdisable state the unidirectional port to avoid loops. Note that UDLD can identify a unidirectional port in 45 seconds, and STP takes approximately 50 seconds to put a port in FORWARDING.

For more information:

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3750x_3560x/software/release/15-2_4_e/configurationguide/b_1524e_consolidated_3750x_3560x_cg/b_1524e_consolidated_3750x_3560x_cg_chapter_0100111.html?bookSearch=true

#

Facebook Comments

You may also like

How-to Install SSH Server on Linux 

1.- Install with apt-get command on Ubuntu: sudo