0% found this document useful (0 votes)
96 views5 pages

BFD Modes

BFD is a protocol that can rapidly detect faults on a link within milliseconds, much faster than IGP mechanisms that detect faults within seconds. BFD establishes sessions between peers without a discovery process, using the IGP for neighborship information. It can operate in asynchronous or demand modes, periodically sending packets in asynchronous mode and using other mechanisms like IGP hellos to detect connectivity in demand mode. BFD notifications cause routing protocols to quickly remove neighboring routers, minimizing reconvergence times.

Uploaded by

Domenico
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views5 pages

BFD Modes

BFD is a protocol that can rapidly detect faults on a link within milliseconds, much faster than IGP mechanisms that detect faults within seconds. BFD establishes sessions between peers without a discovery process, using the IGP for neighborship information. It can operate in asynchronous or demand modes, periodically sending packets in asynchronous mode and using other mechanisms like IGP hellos to detect connectivity in demand mode. BFD notifications cause routing protocols to quickly remove neighboring routers, minimizing reconvergence times.

Uploaded by

Domenico
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Il BFD è il protocollo che permette di rilevare il fault di un link in tempi brevissimi (espressi nell’ordine dei

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 detecting link faults:

The detected link is faulty.


 BFD rapidly detects the link fault and the BFD session becomes Down.
 BFD notifies the local OSPF process that the neighbor is unreachable.
 The local OSPF process ends the OSPF neighbor relationship.

Dopo che la sessione è up, il BFD può lavorare in due modalità:

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.

I pacchetti BFD di controllo sono incapsulati in pacchetti UDP

 destination port 3784


 source port 49152

Echo packets are also encapsulated in UDP packets

 destination port 3785


 source port 3785

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.

Router(config)#bfd slow-timers 3000


Router(config)#interface fa0/0
Router(config-if)#bfd interval 100 min_rx 100 multiplier 3
Router(config-if)#bfd echo

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.

Router(config)#router eigrp 65501


Router(config-router)#bfd all-interfaces

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.

Router(config)#router bgp 65001


Router(config-router)#neighbor 198.19.8.1 remote-as 65022
Router(config-router)#neighbor 198.19.8.1 fall-over bfd
Router(config-router)#neighbor 172.16.0.12 remote-as 65001
Router(config-router)#neighbor 172.16.0.12 update-source Loopback0
Router(config-router)#neighbor 172.16.0.12 fall-over bfd

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.

Router(config)#router eigrp 65501


Router(config-router)#bfd all-interfaces

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

router isis 65444


is-type level-2-only
net 49.0001.0840.3803.4088.00
interface gigabitEthernet 0/3/0/1
bfd fast-detect ipv4
bfd minimum-interval 250
bfd multiplier 3
address-family ipv4 unicast
BGP Configuration

router bgp 100


neighbor 2.2.2.2
remote-as 200
bfd fast-detect
bfd minimum-interval 250
bfd multiplier 3

Testing BFD Failures

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.

R1#show ip ospf neighbor


Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 1 FULL/DR 00:00:37 10.1.2.2 FastEthernet0/0
3.3.3.3 1 FULL/BDR 00:00:37 10.1.3.3 FastEthernet0/1
R1#show bfd neighbor
OurAddr NeighAddr LD/RD RH/RS Holddown(mult) State Int
10.1.3.1 10.1.3.3 1/2 Up 0 (3 ) Up Fa0/1

You may also want to check out the show bfd neighbors details command. It will show you which
protocols have registered with BFD.

Obviously in my example, without BFD configured on fa0/0, failure-detection relies exclusively on


OSPF hello timers. Hence it took R0 almost 30 seconds I shut down the interface to realize R2 was
gone.

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

Interface Dest Addr Local det time(int*mult) State Echo


Async H/W NPU
------------------- --------------- ---------------- ---------- ------ ------
------ ---- ---
BE2.1 10.158.1.2 0s(0s*0) 900ms(300ms*3) UP Yes
0/6/CPU0
BE2.2 10.158.2.2 0s(0s*0) 900ms(300ms*3) UP Yes
0/6/CPU0

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy