
Unidirectional traffic essentially means traffic can pass in one direction, but not the other. This is usually the result of a single strand in a fibre or copper pair being damaged, or a similar cabling problem.
Consider the following Layer 2 Spanning Tree Topology:

Here you can see Switch 1 is the Root-Bridge, and Switch 2 and Switch 3 both have Root-Ports facing the Root-Bridge. The connection between Switch 2 and Switch 3 is being blocked on Switch 2. Now consider the situation below, where one of the fibres between Switch 2 and Switch 3 becomes damaged:

Here you can see that Switch 2 is no longer receiving BDPUs from Switch 3. Consequently Switch 2 believes Switch 3 must be blocking, so transisitions to a Designated Port. Now we see all ports are forwarding in an anti-clockwise direction, and consequently a loop is formed.
UDLD is a Layer2 protocol that works with the Layer1 mechanisms to determine the the physical status of a link. UDLD works by exchanging protocol packets between neighbouring devices, and must be supported and enabled on both devices. Each UDLD packet contains its own device/port ID, and the neighbours device/Port ID. A neighbour should therefore see its own device/port ID echoed back at them, if it doesn’t the link is considered unidirectional.
UDLD Operation Modes
There are two UDLD modes; normal and aggressive. In normal mode if the link is determined to be unidirectional, no action is taken, and the port behaves according to its spanning tree state. In aggressive mode, UDLD tries to re-establish the link by sending packets every second for eight seconds. If not sucessful it then puts the port into err-disable.
By default UDLD sends a packet every 15 seconds, with a deadtime interval of 45 seconds. UDLD can be activated globally, or on an interface level. When configued globally it only applies to fibre ports./