Configuring Unidirectional Link Detection

This chapter contains the following sections:

Unidirectional Link Detection

The Cisco-proprietary Unidirectional Link Detection (UDLD) protocol allows devices that are connected through fiber-optic or copper (for example, Category 5 cabling) Ethernet cables to monitor the physical configuration of the cables and detect when a unidirectional link exists. When a device detects a unidirectional link, UDLD shuts down the affected LAN port and alerts the user. Unidirectional links can cause a variety of problems.

A unidirectional link occurs whenever traffic transmitted by the local device over a link is received by the neighbor but traffic transmitted from the neighbor is not received by the local device.

The Cisco Nexus 3550-T device periodically transmits UDLD frames to neighbor devices on LAN ports with UDLD enabled. If the frames are echoed back within a specific time frame and they lack a specific acknowledgment (echo), the link is flagged as unidirectional and the LAN port is shut down. Devices on both ends of the link must support UDLD in order for the protocol to successfully identify and disable unidirectional links. You can configure the transmission interval for the UDLD frames, either globally or for the specified interfaces.


Note


By default, UDLD is locally disabled on copper LAN ports to avoid sending unnecessary control traffic on this type of media.


The figure shows an example of a unidirectional link condition. Device B successfully receives traffic from device A on the port. However, device A does not receive traffic from device B on the same port. UDLD detects the problem and disables the port.

Figure 1. Unidirectional Link


The following table shows the default UDLD configuration.

Table 1. UDLD Default Configuration

Feature

Default Value

UDLD global enable state

Globally disabled

UDLD per-port enable state for fiber-optic media

Enabled on all Ethernet fiber-optic LAN ports

UDLD per-port enable state for twisted-pair (copper) media

Disabled on all 10G Ethernet ports

UDLD aggressive mode

Disabled

UDLD message interval

15 seconds

UDLD Modes

UDLD can operate in two modes, namely, aggressive mode and non-aggressive mode.

UDLD aggressive mode is disabled by default. You can configure UDLD aggressive mode only on point-to-point links between network devices that support UDLD aggressive mode. If UDLD aggressive mode is enabled, when a port on a bidirectional link that has a UDLD neighbor relationship established stops receiving UDLD frame, UDLD tries to reestablish the connection with the neighbor. After eight failed retries, the port is disabled.

When you enable the UDLD aggressive mode, the following occurs:

One side of a link has a port stuck (both transmission and receive)

One side of a link remains up while the other side of the link is down

In these cases, the UDLD aggressive mode disables one of the ports on the link, which prevents traffic from being discarded.


Note


You enable the UDLD aggressive mode globally to enable that mode on all the fiber ports. You must enable the UDLD aggressive mode on copper ports on specified interfaces.


Configuring the UDLD Mode

You can configure normal unidirectional link detection (UDLD) modes for Ethernet interfaces on devices configured to run UDLD.

Before you can enable a UDLD mode for an interface, you must make sure that UDLD is already enabled on the device that includes the interface. UDLD must also be enabled on the other linked interface and its device.


Note


If the interface is a copper port, you must use the command enable UDLD to enable the UDLD. If the interface is a fiber port you need not explicitly enable UDLD on the interface. However if you attempt to enable UDLD on a fiber port using the enable UDLD command, you may get an error message indicating that is not a valid command.


The following table lists CLI details to enable and disable UDLD on different interfaces

Table 2. CLI Details to Enable or Disable UDLD on Different Interfaces

Description

Fiber port

Copper or Nonfiber port

Default setting

Enabled

Disabled

Enable UDLD command

no udld disable

udld enable

Disable UDLD command

udld disable

no udld enable

Before you begin

You must enable UDLD for the other linked port and its device.

Procedure

  Command or Action Purpose

Step 1

configure terminal

Example:

switch# configure terminal
switch(config)#

Enters global configuration mode.

Step 2

[no] feature udld

Example:

switch(config)# feature udld
switch(config)#
switch(config)# no feature udld
switch(config)#

Enables/Disables UDLD for the device.

Step 3

udld message-time seconds

Example:

switch(config)# udld message-time 30
switch(config)#

(Optional) Specifies the interval between sending UDLD messages. The range is from 7 to 90 seconds, and the default is 15 seconds.

Step 4

udld aggressive

Example:

switch(config)# udld aggressive
switch(config)#

Optional) Specifies UDLD mode to be aggressive.

Note

 

For copper interfaces, you enter the interface command mode for those interfaces you want to configure for UDLD aggressive mode and issue this command in interface command model.

Step 5

interface ethernet slot/port

Example:

switch(config)# interface ethernet 1/1
switch(config-if)# 

(Optional) Specifies an interface to configure, and enters interface configuration mode.

Step 6

udld [enable | disable]

Example:

switch(config-if)# udld enable
switch(config-if)#

(Optional) Enables UDLD on the specified copper port or disables UDLD on the specified fiber port.

To enable UDLD on copper ports, enter the udld enable command. To enable UDLD on fiber ports, enter the no udld disable command.

Step 7

show udld [ethernet slot/port | global | neighbors]

Example:

switch(config)# show udld 
switch(config)#

(Optional) Displays the UDLD status.

Step 8

exit

Example:

switch(config-if-range)# exit
switch(config)# 

Exits the interface mode.

Step 9

copy running-config startup-config

Example:

switch(config)# copy running-config startup-config  

(Optional) Copies the running configuration to the startup configuration.

Example

This example shows how to enable the UDLD for the device:

switch# configure terminal 
switch(config)# feature udld
switch(config)#

This example shows how to set the UDLD message interval to 30 seconds:

switch# configure terminal 
switch(config)# feature udld
switch(config)# udld message-time 30
switch(config)# 

This example shows how to disable UDLD for Ethernet port 1/1:

switch# configure terminal 
switch(config)# interface ethernet 1/1
switch(config-if-range)# no udld enable
switch(config-if-range)# exit

This example shows how to disable UDLD for the device:

switch# configure terminal 
switch(config)# no feature udld
switch(config)# exit