2

I understand is UDLD is almost BFD for layer2. Meaning in a control plane and forwarding plane separated router architecture BFD if running on the control plane can detect control plane failures but UDLD cannot be used for that purpose. Now when we use BFD in distributed mode, where forwarding plane takes care of bfd packets, would it be in different from UDLD ? Won't having UDLD and BFD configured together be redundant ?

3

There's actually quite a significant difference between UDLD and BFD.

UDLD was mainly designed to prevent layer 2 bridging loops between directly connected devices, where a switch would put a port into the forwarding state, in the case of STP for example, when it stops receiving BPDUs due to a uni-directional link. To that end, it sends echo PDUs out the port and listens for replies. There may however be other cases where having UDLD is also beneficial.

BFD is to detect a loss of bidirectional communications between routers that are not necessarily directly connected, to facilitate a quicker route reconvergence in case of neighbor failure by triggering a reconvergence regardless of EGP timers. BFD is session based and can for example be used on physical interfaces, tunnels, AToM xconnects and the like.

UDLD will place the interface into err-disabled shutdown where BFD won't. Therefore BFD will not stop STP loops from forming and not replace UDLD as such.

For more information about UDLD: http://www.cisco.com/c/en/us/support/docs/lan-switching/spanning-tree-protocol/10591-77.html

For more information about BFD: http://www.cisco.com/c/en/us/td/docs/ios/12_0s/feature/guide/fs_bfd.html

  • 3
    I have to disagree with the opening of your second paragraph. UDLD was mainly designed to detect problems with fiber connections that use two strands of fiber (one transmit and one receive). Unlike copper, it is impossible for a transmitting device to determine if the remote device is receiving the signal; it can only tell it is receiving a signal. L2 loops is only one possible problem when a single fiber in a pair fails, and UDLD can protect from them all, even if there is no STP on the link (i.e. L3 links, fabricpath, etc). – YLearn Mar 11 '16 at 0:43
  • While I agree that any case of a uniderectional link is a problem there wouldn't be any benefit of UDLD in many cases, since UDLD doesn't actually fix the problem. The only instances I can think of where UDLD would be beneficial would be to prevent bridging loops and possibly where you have multiple L3 links to the same destination but are using static routes, either floating or for load-balancing, instead of a routing protocol. I have edited the answer to reflect the importance of UDLD where a bridging loop is possible from a unidirectional link. – S. Helgason Mar 14 '16 at 17:38
  • 1
    UDLD isn't meant to fix the problem. It is meant to detect the problem and shut down the interface in order to prevent the other resulting problems from such a situation. Just because you only see one benefit to UDLD doesn't mean there aren't more. – YLearn Mar 14 '16 at 18:26
  • I completely agree. I just wanted to highlight the fact that there are specific types of problems that are directly mitigated by having the interface being shutdown while there are other's where it makes no difference at all. My comment was by no means meant to be an exhaustive list of issues. I've edited the answer to reflect other possibilities, trying not to be too vague. – S. Helgason Mar 14 '16 at 18:53
  • I've also added a link to further information about UDLD on cisco.com where, among other things, it's stated that: In order to detect the unidirectional links before the forwarding loop is created, Cisco designed and implemented the UDLD protocol. – S. Helgason Mar 14 '16 at 18:56
1

What is the difference between UDLD and BFD?

While both UDLD and BFD are designed to detect issues between devices, UDLD is a L2 mechanism and BFD is a L3 mechanism.

UDLD is designed to detect failure on a single L2 link.

BFD is designed to detect failures in between two L3 peers. This can span more than a single L2 link.

This leads us to your next question.

Won't having UDLD and BFD configured together be redundant ?

In some cases yes, but in others no. You would have to evaluate your situation to determine this, keeping in mind that one is attempting to detect L2 failures, while the other is trying to detect L3 failures.

Let's look at a concrete example. Consider two routers (R1 & R2) on the same network connected by fiber to a switch utilizing link aggregation on two ports each (R1/P1, etc).

One day a single strand (R1/P1's transmit strand) has failed. R1/P1 is still able to receive from the switch so could believe the link to be up. Because R1 can believe R1/P1 to be up, it will send traffic to the switch on that port, which will be lost as the switch believes it to be down.

If the BFD session traffic is being carried on R1/P2, BFD may not detect the problem while UDLD would detect the L2 failure.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.