Configuring UDLD


This chapter describes how to configure the UniDirectional Link Detection (UDLD) and Unidirectional Ethernet on the Catalyst 4500 series witch. It also provides guidelines, procedures, and configuration examples.

This chapter includes the following major sections:

About UDLD

Default UDLD Configuration

Configuring UDLD on the Switch


Note For complete syntax and usage information for the switch commands used in this chapter, look at the Cisco Catalyst 4500 Series Switch Command Reference and related publications at this location:

http://www.cisco.com/en/US/products/hw/switches/ps4324/index.html

If the command is not found in the Catalyst 4500 Command Reference, it is located in the larger Cisco IOS library. Refer to the Catalyst 4500 Series Switch Cisco IOS Command Reference and related publications at this location:

http://www.cisco.com/en/US/products/ps6350/index.html


About UDLD

UDLD is a layer 2 protocol that enables devices connected through fiber-optic or twisted-pair Ethernet cables. It monitors a physical connection (such as wrong cabling) to detect unidirectional links to avoid spanning-tree topology loops or silent drop traffic.

All connected devices must support UDLD for the protocol to successfully identify the unidirectional links. When UDLD detects a unidirectional link, it can administratively shut down the affected port and send you a warning message.

Modes of Operation

UDLD supports two operation modes: normal and aggressive.

normal A UDLD-capable port A periodically sends a UDLD probe to port B. If port B is not UDLD capable, no unidirectional link detection occurs. If both devices are UDLD capable and bi-directional connectivity exists, probe messages travel in both direction at a rate of 1 every few seconds (through the UDLD message time interval global configuration command). Upon receiving the probe, the UDLD protocol attempts to synchronize the devices by sending echo messages to the peer port and waiting for answer during the detection window. If the unidirectional traffic is detected when the port link is still up (port B no longer sends traffic to port A), port B enters errdisable mode. Port A is marked Undetermined but does not enter errdisable mode. It continues to operate under its current STP status because this mode is informational only; it is potentially less disruptive although it does not prevent STP loops.

aggressive If port A loses its neighbor connectivity, it actively tries to re-establish the relationship by sending a probe to port B. If port B does not respond, it is considered unidirectional and port A enters errdisable state to avoid silent drop traffic.

UDLD aggressive mode can interoperate with UDLD normal mode. When the unidirectional condition is detected, only the aggressive mode link shuts down.

By default,

UDLD is locally disabled on copper LAN ports to avoid sending unnecessary control traffic (BPDU control packets) on this type of media; this protocol is most often used for access ports.

UDLD is enabled on a fiber port if global UDLD is activated.

Figure 25-1 illustrates a unidirectional link condition. Each switch can send packets to a neighbor switch but cannot receive packets from the switch it is sending packets to. UDLD detects and disables these one-way connections.

Figure 25-1 Unidirectional Link

Default UDLD Configuration

Table 25-1 shows the UDLD default configuration.

Table 25-1 UDLD Default Configuration

Feature
Default Status

UDLD global enable state

Globally disabled

UDLD per-interface enable state for fiber-optic media

Enabled on all Ethernet fiber-optic interfaces

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

Disabled on all Ethernet 10/100 and 1000BaseTX interfaces


Configuring UDLD on the Switch

The following sections describe how to configure UDLD:

Enabling UDLD Globally

Enabling UDLD on Individual Interfaces

Disabling UDLD on Non-Fiber-Optic Interfaces

Configuring the UDLD Probe Message Interval

Resetting Disabled LAN Interfaces

Enabling UDLD Globally

To enable UDLD in the aggressive or normal mode and to set the configurable message timer on all fiber-optic interfaces on the switch, follow these steps:

 
Command
Purpose

Step 1 

Switch# configure terminal

Enters the global configuration mode.

Step 2 

Switch(config)# udld {aggressive | enable | message time message-timer-interval}

Specifies the UDLD mode of operation:

aggressive Enables UDLD in aggressive mode on all fiber-optic interfaces.

enable Enables UDLD in normal mode on all fiber-optic interfaces on the switch. UDLD is disabled by default.

An individual interface configuration overrides the setting of the udld enable global configuration command.

For more information about aggressive and normal modes, see the Modes of Operation section.

message time message-timer-interval-Configures the period of time between UDLD probe messages on ports that are in the advertisement phase and are determined to be bidirectional. The range is from 1 to 90 seconds.

Note Prior to Cisco IOS Release 12.2(31)SGA, the timer range is 7 to 90 seconds. With
Cisco IOS Release 12.2(31)SGA, the timer range is 1 to 90 seconds

Step 3 

Switch(config)# end

Returns to privileged EXEC mode.

Step 4 

Switch# show udld

Verifies the configuration.

Enabling UDLD on Individual Interfaces

To enable UDLD on individual interfaces, perform this task:

 
Command
Purpose

Step 1 

Switch(config-if)# udld enable

Enables UDLD on a specific interface. On a fiber-optic interface, this command overrides the udld enable global configuration command setting.

Step 2 

Switch# show udld interface

Verifies the configuration.

Disabling UDLD on Non-Fiber-Optic Interfaces

To disable UDLD on individual non-fiber-optic interfaces, perform this task:

 
Command
Purpose

Step 1 

Switch(config-if)# no udld enable

Disables UDLD on a non-fiber-optic interface.

Note On fiber-optic interfaces, the no udld enable command reverts the interface configuration to the udld enable global configuration command setting.

Step 2 

Switch# show udld interface

Verifies the configuration.

Configuring the UDLD Probe Message Interval

To configure the time between UDLD probe messages on ports that are in advertisement mode and are currently determined to be bidirectional, perform this task:

 
Command
Purpose

Step 1 

Switch(config)# udld message time interval

Configures the time between UDLD probe messages on ports that are in advertisement mode and are currently determined to be bidirectional; valid values are from 1 to 90 seconds.

Note Prior to Cisco IOS Release 12.2(31)SGA, the time interval is 7-90 seconds. With
Cisco IOS Release 12.2(31)SGA, the time interval is 1-90 second.

The no udld message command returns to the default value (60 seconds).

Step 2 

Switch# show udld type-slot/interface

Verifies the configuration.

Resetting Disabled LAN Interfaces

To reset all LAN ports that have been shut down by UDLD, perform this task:

Command
Purpose

Switch(config)# udld reset

Resets all LAN ports that have been shut down by UDLD.