Catalyst 4000 Family Switch Cisco IOS Software Configuration Guide, 12.1(8a)EW
Configuring UDLD

Table Of Contents

Understanding and Configuring UDLD

UDLD Overview

Default UDLD Configuration

Configuring UDLD

Enabling UDLD Globally

Enabling UDLD on Individual Interfaces

Disabling UDLD on Nonfiber-Optic Interfaces

Disabling UDLD on Fiber-Optic Interfaces

Resetting Disabled Interfaces


Understanding and Configuring UDLD


This chapter describes how to configure the UniDirectional Link Detection (UDLD) protocol on the Catalyst 4006 switch with Supervisor Engine III. It also provides guidelines, procedures, and configuration examples.

This chapter consists of the following sections:

UDLD Overview

Default UDLD Configuration

Configuring UDLD


Note For complete syntax and usage information for the commands used in this chapter, refer to the Command Reference for the Catalyst 4006 Switch with Supervisor Engine III and the publications at
http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/index.htm


UDLD Overview

The UDLD protocol allows devices 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 unidirectional link is detected, UDLD shuts down the affected interface and alerts the user. Unidirectional links can cause a variety of problems, including spanning tree topology loops.

UDLD is a Layer 2 protocol that works with the Layer 1 mechanisms to determine the physical status of a link. At Layer 1, autonegotiation takes care of physical signaling and fault detection. UDLD performs tasks that autonegotiation cannot perform, such as detecting the identities of neighbors and shutting down misconnected interfaces. When you enable both autonegotiation and UDLD, Layer 1 and Layer 2 detections work together to prevent physical and logical unidirectional connections and the malfunctioning of other protocols.

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. If one of the fiber strands in a pair is disconnected, as long as autonegotiation is active, the link does not stay up. In this case, the logical link is undetermined, and UDLD does not take any action. If both fibers are working normally from a Layer 1 perspective, then UDLD at Layer 2 determines whether those fibers are connected correctly and whether traffic is flowing bidirectionally between the right neighbors. This check cannot be performed by autonegotiation, because autonegotiation operates at Layer 1.

The switch periodically transmits UDLD packets to neighbor devices on interfaces with UDLD enabled. If the packets are echoed back within a specific time frame and they are lacking a specific acknowledgment (echo), the link is flagged as unidirectional and the interface 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.


Note By default, UDLD is locally disabled on copper interfaces to avoid sending unnecessary control traffic on this type of media since it is often used for access interfaces.


Figure 19-1 shows an example of a unidirectional link condition. Switch B successfully receives traffic from Switch A on the interface. However, Switch A does not receive traffic from Switch B on the same interface. UDLD detects the problem and disables the interface.

Figure 19-1 Unidirectional Link

Default UDLD Configuration

Table 19-1 shows the default UDLD configuration.

Table 19-1 UDLD Default Configuration

Feature
Default Value

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

The following sections describe how to configure UDLD:

Enabling UDLD Globally

Enabling UDLD on Individual Interfaces

Disabling UDLD on Nonfiber-Optic Interfaces

Disabling UDLD on Fiber-Optic Interfaces

Resetting Disabled Interfaces

Enabling UDLD Globally

To enable UDLD globally on all fiber-optic interfaces on the switch, enter the following command:

Command
Purpose

Switch(config)# [no] udld enable

Enables UDLD globally on fiber-optic interfaces on the switch. Use the no keyword to globally disable UDLD on fiber-optic interfaces.

Note This command only configures fiber-optic interfaces. Individual interface configuration overrides the setting of this command.


Enabling UDLD on Individual Interfaces

To enable UDLD on individual interfaces, perform this task:

 
Task
Command

Step 1 

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

Switch(config-if)# udld enable

Step 2 

Verify the configuration.

Switch# show udld interface

Disabling UDLD on Nonfiber-Optic Interfaces

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

 
Task
Command

Step 1 

Disable UDLD on a nonfiber-optic interface.

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

Switch(config-if)# no udld enable

Step 2 

Verify the configuration.

Switch# show udld interface

Disabling UDLD on Fiber-Optic Interfaces

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

 
Task
Command

Step 1 

Disable UDLD on a fiber-optic interface. Use the no keyword to revert to the udld enable global configuration command setting.

Note This command is not supported on nonfiber-optic interfaces.

Switch(config-if)# udld disable

Step 2 

Verify the configuration.

Switch# show udld interface

Resetting Disabled Interfaces

To reset all interfaces that have been shutdown by UDLD, enter the following command:

Command
Purpose
Switch# udld reset 

Resets all interfaces that have been shutdown by UDLD.