Understand and Configure the UDLD Protocol
Switches are used to connect hosts on networks. Switch forwards data packets between devices using packet switching technique. Any mis-wiring or hardware faults could lead to disruption in network communication path and create serious network issues such as spanning tree loop or other protocol malfunctions. UDLD protocol developed by Cisco is meant to detect bidirectional link failures and disable one-way unidirectional links to avoid network breakdown.
In today’s lesson we will cover in detail about Cisco proprietary protocol unidirectional link detection (UDLD), how it works and how to configure UDLD.
UDLD Protocol
UDLD is a Cisco proprietary protocol which enables switches to auto detect when a bi-directional link fails due to improper port connection, hardware failure and becomes unidirectional. Usually switches forward and receive data packets between source and destination , links required to be bi-direction to send / receive both. This ensures dual communication. Usually, fiber optics connections are prone to have undetected unidirectional link failures because they do not depend on loop paths to transmit data unlike Ethernet etc.
In electrical medium like twisted pair cables unidirectional link failures can occur and go unnoticed in endpoints. The presence of unidirectional links lead to magnitudes of problems which include forwarding and spanning tree loops that could lead to network outage / breakdown. Cisco UDLD needs to be configured on all switches and interfaces. A UDLD configured switch will send advertisements and expects to receive ‘hello’ response from its neighbours in designated hold time (by default it is 15 minutes), if no response is received in stipulated time, then unresponsive interface is disabled by UDLD.
Configure UDLD Protocol
Switches by default do not come enabled with UDLD so we have to configure them manually. The very first step is to set up the network.
We assume switch A has two interfaces – GigabitEthernet0/0/0 and GigabitEthernet0/0/1
Connect GigabitEthernet0/0/1 to GigabitEthernet0/0/0 switch B
Connect GigabitEthernet0/0/2 to GigabitEthernet0/0/0 switch C
Turn on UDLD in normal mode – udld port
Turn on UDLD in aggressive mode – udld aggressive
Switch A
SwitchA> enable
SwitchA# configure terminal
In global configuration mode
SwitchA(config)# interface gigabitethernet0/0/1
SwitchA(config-if)# udld port
SwitchA(config-if)# end
Now repeat same steps for interface gigabitethernet0/0/2
SwitchA(config)# interface gigabitethernet0/0/2
SwitchA(config-if)# udld port
SwitchA(config-if)# end
UDLD is now set for SwitchA
Switch B
SwitchB> enable
SwitchB# configure terminal
In global configuration mode
SwitchB(config)# interface gigabitethernet0/0/0
SwitchB(config-if)# udld port
SwitchB(config-if)# end
Switch C
SwitchC> enable
SwitchC# configure terminal
In global configuration mode
SwitchC(config)# interface gigabitethernet0/0/0
SwitchC(config-if)# udld port
SwitchC(config-if)# end
To verify configuration state type below command
SwitchA# show udld gigabitethernet0/0/1
…
Port enable administrative configuration setting: Enabled
Port enable operational state: Enabled
Current bidirectional state: Bidirectional
Current operational state: Advertisement – Single neighbor detected
Message interval: 15
Time out interval: 5
This indicates UDLD protocol is enabled on switch interface but in normal mode it will mark it only as ‘undetermined’ with a notification and other network layers can still try to interface with it so solution to this problem is using aggressive mode. Let us see how to setup switch interface in aggressive mode.
For SwitchA GigabitEthernet1/0/1 interface enter below command
SwitchA> enable
SwitchA# configure terminal
SwitchA(config)# interface gigabitethernet0/0/1
SwitchA(config-if)# udld port aggressive
SwitchA(config-if)# end
Now UDLD is set up in aggressive mode so when a unidirectional link is encountered the protocol will mark it as ‘error disabled’ instead of ‘undetermined’ and that will stop all traffic to it.
Continue Reading:
What is VLAN Trunking Protocol (VTP)?
What is HSRP (Hot Standby Router Protocol) ?
Tag:Protocols