Table Of Contents
Configuring UDLD
Understanding How UDLD Works
Default UDLD Configuration
Configuring UDLD
Enabling UDLD Globally
Enabling UDLD on Individual Ports
Disabling UDLD on Individual Ports
Disabling UDLD Globally
Specifying the UDLD Message Interval
Enabling UDLD Aggressive Mode
Displaying the UDLD Configuration
Configuring UDLD
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:
•
Understanding How UDLD Works
•
Default UDLD Configuration
•
Configuring UDLD
Understanding How UDLD Works
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 releases, 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 30-1 shows an example of a unidirectional link condition. Each switch can send packets to a neighbor switch but is not able to receive packets from the same switch that it is sending packets to. UDLD detects and disables these one-way connections.
Figure 30-1 Unidirectional Link
Default UDLD Configuration
Table 30-1 shows the default UDLD configuration.
Table 30-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 ports
|
UDLD per-port enable state for twisted-pair (copper) media
|
Disabled on all Ethernet 10/100 and 1000BASE-TX ports
|
UDLD message interval
|
15 seconds
|
UDLD aggressive mode
|
Disabled
|
Configuring UDLD
These sections describe how to configure UDLD:
•
Enabling UDLD Globally
•
Enabling UDLD on Individual Ports
•
Disabling UDLD on Individual Ports
•
Disabling UDLD Globally
•
Specifying the UDLD Message Interval
•
Enabling UDLD Aggressive Mode
•
Displaying the UDLD Configuration
Enabling UDLD Globally
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
Console> (enable) show udld
Enabling UDLD on Individual Ports
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/port
|
Step 2
|
Verify the configuration.
|
show udld port [mod[/port]]
|
This example shows how to enable UDLD on port 4/1 and verify the configuration:
Console> (enable) set udld enable 4/1
Console> (enable) show udld port 4/1
Message Interval: 15 seconds
Port Admin Status Aggressive Mode Link State
-------- ------------ --------------- ---------
4/1 enabled disabled bidirectional
Disabling UDLD on Individual Ports
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/port
|
Step 2
|
Verify the configuration.
|
show udld port [mod[/port]]
|
This example shows how to disable UDLD on port 4/1:
Console> (enable) set udld disable 4/1
UDLD disabled on port 4/1.
Disabling UDLD Globally
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
Specifying the UDLD Message Interval
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
This example shows how to verify the message interval on the switch:
Console> (enable) show udld
Message Interval : 20 seconds
Enabling UDLD Aggressive Mode
Software release 5.4(3) and later releases 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 releases. With UDLD aggressive mode enabled, when a port on a bidirectional link which has a UDLD neighbor relationship established 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 shut down a unidirectional link before a blocking port transitions to the forwarding state (when default spanning tree parameters are used).
Enabling UDLD aggressive mode provides additional benefits in the following cases:
•
One side of a link has a port stuck (both Tx and Rx)
•
One side of a link remains up while the other side of the link has gone down
In these cases, UDLD aggressive mode errdisables 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.
| |
Task
|
Command
|
Step 1
|
Enable UDLD aggressive mode.
|
set udld aggressive-mode enable mod/port
|
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.
This example shows how to verify that UDLD aggressive mode is enabled on the switch:
Console> (enable) show udld port 4/1
Message Interval: 30 seconds
Port Admin Status Aggressive Mode Link State
-------- ------------ --------------- ---------
4/1 enabled Enabled bidirectional
Displaying the UDLD Configuration
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
Message Interval : 15 seconds
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] [mod/port]
|
This example shows how to display the UDLD configuration for ports on module 4:
Console> (enable) show udld port 4
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
Table 30-2 describes the fields in the show udld command output.
Table 30-2 show udld Command Output Fields
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 or UDLD on the neighbors has been disabled), not applicable (UDLD and/or the local port has been manually disabled), shutdown (unidirectional link has been detected and the port err-disabled), or bidirectional (a bidirectional link has been detected since the port is functioning properly in both directions).
|