Unidirectional Link Detection (UDLD) is a Layer 2 protocol that enables devices connected through fiber-optic or twisted-pair Ethernet cables to detect unidirectional links. A unidirectional link occurs whenever traffic from a neighboring device is received by the local device, but traffic from the local device is not received by the neighbor.
The purpose of UDLD is to detect ports on which the neighbor does not receive traffic from the local device (unidirectional link) and to shut down those ports. All connected devices must support UDLD for the protocol to successfully detect unidirectional links. If only the local device supports UDLD, it is not possible for the device to detect the status of the link. In this case, the status of the link is set to Undetermined. The user can configure whether ports in the Undetermined state are shut down or merely trigger notifications.
This article provides instructions on how to configure the UDLD settings on your switch through the Command Line Interface (CLI).
Step 1. Log in to the switch console. The default username and password is cisco/cisco. If you have configured a new username or password, enter the credentials instead.
Note: To learn how to access an SMB switch CLI through SSH or Telnet, click here.
Note: The commands may vary depending on the exact model of your switch. In this example, the SG550XG-8F8T switch is accessed through Telnet.
Step 2. From the Privileged EXEC mode of the switch, enter the Global Configuration mode by entering the following:
Step 3. To configure the global value of the interval between sending UDLD messages, enter the following:
SG550XG-8F8T(config)#udld message time [seconds]Note: This configuration is relevant for both fiber and copper ports. The default value is 15 seconds. In this example, the interval is set to 60 seconds.
Step 4. To globally enable the UDLD protocol on the switch, enter the following:
SG550XG-8F8T(config)#udld [aggressive | normal]Note: This configuration is only relevant for fiber ports. The UDLD state of copper ports must be configured individually per interface. For instructions, skip to the Configure UDLD Interface Settings section.
Note: In this example, Normal is used.
Step 5. (Optional) To disable UDLD on the switch, enter the following:
SG550XG-8F8T(config)#udldYou should now have successfully configured the UDLD global settings on your switch through the CLI.
You can configure the UDLD interface settings of the switch to change the UDLD state for a specific port. This will allow you to configure the UDLD state for copper or fiber ports.
To configure UDLD for an interface, follow these steps:
Step 1. In the Global Configuration mode, enter the Interface Configuration context by entering the following:
SG550XG-8F8T(config)#interface [interface-id]Note: In this example, interface XG1/0/2 is used.
Step 2. To enable the UDLD protocol on an Ethernet port, enter the following:
SG550XG-8F8T(config)#udld port [normal | aggressive | disable]The default are as follows:
Note: In this example, the UDLD port is configured as aggressive.
Step 3. Enter the end command to go back to the Privileged EXEC mode of the switch:
SG550XG-8F8T(config-if)#endYou should now have successfully configured the UDLD interface settings on your switch through the CLI.
Step 4. (Optional) To display the administrative and operational UDLD status on the switch, enter the following:
SG550XG-8F8T#show udld [interface-id] [neighbors]Step 5. (Optional) In the Privileged EXEC mode of the switch, save the configured settings to the startup configuration file by entering the following:
SG550XG-8F8T#copy running-config startup-configStep 6. (Optional) Press Y for Yes or N for No on your keyboard once the Overwrite file [startup-config].... prompt appears.
You should now have successfully configured the UDLD settings on your switch through the CLI.
Revision | Publish Date | Comments |
---|---|---|
1.0 |
13-Dec-2018 |
Initial Release |