Wednesday, December 5, 2007

Cisco's UniDirectional Link Detection (UDLD) Feature

One of the most frustrating outages occurs because of a bad link with unidirectional traffic. At campus, enterprise and carrier levels these are just a nightmare.

Imagine, you have redundant paths but since the device is receiving traffic and the links still up, the fail-over never happens. Then your boss or customer come to you complaining that the redundancy does not work! Well, there is a solution which won't cost you anything (if you already have the Cisco devices).


Cisco have the UDLD or UniDirectinal Link Detection feature at the IOS to help us minimize this type of outages. When UDLD detects a unidirectional link, it disables the affected interface and send an snmp trap.

In this entry, I will cover the Layer2 UDLD for physical interfaces. There are other alternatives to use with Layer3 protocols but I won't cover them here. Now, remember, this is a Cisco proprietary feature so don't set it up against other vendors hardware.

There are two activation methods. You can activate it globally for your equipment or you can activate it on a per-interfaces basis. Once you decide which activation method you have to decide the operation mode. There two operation modes: normal and aggressive. The normal mode is the default.

The UDLD modes and their capabilities:


  • normal: can detect unidirectional link due to mis-connection. Example: one fiber strand is not connected or was broken
  • aggressive: can detect unidirectional traffic due to one-way traffic on fiber-optic, twisted-pair links and to mis-connected ports

So, how to configure UDLD i? To enable it globally configure the following:

!
udld enable ! Enable UDLD protocol on fiber ports except where locally configured
udld aggressive ! Enable UDLD protocol in aggressive mode on fiber ports except where locally configured
!

To enable/disable it on per interface basis:

!
interface GigabitEthernet0/1
...
udld port ! Enable UDLD protocol on this interface despite global UDLD setting
udld port aggressive ! Enable UDLD protocol in aggressive mode on this interface despite global UDLD setting
--- or ---
udld port disable ! Disable UDLD protocol on this interface despite global UDLD setting
...
!

Make sure to enable UDLD in both sides of the connection you want to
protect and you are done.

What about when the interface get errdisable due to udld? Well, you
can manually enable it or configure the recovery interval.

# udld reset ! reset all ports disabled by UDLD

or for a specific interface:

(config-if)# shut
(config-if)# no shut

You can always monitor the UDLD status of an interface and verify if:
The command will output the port settings, operational state and
bidirectional state.

#sh udld gigabitEthernet 0/1

So, this is one of those proprietary features that is quite useful. Hope it helps you as much as it has helped me.
For more information in this feature visit Cisco at this link.

2 comments:

  1. this is really helpful information i know most network administrators struggle with the problem of unidirectional link detection i know a couple of them who double up as http://ok-essayontime.com/ i would refer to this blog

    ReplyDelete
  2. I am very happy after visiting your website with very useful information. I am from one of the digital marketing agency... To visit my agency click on link Visitdigitalguru

    ReplyDelete