Chapter 2 Advanced Routing for FortiOS 5.0 : Border Gateway Protocol (BGP) : Troubleshooting BGP : Route flap : Bi-directional forwarding detection (BFD)
  
Bi-directional forwarding detection (BFD)
Bi-directional Forwarding Detection (BFD) is a protocol used to quickly locate hardware failures in the network. Routers running BFD communicate with each other, and if a timer runs out on a connection then that router is declared down. BFD then communicates this information to the routing protocol and the routing information is updated.
While BGP can detect route failures, BFD can be configured to detect these failures more quickly allowing faster responses and improved convergence. This can be balanced with the bandwidth BFD uses in its frequent route checking.
Configurable granularity
BFD can run on the entire FortiGate unit, selected interfaces, or on BGP for all configured interfaces. The hierarchy allows each lower level to override the upper level’s BFD setting. For example, if BFD was enabled for the FortiGate unit, it could be disabled only for a single interface or for BGP. For information about FortiGate-wide BFD options, see config system settings in the FortiGate CLI Reference.
BFD can only be configured through the CLI.
The BGP commands related to BFD are:
config system {setting | interface}
set bfd {enable | disable | global}
set bfd-desired-mix-tx <milliseconds>
set bfd-detect-mult <multiplier>
set bfd-required-mix-rx <milliseconds>
set bfd-dont-enforce-src-port {enable | disable}
 
config router bgp
config neighbor
edit <neighbor_address_ipv4>
set bfd {enable | disable}
end
end
 
get router info bfd neighbor
execute router clear bfd session <src_ipv4> <dst_ipv4> <interface>
 
The config system commands allow you to configure whether BFD is enabled in a particular unit/vdom or individual interface, and how often the interface requires sending and receiving of BFD information.
The config router bgp commands allow you to set the addresses of the neighbor units that are also running BFD. Both units must be configured with BFD in order to make use of it.