Unidirectional Link Detection (UDLD) is a data link layer protocol from Cisco Systems to monitor the physical configuration of the cables and detect unidirectional links. UDLD complements the Spanning Tree Protocol which is used to eliminate switching loops.
UDLD allow two switches to verify if they can both send and receive data on a point-to-point connection. UDLD works with the Layer 1 (L1) mechanisms to determine the physical status of a link. UDLD can be run on both fiber optic and twisted-pair copper links.
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 administrator. Unidirectional links can cause a variety of problems, including spanning-tree topology loop
If two devices, A and B, are connected via a pair of optical fibers, one used for sending from A to B and other for sending from B to A, the link is bidirectional (two-way). If one of this fiber is broken, the link has become one-way or unidirectional. The goal of the UDLD protocol is to detect a broken bidirectional link.
Fig 34.1 Spanning Tree Topology
Fig 34.2 BPDU Route
UDLD supports two modes of operation: normal (the default) and aggressive. In normal mode, UDLD can detect unidirectional links due to misconnected ports on fiber-optic connections.
Modes of Operation
UDLD supports two modes of operation: normal (the default) and aggressive.
In normal mode, UDLD can detect unidirectional links due to misconnected interfaces on fiber-optic connections.
In aggressive mode, UDLD can also detect unidirectional links due to one-way traffic on fiber-optic and twisted-pair links and to misconnected interfaces on fiber-optic links. In UDLD aggressive mode, when a port on a bidirectional link that 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 disabled.
34.1 ERRDISABLE RECOVERY CAUSE UDLD
Use the errdisable recovery cause udld to enable auto recovery of UniDirectional Link Detection (UDLD). Use the “no” to disable it.
Switch#configure terminal
Switch(config)# errdisable recovery cause udld
Switch(config)# no errdisable recovery cause udld
Syntax |
errdisable recovery cause udld no errdisable recovery cause udld |
Default |
Error disable auto recovery is disabled by default. |
Mode |
Global EXEC |
Example |
The example shows how to enable auto recovery of UniDirectional Link Detection (UDLD). Switch#configure terminal Switch(config)# errdisable recovery cause udld Switch# show errdisable recovery |
34.2 UDLD
Use the udld command to enable UniDirectional Link Detection (UDLD) normal mode of interface. Use the “no” form of this command to restore to default setting. You can verify your setting by entering the show udld interface Privileged EXEC command.
Switch#configure terminal
Switch(config)#interface {Interface-ID}
Switch(config-if)# udld
Switch(config-if)# no udld
Syntax |
udld no udld |
Mode |
Interface Configuration |
Example |
The example shows how to enable UniDirectional Link Detection (UDLD) normal mode in interface gi1. Switch#configure terminal Switch(config)# interface gi1 Switch(config-if)# udld Switch# show udld interfaces gi1 |
34.3 UDLD AGGRESSIVE
Use the udld aggressive command to enable UniDirectional Link Detection (UDLD) aggressive mode of interface. Use the “no” form of this command to restore to default setting. You can verify your setting by entering the show udld interface Privileged EXEC command.
Switch#configure terminal
Switch(config)#interface {Interface-ID}
Switch(config-if)# udld aggressive
Switch(config-if)# no udld aggressive
Syntax |
udld aggressive no udld aggressive |
Mode |
Interface Configuration |
Example |
The example shows how to enable udld aggressive mode in interface gi1. Switch#configure terminal Switch(config)# interface gi1 Switch(config-if)# udld aggressive Switch# show udld interfaces gi1 |
34.4 UDLD MESSAGE TIME
Use the udld message time to set interval of UniDirectional Link Detection (UDLD) sent message.
Switch#configure terminal
Switch(config)# udld message time message-time-interval
Syntax |
udld message time message-time-interval |
Parameter |
message-time-interval Specify the interval for sending message.Range is 1 -90 seconds. |
Default |
Default interval is 15 seconds. |
Mode |
Global Configuration |
Example |
The example shows how to set interval of UniDirectional Link Detection (UDLD) message. Switch#configure terminal Switch(config)# udld message time 30 |
34.5 UDLD RESET
Use the udld reset command to reset all interfaces disabled by the UniDirectional Link Detection (UDLD) and permit traffic to begin passing through them again. If the interface configuration is still enabled for UDLD, these ports begin to run UDLD again and are disabled for the same reason if the problem has not been corrected.
Switch# udld reset
Syntax |
udld reset |
Mode |
Privileged EXEC |
Example |
The example shows how to reset all interfaces disabled by UDLD Switch# udld reset |
34.6 SHOW UDLD
Use the show udld command to display UniDirectional Link Detection (UDLD) administrative and operational status for all ports or the specified port.
Switch# show udld
Switch# show udld interfaces {IF_NMLPORTS}
Syntax |
show udld show udld interfaces {IF_NMLPORTS} |
Parameter |
{IF_NMLPORTS} Specify the normal interfaces to display udld information |
Mode |
Privileged EXEC |
Example |
The example shows how to show UniDirectional Link Detection (UDLD) settings and operational status of interface gi1. Switch# show udld interfaces gi1 |