Catalyst 3550 Multilayer Switch Software Configuration Guide, 12.1(13)EA1
Configuring UDLD
Downloads: This chapterpdf (PDF - 197.0KB) The complete bookPDF (PDF - 11.03MB) | Feedback

Configuring UDLD

Table Of Contents

Configuring UDLD

Understanding UDLD

Configuring UDLD

Default UDLD Configuration

Enabling UDLD Globally

Enabling UDLD on an Interface

Resetting an Interface Shut Down by UDLD

Displaying UDLD Status


Configuring UDLD


This chapter describes how to configure the UniDirectional Link Detection (UDLD) protocol on your Catalyst 3550 switch.


Note For complete syntax and usage information for the commands used in this chapter, refer to the command reference for this release.


This chapter consists of these sections:

Understanding UDLD

Configuring UDLD

Displaying UDLD Status

Understanding UDLD

UDLD is a Layer 2 protocol that enables devices connected through fiber-optic or twisted-pair Ethernet cables to monitor the physical configuration of the cables and detect when a unidirectional link exists. All connected devices must support UDLD for the protocol to successfully identify and disable unidirectional links. When UDLD detects a unidirectional link, it administratively shuts down the affected port and alerts you. Unidirectional links can cause a variety of problems, including spanning-tree topology loops.

UDLD 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 sent by the local device is received by the neighbor but traffic 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, UDLD at Layer 2 determines whether those fibers are connected correctly and whether traffic is flowing bidirectionally between the correct neighbors. This check cannot be performed by autonegotiation because autonegotiation operates at Layer 1.

UDLD operates by using two mechanisms:

Neighbor database maintenance

UDLD learns about other UDLD-capable neighbors by periodically sending a hello packet (also called an advertisement or probe) on every active interface to keep each device informed about its neighbors.

When the switch receives a hello message, it caches the information until the age time (hold time or time-to-live) expires. If the switch receives a new hello message before an older cache entry ages, the switch replaces the older entry with the new one.

Whenever an interface is disabled and UDLD is running, whenever UDLD is disabled on an interface, or whenever the switch is reset, UDLD clears all existing cache entries for the interfaces affected by the configuration change. UDLD sends at least one message to inform the neighbors to flush the part of their caches affected by the status change. The message is intended to keep the caches synchronized.

Event-driven detection and echoing

UDLD relies on echoing as its detection mechanism. Whenever a UDLD device learns about a new neighbor or receives a resynchronization request from an out-of-sync neighbor, it restarts the detection window on its side of the connection and sends echo messages in reply. Because this behavior is the same on all UDLD neighbors, the sender of the echoes expects to receive an echo in reply. If the detection window ends and no valid reply message is received, the link is considered unidirectional, and the interface is shut down.

Figure 22-1 shows an example of a unidirectional link condition.

Figure 22-1 UDLD Detection of a Unidirectional Link

Configuring UDLD

This section describes how to configure UDLD on your switch. It contains this configuration information:

Default UDLD Configuration

Enabling UDLD Globally

Enabling UDLD on an Interface

Resetting an Interface Shut Down by UDLD

Default UDLD Configuration

Table 22-1 shows the default UDLD configuration.

Table 22-1 Default UDLD Configuration 

Feature
Default Setting

UDLD global enable state

Globally disabled

UDLD per-interface enable state for fiber-optic media

Disabled on all Ethernet fiber-optic interfaces

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

Disabled on all Ethernet 10/100 and 1000BASE-TX interfaces

UDLD aggressive mode

Disabled


UDLD is not supported on ATM interfaces. A UDLD-capable interface also cannot detect a unidirectional link if it is connected to a UDLD-incapable port of another switch.

Enabling UDLD Globally

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

 
Command
Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

udld {aggressive | enable | message time message-timer-interval}

Specify the UDLD mode of operation:

aggressive—Enables UDLD in aggressive mode on all fiber-optic interfaces. For details on the usage guidelines for the aggressive mode, refer to the command reference guide.

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.

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 7 to 90 seconds.

Note This command affects fiber-optic interfaces only. Use the udld interface configuration command to enable UDLD on other interface types. For more information, see the "Enabling UDLD on an Interface" section.

Step 3 

end

Return to privileged EXEC mode.

Step 4 

show udld

Verify your entries.

Step 5 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

To disable UDLD globally, use the no udld enable global configuration command to disable normal mode UDLD on all fiber-optic ports. Use the no udld aggressive global configuration command to disable aggressive mode UDLD on all fiber-optic ports.

Enabling UDLD on an Interface

Beginning in privileged EXEC mode, follow these steps to enable UDLD in the aggressive or normal mode on an interface:

 
Command
Purpose

Step 1 

configure terminal

Enter global configuration mode.

Step 2 

interface interface-id

Enter interface configuration mode, and specify the interface to be enabled for UDLD.

Step 3 

udld {aggressive | enable}

Specify the UDLD mode of operation:

aggressive—Enables UDLD in aggressive mode on the specified interface. For details on the usage guidelines for the aggressive mode, refer to the command reference for this release.

enable—Enables UDLD in normal mode on the specified interface. UDLD is disabled by default.

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

Step 4 

end

Return to privileged EXEC mode.

Step 5 

show udld interface-id

Verify your entries.

Step 6 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

To disable UDLD on a non-fiber-optic interface, use the no udld enable interface configuration command.


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


To disable UDLD on a fiber-optic interface, use the udld disable command to revert to the udld enable global configuration command setting. This command is not supported on non-fiber-optic interfaces.

Resetting an Interface Shut Down by UDLD

Beginning in privileged EXEC mode, follow these steps to reset all interfaces shut down by UDLD:

 
Command
Purpose

Step 1 

udld reset

Reset all interfaces shut down by UDLD.

Step 2 

show udld

Verify your entries.

Step 3 

copy running-config startup-config

(Optional) Save your entries in the configuration file.

You can also bring up the interface by using these commands:

The shutdown interface configuration command followed by the no shutdown interface configuration command restarts the disabled interface.

The no udld enable global configuration command re-enables UDLD globally.

The udld disable interface configuration command re-enables UDLD on the specified interface.

Displaying UDLD Status

To display the UDLD status for the specified interface or for all interfaces, use the show udld [interface-id] privileged EXEC command.

For detailed information about the fields in the display, refer to the command reference for this release.