|
|
This chapter describes how to configure the UniDirectional Link Detection (UDLD) protocol on the Catalyst 6000 family switches.
![]() |
Note For complete syntax and usage information for the commands used in this chapter, refer to the Catalyst 6000 Family Command Reference publication. |
This chapter consists of these sections:
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 port 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 ports. 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 is a Layer 1 mechanism.
The switch periodically transmits UDLD messages (packets) to neighbor devices on ports with UDLD enabled. If the messages are echoed back to the sender within a specific time frame and they are lacking a specific acknowledgment (echo), the link is flagged as unidirectional and the 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.
![]() |
Note With supervisor engine software release 5.4(3) and later, you can specify the message interval between UDLD messages. Previously, the message interval was fixed at 60 seconds. With a configurable message interval, UDLD reacts much faster to link failures. |
![]() |
Note By default, UDLD is locally disabled on copper ports to avoid sending unnecessary control traffic on this type of media since it is often used for access ports. |
Figure 24-1 shows an example of a unidirectional link condition. Switch B successfully receives traffic from Switch A on the port. However, Switch A does not receive traffic from Switch B on the same port. UDLD detects the problem and disables the port.

Table 24-1 shows the default UDLD 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 ports |
UDLD per-port enable state for twisted-pair (copper) media | Disabled on all Ethernet 10/100 and 1000BaseTX ports |
UDLD message interval | 15 seconds |
UDLD aggressive mode | Disabled |
These sections describe how to configure UDLD:
![]() |
Note We recommend that you do not use UDLD with the ON - AUTO trunk combination. UDLD can be used with any other valid trunk combination. |
To enable UDLD globally on the switch, perform this task in privileged mode:
| Task | Command | |
|---|---|---|
Step 1 | Enable UDLD globally on the switch. | set udld enable |
Step 2 | Verify the configuration. | show udld |
This example shows how to enable UDLD globally and verify the configuration:
Console> (enable) set udld enable UDLD enabled globally Console> (enable) show udld UDLD : enabled Console> (enable)
To enable UDLD on individual ports, perform this task in privileged mode:
| Task | Command | |
|---|---|---|
Step 1 | Enable UDLD on a specific port. | set udld enable mod_num/port_num |
Step 2 | Verify the configuration. | show udld port [mod_num[/port_num]] |
This example shows how to enable UDLD on port 4/1 and verify the configuration:
Console> (enable) set udld enable 4/1 UDLD enabled on port 4/1 Console> (enable) show udld port 4/1 UDLD : enabled Message Interval: 15 seconds Port Admin Status Aggressive Mode Link State -------- ------------ --------------- --------- 4/1 enabled disabled bidirectional Console> (enable)
To disable UDLD on individual ports, perform this task in privileged mode:
| Task | Command | |
|---|---|---|
Step 1 | Disable UDLD on a specific port. | set udld disable mod_num/port_num |
Step 2 | Verify the configuration. | show udld port [mod_num[/port_num]] |
This example shows how to disable UDLD on port 4/1:
Console> (enable) set udld disable 4/1 UDLD disabled on port 4/1. Console> (enable)
To disable UDLD globally on the switch, perform this task in privileged mode:
| Task | Command | |
|---|---|---|
Step 1 | Disable UDLD globally on the switch. | set udld disable |
Step 2 | Verify the configuration. | show udld |
This example shows how to disable UDLD globally on the switch:
Console> (enable) set udld disable UDLD disabled globally Console> (enable)
To specify the UDLD message interval, perform this task in privileged mode:
| Task | Command | |
|---|---|---|
Step 1 | Specify the UDLD message interval. | set udld interval interval |
Step 2 | Verify the configuration. | show udld |
This example shows how to specify the UDLD message interval on the switch:
Console> (enable) set udld interval 20 UDLD message interval set to 20 seconds Console> (enable)
This example shows how to verify the message interval on the switch:
Console> (enable) show udld UDLD : enabled Message Interval : 20 seconds Console> (enable)
Software releases 5.4(3) and later have UDLD aggressive mode. UDLD aggressive mode is disabled by default and its use is recommended only for point-to-point links between Cisco switches running software release 5.4(3) or later. With aggressive mode enabled, when a port on a bidirectional link stops receiving UDLD packets, UDLD tries to reestablish the connection with the neighbor. After eight failed retries, the port is put into errdisable state.
In order to prevent spanning tree loops, normal UDLD with the default interval of 15 seconds is fast enough to shutdown a unidirectional link before a blocking port transitions to forwarding state (when default spanning tree parameters are used).
Enabling UDLD aggressive mode provides additional benefits in the following cases:
In these cases UDLD aggressive mode errordisables one of the ports on the link and stops the blackholing of traffic. Even with aggressive mode disabled, there would have been no risk for a broadcast storm due to a spanning tree loop in this situation, as one port is unable to pass traffic in both directions.
We recommend that you do not use UDLD with the ON - AUTO trunk combination. UDLD can be used with any other valid trunk combination.
When enabling aggressive UDLD, the recommended message interval is 30 seconds; beware that it might shut down the port on a link where there is an extended period of trunk state mismatch on two sides of the link, especially when the NMP is significantly loaded.
| Task | Command | |
|---|---|---|
Step 1 | Enable UDLD aggressive mode. | set udld aggressive-mode enable mod_num/port_num |
Step 2 | Verify the configuration. | show udld |
This example shows how to enable UDLD aggressive mode on the switch:
Console> (enable) set udld aggressive-mode enable 4/1 Aggressive UDLD enabled on port 4/1. Console> (enable)
This example shows how to verify that UDLD aggressive mode is enabled on the switch:
Console> (enable) show udld port 4/1 UDLD : enabled Message Interval: 30 seconds Port Admin Status Aggressive Mode Link State -------- ------------ --------------- --------- 4/1 enabled Enabled bidirectional Console> (enable)
To display the UDLD enable state, perform this task in privileged mode:
| Task | Command |
|---|---|
Display the UDLD enable state. | show udld |
This example shows how to display the UDLD enable state:
Console> (enable) show udld UDLD : enabled Message Interval : 15 seconds Console> (enable)
To display UDLD configuration for a module or port, perform this task in privileged mode:
| Task | Command |
|---|---|
Display the UDLD configuration for a module or port. | show udld port [mod_num] [mod/port_num] |
This example shows how to display the UDLD configuration for ports on module 4:
Console> (enable) show udld port 4 UDLD : enabled Message Interval: 15 seconds Port Admin Status Aggressive Mode Link State -------- ------------ --------------- --------- 4/1 enabled disabled bidirectional 4/2 enabled disabled bidirectional 4/3 enabled disabled undetermined 4/4 enabled disabled bidirectional . . Console> (enable)
Table 24-2 describes the fields in the show udld command output.
| Field | Description |
|---|---|
UDLD | Status of whether UDLD is enabled or disabled. |
Message Interval | Message interval in seconds. |
Port | Module and port number(s). |
Admin Status | Status of whether administration status is enabled or disabled. |
Aggressive Mode | Status of whether aggressive mode is enabled or disabled. |
Link State | Status of the link: undetermined (detection in progress, neighboring UDLD has been disabled), not applicable (UDLD has been disabled), shutdown (unidirectional link has been detected and the port disabled), or bidirectional (bidirectional link has been detected and the port disabled). |
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Posted: Sun Jun 11 02:24:00 PDT 2000
Copyright 1989 - 2000©Cisco Systems Inc.