Configuring UDLD
This chapter describes how to configure UniDirectional Link Detection (UDLD) Ethernet on the switch, and includes the following major sections:
Note For complete syntax and usage information for the switch commands used in this chapter, see the Cisco Catalyst 4500 Series Switch Command Reference and related publications at this location:
http://www.cisco.com/en/US/products/hw/switches/ps4324/index.html
If a command is not in the Catalyst 4500 Series Switch Command Reference, you can locate it in the Cisco IOS library. See related publications at this location:
http://www.cisco.com/en/US/products/ps6350/index.html
About UDLD
UDLD is a Layer 2 protocol that initializes devices connected through fiber-optic or twisted-pair Ethernet cables. This protocol monitors a physical connection (such as wrong cabling) to detect unidirectional links to avoid spanning-tree topology loops or silent drop traffic.
All connected devices must support UDLD for the protocol to successfully identify the unidirectional links. When UDLD detects a unidirectional link, it can administratively shut down the affected port and send you a warning message.
With UDLD, the time to detect a unidirectional link can vary from a few seconds to several minutes depending on how the timers are configured. Link status messages are exchanged every couple of seconds.
Starting with Cisco IOS Release 12.2(54)SG, the enhancement Fast UDLD was added, which supports timers in the few-hundred milliseconds range, which enables subsecond unidirectional link detection. With Fast UDLD, the time to detect a unidirectional link can vary from less than one second to a few seconds (the detection time also depends on how the timers are configured). Link status messages are exchanged every couple of hundred milliseconds.
This section includes these topics:
UDLD Topology
Each switch can send packets to a neighbor switch but cannot receive packets from the switch it is sending packets to. UDLD detects and disables these one-way connections. Figure 32-1 illustrates a unidirectional link condition.
Figure 32-1 Unidirectional Link Topology
Fast UDLD Topology
Figure 32-2 illustrates a typical Fast UDLD topology. Switch A and B are connected through a 2-port EtherChannel, and Fast UDLD is enabled on the individual ports. If one of the links becomes unidirectional, Fast UDLD detects this situation faster than regular UDLD and errdisables the link. Traffic is switched over to the second link by EtherChannel. Because this occurs very quickly, traffic loss is minimized.
Figure 32-2 Fast UDLD Topology
Note For Fast UDLD, Catalyst 4900M, Catalyst 4948E, Supervisor Engine 6-E, Supervisor 6L-E, Supervisor 7-E, and Supervisor Engine 7L-E support up to 32 ports.
Operation Modes
UDLD and Fast UDLD support the following operation modes:
- Normal—A UDLD-capable port (A) periodically sends a UDLD probe to a second port (B). If B is not UDLD capable, no unidirectional link detection occurs. If both devices are UDLD capable and bidirectional connectivity exists, probe messages travel in both directions at the rate of the configured message time interval. When the UDLD protocol receives the probe, it attempts to synchronize the devices by sending echo messages to the peer port and waiting for an answer during the detection window. If unidirectional traffic is detected when the port link is still up (B longer sends traffic to A), B enters errdisable mode, and A is marked undetermined but does not enter errdisable mode. It continues to operate under its current STP status because this mode is informational only; it is potentially less disruptive although it does not prevent STP loops.
Note Bidirectional link failures cannot be detected using normal mode.
- Aggressive—If a port (A) loses its neighbor connectivity, it actively attempts to reestablish the relationship by sending a probe to a second port (B). If port B does not respond, the link is considered unidirectional and port A enters an errdisable state to avoid silent drop traffic.
Note Both unidirectional and bidirectional link failures can be detected in aggressive mode.
UDLD aggressive mode can interoperate with UDLD normal mode. When a unidirectional condition is detected, only the aggressive mode link shuts down.
Default States for UDLD
The following are the defaults for UDLD:
- UDLD is locally disabled on copper LAN ports to avoid sending unnecessary control traffic (BPDU control packets). This protocol is commonly used for access ports.
- UDLD is enabled on a fiber port if global UDLD is activated.
- Fast UDLD is disabled on all ports.
Default UDLD Configuration
Table 32-1 shows the UDLD default configuration.
Table 32-1 UDLD Default Configuration
|
|
UDLD global enable state |
Globally disabled. |
UDLD per-interface enable state for fiber-optic media |
Enabled on all Ethernet fiber-optic interfaces. |
UDLD per-interface enable state for twisted-pair (copper) media |
Disabled on all Ethernet 10/100 and 1000BASE-TX interfaces. |
Fast UDLD per-interface enable state. |
Disabled on all interfaces. |
Configuring UDLD on the Switch
The following sections describe how to configure UDLD:
Fast UDLD Guidelines and Restrictions
When using (or configuring) Fast UDLD, consider these guidelines and restrictions:
- Fast UDLD is disabled by default.
- Configure fast UDLD only on point-to-point links between network devices that support fast UDLD.
- You can configure fast UDLD in either normal or aggressive mode.
- Do not enter the link debounce command on fast UDLD ports.
- Configure fast UDLD on at least two links between each connected network device. This reduces the number of link disablements due to false positives.
- Fast UDLD does not report a unidirectional link if the same error occurs simultaneously on more than one link to the same neighbor device.
- Fast UDLD is supported on a limited number of ports.
Enabling UDLD Globally
To enable UDLD in aggressive or normal mode and to set the configurable message timer on all fiber-optic interfaces on the switch, perform this task:
|
|
|
Step 1 |
Switch# configure terminal |
Enters the global configuration mode. |
Step 2 |
Switch(config)# udld {aggressive | enable | message time message-timer-interval} | fast-hello error-reporting |
Specifies UDLD and Fast UDLD operation:
- aggressive —Enables UDLD in aggressive mode on all fiber-optic interfaces.
- enable —Enables UDLD in normal mode on all fiber-optic interfaces on the switch. UDLD is disabled by default.
An individual interface configuration overrides the setting of the udld enable global configuration command. For more information about aggressive and normal modes, see the “Operation Modes” section.
- message time —message-timer-interval— Configures the period of time between UDLD probe messages on ports that are in the advertisement phase and are determined to be bidirectional. The range is from 1 to 90 seconds.
Note Prior to Cisco IOS Release 12.2(31)SGA, the timer range is 7 to 90 seconds. With Cisco IOS Release 12.2(31)SGA, the timer range is 1 to 90 seconds.
- fast-hello error reporting—If configured, Fast UDLD does not errdisable a unidirectional link. Instead, a log message informing link failure is displayed on the console (behavior for fast UDLD only).
|
Step 3 |
Switch(config)# end |
Returns to privileged EXEC mode. |
Step 4 |
Switch# show udld |
Verifies the configuration. |
Enabling UDLD on Individual Interfaces
To enable UDLD on individual interfaces, perform this task:
|
|
|
Step 1 |
Switch(config-if)# udld port Switch(config-if)# udld port aggressive Switch(config-if)# udld fast-hello interval |
Enables UDLD in normal mode on a specific interface. On a fiber-optic interface, this command overrides the udld enable global configuration command setting. Enables UDLD in aggressive mode on a specific interface. On a fiber-optic interface, this command overrides the udld enable global configuration command setting. Enables Fast UDLD on the interface with message interval equal to the interval value in milliseconds. The interval value range is from 200 milliseconds to 1000 milliseconds. To enable Fast UDLD, UDLD must be enabled (explicitly configured or globally enabled) and operational (in bidirectional state) on the interface. Note Fast UDLD can only be enabled on individual interfaces (a global enable command does not exist). Note Fast UDLD can only be configured or enabled on a limited number of interfaces that depend on the type of supervisor installed. The number of supported interfaces for Fast UDLD can be displayed with the show udld fast-hello command. |
Step 2 |
Switch# show udld interface |
Verifies the configuration. |
Disabling UDLD on Individual Interfaces
To disable UDLD on individual interfaces, perform this task:
|
|
|
Step 1 |
Switch(config-if)# no udld port Switch(config-if)# no udld fast-hello |
Disables UDLD on an interface. The following applies:
- On fiber-optic interfaces, the no udld port command reverts the interface configuration to the setting established with the udld enable global configuration command.
- For both UDLD and Fast UDLD, if aggressive mode is configured, then aggressive mode must be explicitly disabled with the
no udld port aggressive command.
- If normal mode is configured, the no udld port command disables both UDLD and Fast UDLD.
Disables Fast UDLD on an interface. The interface reverts to the UDLD configuration that was present before you enabled Fast UDLD. |
Step 2 |
Switch# show udld interface |
Verifies the configuration. |
Disabling UDLD on a Fiber-Optic Interface
To disable UDLD on individual fiber-optic interfaces, perform this task:
|
|
|
Step 1 |
Switch(config-if)# udld port disable Switch(config-if)# no udld fast-hello |
Disables UDLD on a fiber-optic interface and removes all UDLD and Fast UDLD related configuration on the interface. Note You can enable UDLD globally for all fiber-optic interfaces. Disables Fast UDLD on an interface, which reverts to the UDLD configuration that was present before you enabled Fast UDLD. |
Step 2 |
Switch# show udld interface |
Verifies the configuration. |
Configuring a UDLD Probe Message Interval Globally
To configure the time between UDLD probe messages on ports that are in advertisement mode and are currently determined to be bidirectional, perform this task:
|
|
|
Step 1 |
Switch(config)# udld message time interval |
Configures the time between UDLD probe messages on ports that are in advertisement mode and are currently determined to be bidirectional; valid values are from 1 to 90 seconds. Note Prior to Cisco IOS Release 12.2(31)SGA, the time interval is 7 to 90 seconds. With Cisco IOS Release 12.2(31)SGA, the time interval is 1 to 90 second. The no udld message command returns the default value (15 seconds). |
Step 2 |
Switch# show udld type-slot/ interface |
Verifies the configuration. |
Enabling Fast UDLD Error Reporting
By default, fast UDLD error-disables ports with unidirectional links. You can globally enable fast UDLD to report unidirectional links with a message displayed on the console instead of error-disabling ports with unidirectional links.
Note When fast UDLD error reporting is enabled, you must manually take the action appropriate for the state of the link.
To globally enable fast UDLD error reporting, perform this task:
|
|
Switch(config)# udld fast-hello error-reporting |
Enables fast UDLD error reporting. |
Resetting Disabled LAN Interfaces
To reset all LAN ports that have been errdisabled by UDLD, use this command:
|
|
Switch(config)# udld reset |
Resets all LAN ports that have been errdisabled by UDLD and Fast UDLD. |
Displaying UDLD Link Status
To verify link status reported by UDLD, enter the following command:
Switch# show udld neighbors
Port Device Name Device ID Port ID Neighbor State
---- ----------- --------- ------- --------------
Gi1/33 FOX10430380 1 Gi1/33 Bidirectional
Gi1/34 FOX10430380 1 Gi1/34 Bidirectional
To verify status for a particular link as reported by UDLD, enter the following command:
Port enable administrative configuration setting: Enabled / in aggressive mode
Port enable operational state: Enabled / in aggressive mode
Current bidirectional state: Bidirectional
Current operational state: Advertisement - Single neighbor detected
Message interval: 15000 ms
Time out interval: 5000 ms
Port fast-hello configuration setting: Disabled
Port fast-hello interval: 0 ms
Port fast-hello operational state: Disabled
Neighbor fast-hello configuration setting: Disabled
Neighbor fast-hello interval: Unknown
Expiration time: 43300 ms
Current neighbor state: Bidirectional
Neighbor echo 1 device: FOX104303NL
Neighbor echo 1 port: Gi1/34
TLV Message interval: 15 sec
No TLV fast-hello interval
TLV CDP Device name: Switch
To verify link status reported by Fast UDLD, enter the following command:
Switch# show udld fast-hello
Total ports on which fast hello can be configured: 16
Total ports with fast hello configured: 3
Total ports with fast hello operational: 3
Total ports with fast hello non-operational: 0
Port-ID Hello Neighbor-Hello Neighbor-Device Neighbor-Port Status
------- ----- -------------- --------------- ------------- ------
Gi1/45 200 200 FOX104303NL Gi1/45 Operational
Gi1/46 200 200 FOX104303NL Gi1/46 Operational
Gi1/47 200 200 FOX104303NL Gi1/47 Operational
To verify status for a particular link as reported by Fast UDLD, enter the following command:
Switch# show udld fast-hello g1/33
Port enable administrative configuration setting: Enabled / in aggressive mode
Port enable operational state: Enabled / in aggressive mode
Current bidirectional state: Bidirectional
Current operational state: Advertisement - Single neighbor detected
Time out interval: 5000 ms
Port fast-hello configuration setting: Enabled
Port fast-hello interval: 200 ms
Port fast-hello operational state: Enabled
Neighbor fast-hello configuration setting: Enabled
Neighbor fast-hello interval: 200 ms
Current neighbor state: Bidirectional
Neighbor echo 1 device: FOX104303NL
Neighbor echo 1 port: Gi1/33
TLV fast-hello interval: 200 ms
TLV CDP Device name: Switch