Introduction to Uni-Directional Link Detection (UDLD) Protocol

Today I am going to talk about another protocol named as UDLD Uni-Directional Link Detection protocol in details with the different modes used in UDLD.

Before I will start with the UDLD protocol, I would like to tell you guys that we have our own youtube channel for various network videos that can further help you guys to study further. I will going to add many more videos soon on the channel, Please subscribe to the channel for the study network related videos.

Subscribe us on Youtube: 
Follow us on Twitter:

Thanks for your huge support to our Youtube Channel and the Twitter account. Now let's talk about the UDLD protocol in details now.

Fig 1.1- UDLD Protocol Tx and Rx
What is the UDLD protocol and where we are using this protocol ?
UDLD is a Layer 2 protocol that works with the Layer 1 protocols to determine the physical status of a link. In Layer 1, auto negotiation takes care of physical signalling and fault detection. UDLD performs tasks that auto negotiation cannot perform, such as detecting the identities of neighbors and shutting down misconnected LAN ports. 

Fig 1.2- UDLD Protocol

When you enable both auto negotiation and UDLD, the Layer 1 and Layer 2 detections work together to prevent physical and logical unidirectional connections and the malfunctioning of other protocols. 

A unidirectional link occurs whenever the traffic transmitted by a local device over a link is received by a neighbor, but traffic transmitted from the neighbor is not received by the local device. If one of the fiber strands in a pair is disconnected, the link does not stay up as long as the auto negotiation is active. In such a scenario, the logical link is undetermined, and the UDLD does not take any action. 

If both the fibers are working normally in Layer 1, the UDLD in Layer 2 determines whether those fibers are connected correctly and whether the traffic is flowing bidirectionally between the correct neighbors. This check cannot be performed by auto negotiation because auto negotiation operates in Layer 1

What are the different modes in UDLD ?
UDLD have two different modes. These modes are as below. We will discuss both these modes one by one in details.
  1. UDLD normal Mode
  2. UDLD Aggressive mode
What is the Normal mode in the UDLD ?
In normal mode, UDLD detects the unidirectional link when fiber strands in a fiber-optic interface are misconnected and the Layer 1 mechanisms do not detect this misconnection. If the interfaces are connected correctly, but the traffic is one way, UDLD does not detect the unidirectional link because the Layer 1 mechanism, which is supposed to detect this condition, does not do so. 

In case, the logical link is considered undetermined, and UDLD does not disable the interface. If one of the fiber strands in a pair is disconnected and autonegotiation is active, the link does not stay up because the Layer 1 mechanisms did not detect a physical problem with the link. In this case, UDLD does not take any action, and the logical link is considered undetermined. 

What is the aggressive mode in the UDLD ?
The UDLD aggressive mode is configured only on the point-to-point link between the network devices that support the UDLD aggressive mode. With UDLD aggressive mode enabled, a port on a bidirectional link that has a UDLD neighbor relationship established stops receiving the UDLD packets. The UDLD tries to re-establish the connection with the neighbor; the port is disabled after eight failed retries. 

Enabling UDLD on router

ttlbits_router> enable 
ttlbits_router# configure terminal 
ttlbits_router(config)# udld enable
ttlbits_router# end 

Configuring UDLD Aggressive 

ttlbits_router> enable 
ttlbits_router# configure terminal 
ttlbits_router(config)# interface gigabitethernet0/0/1 
ttlbits_router(config)# udld port aggressive 
ttlbits_router# end