Preventing Forwarding Loops
How to prevent STP failures due to unidirectional links

The functions of UDLD and loop guard partially overlap in that both protect against STP failures caused by unidirectional links. These two features are different in their approach to the problem and also in how they function. The figure identifies key differences as well as how to implement both features.

Depending on various design considerations, you can choose either UDLD or loop guard. UDLD provides no protection against STP failures that are caused by software that result in the designated switch not sending BPDUs. This type of failure, however, is less common than those caused by hardware failure.

On an EtherChannel bundle, UDLD will disable individual failed links. The channel itself remains functional if there are other links available. Loop guard will put the entire channel in loop-inconsistent state if any physical link in the bundle fails.

Loop guard does not work on shared links or if the link has been unidirectional since its initial setup. Enabling both UDLD and loop guard provides the highest level of protection.