Cisco Systems, Inc.(R)    Cisco | Profile | Contacts & Feedback | Help
Cisco SMB Support Assistant
Configure UDLD on a Catalyst Switch
Home > Work With My Switches > Cisco Catalyst Switches > Configure UDLD on a Catalyst Switch  
 

Configure UDLD on a Catalyst Switch




Introduction

This document provides instructions on how to configure UniDirectional Link Detection (UDLD) protocol on your Catalyst Switches. This procedure applies to Cisco Catalyst switches running Cisco IOS software or Catalyst OS software.


Back to Top



Requirements

To perform the steps described in this document, you need these items:


Back to Top



UDLD Overview

UniDirectional Link Detection (UDLD) is a Cisco proprietary data link layer protocol to monitor the physical configuration of the cables and detect unidirectional links. A unidirectional link occurs, whenever traffic is transmitted by the local device over a link that is received by the neighbor but, traffic from the neighbor is not received by the local device. UDLD also helps in detecting mis-configured links and complements the Spanning Tree Protocol (STP) that is used to eliminate layer 2 loops. 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 gives an alert. UDLD works with the Layer 1 mechanism to determine the physical status of a link and it performs tasks that autonegotiation could not perform, such as detecting the identities of neighbors and shutting down the misconnected interfaces. UDLD is disabled globally by default.

UDLD operates in two modes: normal mode and aggressive mode. In normal mode, a UDLD capable port A periodically sends a UDLD probe to port B. If port B is not UDLD capable, no unidirectional link detection occurs. If both devices are UDLD capables and if bi-directional connectivity exists, probe messages travel in both directions. UDLD protocol attempts to synchronize the devices by sending echo messages to the peer port and waits for answer during the detection window. If the unidirectional traffic is detected when the port link is still up (port A no longer sends traffic to port B), port B enters errdisable mode. Port A is marked Undetermined but does not enter errdisable mode. It continues to operate under its current STP status. Normal mode is the default mode for UDLD operation. In aggressive mode, UDLD determines whether the traffic is flowing bidirectionally between the correct neighbors. If port A loses its neighbor connectivity, it actively tries to re-establish the relationship by sending a probe to port B. If port B does not respond, it is considered unidirectional. When UDLD detects a bidirectional to unidirectional transition it brings the link to errdisable state.

UDLD could also detect a unidirectional link when one of these problems exists:

  • On fiber-optic or twisted-pair links, one of the interfaces could not send or receive traffic.

  • On fiber-optic or twisted-pair links, one of the interfaces is down while the other is up.

  • One of the fiber strands in the cable is disconnected.

In these cases, UDLD shuts down the affected interface. UDLD learns about the 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. This method is known as Neighbor database maintenance. In Event-driven detection and echoing method, 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.

config_UDLD_cat_switch_01.gif


Back to Top



Connect to the Switch

Follow these steps to connect your PC to the switch for configuration:

  1. Connect a PC to the switch with a console cable.

  2. Create a HyperTerminal connection to your switch. For more information, refer to Create a HyperTerminal Connection.

  3. Log into the switch with the login and password that you entered in fields B10 and B11 of the switch Worksheet.

    Username:admin
    Password:
    
  4. Type enable and press Enter to access the privileged mode. Type the enable password that you entered in field S5 of the Switch Port Assignment Worksheet.

    switch>enable
    Password:

Back to Top



Enable UDLD on a Switch running Cisco IOS software

UDLD could be enabled globally (only for fiber optics ports) or on per-interface basis. The interface settings overrides the global settings if both are configured.

Follow these steps to enable UDLD globally:

  1. Enter the global configuration mode and give the command udld enable to enable UDLD globally on your switch.

    Switch#configure terminal
    Switch(config)#udld enable
    
  2. Optionally to use UDLD in aggressive mode, enter the command udld aggressive.

    Switch(config)#udld aggressive
    
  3. Type end to exit from the configuration mode and enter the command copy running-config startup-config to save this configuration.

    Switch(config)#end
    Switch#copy running-config startup-config
    

To enable UDLD on per-interface basis, follow these steps:

  1. Enter the global configuration mode and specify the interface on which UDLD is to enabled using the command interface followed by port number.

    Switch#configure terminal
    Switch(config)#interface FastEthernet0/1
    
  2. Type the command udld port to enable UDLD on this interface. Optionally to use UDLD in aggressive mode you could use the parameter aggressive after this command.

    Switch(config-if)#udld port aggressive
    
  3. Type end to come out of configuration mode and enter the command copy running-config startup-config to save this configuration.

    Switch(config-if)#end
    Switch#copy running-config startup-config
    

Back to Top



Enable UDLD on a Switch running Catalyst OS software

Follow these steps to enable UDLD:

  1. UDLD must be enabled globally before any interface could use UDLD. To enable UDLD globally on the switch enter the command set udld enable in privileged mode.

    Switch>(enable) set udld enable
    
  2. Enable UDLD on required ports using command set udld enable followed by the port number.

    Switch>(enable) set udld enable 1/0
    
  3. Optionally to set UDLD in aggressive mode, enter the command set udld aggressive-mode enable followed by port number.

    Switch>(enable) set udld aggressive-mode enable 1/0
    

Back to Top



Next Step

You have now set up UDLD on your switch.

To make further changes to your switch, refer to the Switch Support Page.

To make further changes to your network, refer to the Configuration Overview page.


Back to Top



Troubleshoot the Procedure

This section provides information about common problems that you may encounter. If this information does not solve your problem, contact the SMB Technical Assistance Center (SMB TAC) for assistance.

Problem

Cause(s) and Suggested Solution(s)

Check UDLD status.

Enter the command show udld to check UDLD global status or enter the command show udld followed by port number to check UDLD status of an interface.


Back to Top



Related Information

Service Requests

  Open a service request
  Update a service request

Feedback

Please rate this site:
++ + +/- - --

Suggestions for improvement:




If Cisco may contact you for more details
or for future feedback opportunities,
please enter your contact information:

Full Name:
Email:



© 1992-2006 Cisco Systems, Inc. All rights reserved. Terms and Conditions, Privacy Statement, Cookie Policy and Trademarks of Cisco Systems, Inc.