Bidirectional Forwarding Detection (BFD) is a network protocol used to detect link failure between two nodes. This is great features used for link detection as it even detect failure for you on Layer-1 where mostly detection is not possible like on VC, tunnels, MPLS-LSP, Ethernet etc.
When BFD session is establishes between two nodes, & if there are more than twlo links exists b/w that two nodes so BFD can be used to monitor the session for these two nodes. BFD does not have a discovery mechanism, sessions must be explicitly configured between endpoints. For example, on Huawei NE40E, we can do like:
bfd to-NameOfNode-001 bind peer-ip default-ip interface GigabitEthernet1/1/1
discriminator local 809
discriminator remote 908
BFD may &/or can be used on many different transport mechanisms and layers. For this it needs to be encapsulated by whatever transport it uses. For example, MPLS-LSP, OSPF, IS-IS Protocols that support some form of adjacency setup.
BFD can be used in either asynchronous mode and demand mode.
I hope this will be informative for you.