gunnar
1 post

Hi I have been working in the IT networking business for over 10 years in all areas and dealt with everything from global networks to mike's repair shop LAN. However I feel there is a wide misunderstanding on why, how and when Unidirectional Link Detection (UDLD) is good to use. I didn't know but I noticed it when cisco announced a level-1 bug for the SXI2a release a few months ago and people were scared of implementing the workaround which was to disable UDLD.

First of all let's make it clear that UDLD is Cisco proprietary but many vendors has it's own implementation of the feature. UDLD was first developed to help devices determine if a fibre link was unidirectional only sending light in one direction and not receiving. It was also a great help speeding up and helping the Spanning-Tree Protocol (STP) mainly in CST but has once again showed that it can be useful when interconnecting MST. Another use of the feature is to prevent traffic blackholing. In most cases today I have only found UDLD good to use to detect far end problems like when interconnecting 2 switches with fibre converters or connecting layer 2 circuits from third party providers.

Anyway, I see there are three major issues that people tend to have regarding UDLD. I will try to explain and break it down for you.

  1. Lack of understanding how it works.
  2. Difference between normal UDLD and aggressive UDLD.
  3. It works on both copper and fibre.

UDLD is a Data-link layer protocol that works with layer 1 to get the status of a physical link and take appropriate actions. It works by sending UDLD packets (with a special multicast mac-address as destination with it’s own device and port ID encapsulated in SNAP). If it's doesn't get an echo (Not ACK) of it's packet the link is considered unidirectional. If UDLD sees the port as unidirectional it puts the port in disable state until it is manually cleared or the errdisable timeout expires (needs to be configured). So the question allot of people ask them self is what if I have UDLD enabled on one side only, regardless of aggressive or normal mode? Nothing will happen and UDLD will not have any affect other the stealing CPU resources etc. from your device.

A very basic explanation on normal mode would be that it acts as STP tells it to, follows its port states and uses the underlying features that layer 1 gives e.g. loss of light etc. The important stuff begins when you run aggressive mode because here Cisco has added a few features. Plain and simple, if you have two switches with ports running in aggressive mode and they have seen each other they will bring down the link if one of them losses it’s neighbour. However loosing it’s neighbour is not the same as disabling UDLD on one side because UDLD has a message for protocol disable, so nothing happens. There is however one thing that people can run into and that is that UDLD works in shared network topologies. Meaning that if you have two Cisco switches running UDLD aggressive and connect them to a third-party switch on the same layer 2 vlan they will see each other. Pulling the cable on one of the switches will trigger UDLD on the one that is still active and it will disable the port. It will however not disable the port if you have more then two switches. This protocol is ment for point-2-point links.

Last, UDLD will work on both copper and fibre but you have to explicitly enable UDLD on copper ports with the command “udld port”-normal mode and “udld port aggressive”-aggressive mode even if you have enabled it globally.

I really hope people stop being afraid of this feature and starts using it. Please feel free to add or change this if you feel that I’m wrong or not clear in any way.

Where can I read more of this?

http://tools.ietf.org/html/rfc5171

http://www.cisco.com/en/US/tech/tk389/tk621/technologies_tech_note09186a008009477b.shtml

ciscocrank
28 posts

some time when too device are connected using fiber optic and their is a problem with one direction , the LED in port still GREEN in one way connection , can I say udld is disable and how can I enable it ?

joshlowe
94 posts

UDLD is disabled by default on most (all?) Cisco switches. Enable it globally (for fiber interfaces only) from global config using:

Router(config)# udld enable

Use the same command in interface configuration mode to configure it on a per-port basis (including non-fiber ports).

You can also use:

Router(config)# udld aggressive

UDLD in normal mode (using the udld enable command) only detects broken fiber links or other layer 1 connectivity problems. Agressive mode will detect any issues that cause a unidirectional link.

Viewing 1 - 3 of 3

  • 1