UDLD vs BFD – Difference Between UDLD and BFD

bfdciscojuniperudld

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 ?

Best Answer

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