- UDLD (Unidirectional Link Detection)
- Unidirectional Link Detection (UDLD) is one of two major features (UDLD and loop guard) in Cisco Switches to prevent Layer 2 loops.
- Spanning-Tree Protocol (STP) resolves redundant physical topology into a loop-free, tree-like forwarding topology via blocking one or more ports.
However, Unidirectional Link failure can cause " traffic blackholing" and loop in the Switch topology.
- In order to detect the unidirectional links before the forwarding loop is created, UDLD works by exchanging protocol packets between the neighboring devices.
- In order for UDLD to work, both switch devices on the link must support UDLD and have it enabled on respective ports.
- Recomendation configure both side with same config
- Those frames are only understood by Cisco switches
Online Capture file: Here
! Configure UDLD Global
SW8(config)#udld ?
aggressive Enable UDLD protocol in aggressive mode on fiber ports except where locally configured
enable Enable UDLD protocol on fiber ports except where locally configured
message Set UDLD message parameters
! Configure UDLD per interface
SW8(config)#in fastEthernet 1/0/23
SW8(config-if)#udld port aggressive
! Check UDLD Status per interface
SW8#show udld fastEthernet 1/0/23
Interface Fa1/0/23
---
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: 15
Time out interval: 5
Entry 1
---
Expiration time: 40
Device ID: 1
Current neighbor state: Bidirectional
Device name: FDO1123Z5D3
Port ID: Fa0/23
Neighbor echo 1 device: CAT0815Y0VD
Neighbor echo 1 port: Fa1/0/23
Message interval: 15
Time out interval: 5
CDP Device name: SW7
SW8#show udld neighbors
Port Device Name Device ID Port ID Neighbor State
---- ----------- --------- ------- --------------
Fa1/0/23 FDO1123Z5D3 1 Fa0/23 Bidirectional
! Resets all LAN ports that have been shut down by UDLD.
SW7#udld reset
! Enables fast UDLD error reporting
R1(config)#udld fast-hello error-reporting
! Configure UDLD Recovery
SW8(config)#errdisable recovery cause udld
Cisco Site
#UDLD (Unidirectional Link Detection)
UDLD has two modes of operation
* Normal Mode - When a undirectional link condition is detected, the port is allowed to continue its operation.
UDLD merely marks the port as having an undetermined state and generates a syslog message.
* Aggressive Mode - When a undirectional link condition is detected, the switch takes action to reestablish the link.
UDLD messages are sent out onec a second for 8 seconds. If none of those messages is echoed back, the port is placed
in the errdisable state so that it cannot be used.
#To Enable UDLD Globally Use The Following Command
S3(config)#udld [ enable | aggressive | message time SECONDS ] !(Ranging from 7 to 90 sec)
#To Enable UDLD on Specific Switch Port Use The Following Command
S3(config-if)#udld [ enable | aggressive | disable ]
#Reenable ports that UDLD aggressive mode has errdisabled
S3#udld reset