BFD Modes
BFD Modes
ms) contro i tempi espressi dal meccanismo IGP Hello detection (espressi in s).
In BFD non esiste nessuna sessione di discovery poichè la neighborship (IP address sorgente e
destinazione) viene rilevata dal protocollo IGP impiegato.
BFD modes
Asynchronous mode:
In asynchronous mode, two systems periodically send BFD control packets to each other. If
one system receives no packets consecutively, the system places the BFD session Down.
Demand mode:
In demand mode, after BFD sessions are set up, the system does not periodically send BFD
control
packets. The system detects connectivity using other mechanisms such as the Hello
mechanism of
a routing protocol and hardware detection to reduce the costs of BFD sessions.
BFD echo (where a stream of echo packets is sent and received) quando uno dei 2 peers non
supporta il BFD per ottenere pacchetti BFD dall’altro peer deve formare un loop attraverso il suo
forwarding channel. In questa modalità l’indirizzo IP di destinazione coincide con quello sorgente.
Se pacchetti Echo consecutivi non vengono ricevuti, il sistema locale considera la sessione BFD
down.
The echo function can work together with the asynchronous or demand detection mode
Cisco supports the asynchronous mode and the echo function by default.
BFD control packets are always sent as unicast packets to the BFD peer.
The encapsulation of BFD Control packets for multihop application in IPv4 and IPv6 is identical to
that above, except that the UDP destination port is 4784.
Each system reports in the BFD Control packet how rapidly it would like to transmit BFD packets,
as well as how rapidly it is prepared to receive them. This allows either system to determine the
max packet rate (minimum interval) in both directions.
BFD Configuration
BFD timers are configured under each interface with the bfd interval [send-timer] min_rx
[receive-timer] multiplier [number] command. The send-timer specifies the frequency of BFD
packets originated by the router, the receive-timer the minimum interval between packets accepted
from BFD peers. The multiplier number is the number of BFD packets that can be lost before the
BFD peer is declared down. If you want to use the BFD echo mode, you should configure bfd slow-
timers to specify the interval at which the control packets are sent and bfd echo on the interface to
enable BFD echo mode.
BFD adjacency will not form if the send-timer on one peer is lower than the receive-timer on
another peer.
Due to BFD’s low overhead it’s fairly common to use BFD timers in the milliseconds range.
Although the lowest value allowed by Cisco’s IOS is 50 milliseconds.
IGP Configuration
IOS:
After you’ve configured BFD on individual interfaces you have to tell the routing protocols to use
it. In most cases, there’s no reason the routing protocols would not want to use BFD wherever
possible; the only command you have to use in these scenarios is the bfd all-interfaces command.
If you want to be more specific, you can enable/disable BFD on a per interface basis. While the
commands may vary, with OSPF we use the ip ospf bfd [disable] interface configuration
command.
Router(config)#interface fa0/0
Router(config-if)#ip ospf bfd
Router(config-if)#bfd interval 100 min_rx 100 multiplier 3
Router(config)#interface fa0/0
Router(config-if)#isis bfd
Router(config-if)#bfd interval 100 min_rx 100 multiplier 3
BGP Configuration
As with our IGP, BGP can use BFD to detect failures of directly connected neighbors. Neighbors
must be on a directly connected subnet (multi-hop is not supported). BFD is configured per-
neighbor with the neighbor fall-over bfd command. The following configuration uses BFD to
detect failures of two BGP neighbors.
IOS-XR:
After you’ve configured BFD on individual interfaces you have to tell the routing protocols to use
it. In most cases, there’s no reason the routing protocols would not want to use BFD wherever
possible; the only command you have to use in these scenarios is the bfd all-interfaces command.
If you want to be more specific, you can enable/disable BFD on a per interface basis. While the
commands may vary, with OSPF we use the ip ospf bfd [disable] interface configuration
command.
router ospf 1
area 0
interface GigabitEthernet0/0/0
bfd fast-detect
bfd minimum-interval 250
bfd multiplier 3
I setup a quick and dirty lab to show how fast BFD can, and will failover on an Ethernet circuit. I
have 3 routers, all connected via FastEthernet running OSPF. Times are synchronized using NTP to
ensure log messages are accurate. The following output demonstrates the OSPF connections from
R1 to R2, and R3. Only the connection between R1 and R2 has BFD configured.
You may also want to check out the show bfd neighbors details command. It will show you which
protocols have registered with BFD.
R0#show clock
*19:52:11.122 UTC Fri May 21 2010
R1(config)#int fa 0/0
R1(config-if)#shut
R1(config-if)#
19:52:13.115: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively
down
R2#
19:52:42.643: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/0 from FULL to
DOWN,
Neighbor Down: Dead timer expired
With BFD in place, the situation is entirely reversed… R3 detected that R1 was gone before R1
generated the syslog message indicating that the interface had been shutdown.
R1(config)#int fa 0/1
R1(config-if)#shut
R1(config-if)#
20:04:10.204: %OSPF-5-ADJCHG: Process 1, Nbr on FastEthernet0/1 from FULL to DOWN,
Neighbor
Down: Interface down or detached
20:04:12.202: %LINK-5-CHANGED: Interface FastEthernet0/1, changed state to administratively
down
R3#
20:04:10.511: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/1 from FULL to
DOWN,
Neighbor Down: BFD node down
IOS-XR:
RP/0/RSP0/CPU0:router# show bfd session