Configuring Bidirectional Forwarding Detection
Bidirectional Forwarding Detection (BFD) protocol is a mechanism for fast detection of failures of forwarding paths. BFD detects path failures in the order of milliseconds. BFD is used with dynamic routing protocols.
In BFD operation, routing peers exchange BFD packets at a negotiated interval. If a packet is not received from a peer within the negotiated interval plus grace interval, the peer is considered to be dead and a notification will be sent to the set of registered routing protocols. In turn, the routing protocols recalculate the best path and reprogram the routing table. BFD supports smaller time interval, when compared to the timers provided by the routing protocols, thus resulting in faster detection of failures.
The Citrix ADC appliance supports BFD for the following routing protocols: BGP (IPv4 and IPv6), OSPFv2 (IPv4), and OSPFv3 (IPv6). BFD support in the Citrix ADC appliance is compliant with RFCs 5880, 5881, and 5883.
Points to Consider for Configuring Bidirectional Forwarding Detection
Before you start configuring BFD, consider the following points:
- Make sure that you understand the different components of BFD, described in RFCs 5880, 5881, and 5883.
- BFD on a Citrix ADC appliance is supported for the following routing protocols:
- BGP (IPv4 and IPv6)
- OSPFv2 (IPv4)
- OSPFv3 (IPv6)
- BFD on a Citrix ADC appliance is not supported for the following routing protocols:
- ISIS
- RIP (IPv4)
- RIPng (IPv6)
- The following BFD features are not supported on a Citrix ADC appliance:
- BFD Echo mode
- BFD Authentication
- BFD Demand asynchronous mode
- The minimum values for BFD interval and BFD Rx timers are 100 milliseconds.
- When BFD is used in a topology with shared IP addresses (for example, Layer 2 high availability setup with SNIP addresses or a cluster setup with striped IP addresses), BFD brings down the active sessions during a failover because the BFD failure detection time (order of milliseconds) is lesser than the HA failover detection interval (3–4 seconds). Therefore, Citrix recommends usage of Graceful restart in layer-2 HA topologies as the routes are retained during the failover process.
Configuration Steps
Configuring BFD on a Citrix ADC appliance consists of the following tasks:
- Configure BFD Parameters
- Configure BFD Support for Dynamic Routing Protocols
Configure BFD Parameters
The Citrix ADC appliance provides separate BFD session parameters for single hop sessions, IPv4 multiple hop sessions, and IPv6 multiple hop sessions. If you do not configure BFD parameters for a type of session, the default values are applied for that session.
The default value of each BFD parameter is same for single hop sessions, IPv4 multiple hop sessions, and IPv6 multiple hop sessions. The following table displays the default value of each BFD parameter.
BFD Parameter Name | Default Value |
---|---|
Interval | 750 milliseconds |
Minimum Rx | 500 milliseconds |
Multiplier | 3 |
IMPORTANT:
Mellanox NICs in a Citrix appliance take around 1500 ms to initialize. You must set the BFD timers to more than 1500 ms for a Citrix ADC appliance with Mellanox NICs. Citrix recommends setting the BFD timers to 3000 ms:
- Interval Tx = 600 ms
- Minimum Rx = 600 ms
- Multipler = 5
Configuring BFD Parameters for a Single Hop Session
To configure BFD parameters for a single hop session by using the VTYSH
command line, at the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
interface vlan ID> |
Enter the interface configuration mode. |
bfd singlehop-peer interval <num> minrx <num> multiplier <num> |
Configure the BFD parameters on the specified interface. |
Sample configuration:
> vtysh
ns# configure terminal
ns(config)# interface vlan3
ns(config-if)# bfd singlehop-peer interval 200 minrx 200 multiplier 5
ns(config-if)# exit
<!--NeedCopy-->
Configuring BFD Parameters for IPv4 Multiple Hop Sessions
To configure BFD parameters for IPv4 multiple hop sessions by using the VTYSH
command line, at the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
bfd multihop-peer <ipv4addr> interval <num> minrx <num> multiplier <num> |
Configure the BFD parameters for IPv4 multiple hops sessions. |
Sample configuration:
> vtysh
ns# configure terminal
ns(config)# bfd multihop-peer 20.20.20.138 interval 300 minrx 300 multiplier 5
ns(config)# exit
<!--NeedCopy-->
Configuring BFD Parameters for IPv6 Multiple Hop Sessions
To configure BFD parameters for IPv6 multiple hop sessions by using the VTYSH
command line, at the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
bfd multihop-peer ipv6 <ipv6addr> interval <num> minrx <num> multiplier <num> |
Configure the BFD parameters for IPv6 multiple hops sessions. |
Sample configuration:
> vtysh
ns(config)# bfd multihop-peer ipv6 20fe:125::138 interval 500 minrx 500 multiplier 5
ns(config)# exit
<!--NeedCopy-->
Configure BFD Support for Dynamic Routing Protocols
You can enable BFD for a dynamic routing protocol for a type of session with a peer. For example, single hop and multiple hops. The Citrix ADC appliance applies the relevant BFD parameter settings to the session.
Configuring BFD for an IPv4 BGP Single Hop Session
To configure BFD for an IPv4 BGP single hop session by using the VTYSH
command line, at the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
router bgp <asnumber> |
BGP autonomous system. asnumber is a required parameter. |
neighbor <ipv4addr> remote-as <num> |
Update the IPv4 BGP table with the IPv4 address of the neighbor in the specified autonomous system. |
neighbor <ipv4addr> fall-over bfd |
Enable BFD for the specified neighbor. |
Sample configuration:
> vtysh
ns# configure terminal
ns(config)#router bgp 1
ns(config-router)#neighbor 20.20.20.138 remote-as 1
ns(config-router)#neighbor 20.20.20.138 fall-over bfd
ns(config-router)#redistribute kernel
ns(config-router)#exit
<!--NeedCopy-->
Configuring BFD for an IPv4 BGP Multiple Hop Session
To configure BFD for an IPv4 BGP multiple hop session by using the VTYSH
command line, at the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
router bgp <asnumber> |
BGP autonomous system. asnumber is a required parameter. |
neighbor <ipv4addr> remote-as <num> |
Update the IPv4 BGP table with the IPv4 address of the neighbor in the specified autonomous system. |
neighbor <ipv4addr> fall-over bfd multihop |
Enable BFD for the specified neighbor. |
Sample configuration:
> vtysh
ns# configure terminal
ns(config)#router bgp 1
ns(config-router)#neighbor 20.20.20.138 remote-as 1
ns(config-router)#neighbor 20.20.20.138 fall-over bfd multihop
ns(config-router)#redistribute kernel
ns(config-router)#exit
<!--NeedCopy-->
Configuring BFD for an IPv6 BGP Single Hop Session
To configure BFD for an IPv6 BGP single hop session by using the VTYSH
command line, at the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
router bgp <asnumber> |
BGP autonomous system. asnumber is a required parameter. |
neighbor <ipv6addr> remote-as <num> |
Update the IPv6 BGP table with the link local IPv6 address of the neighbor in the specified autonomous system. |
neighbor <ipv6addr> fall-over bfd |
Enable BFD for the specified neighbor. |
address-family ipv6 |
Enter address family configuration mode. |
neighbor <ipv6addr> activate |
Exchange prefixes for the IPv6 router family between the peer and the local node by using the link local address. |
Sample configuration:
> vtysh
ns# configure terminal ns(config)#router bgp 1
ns(config-router)#neighbor 30fe:123::124 remote-as 1
ns(config-router)#neighbor 30fe:123::124 fall-over bfd
ns(config-router)#address-family ipv6
ns(config-router-af)#neighbor 30fe:123::124 activate
ns(config-router-af)#redistribute kernel
ns(config-router-af)#exit
<!--NeedCopy-->
Configuring BFD for an IPv6 BGP Multiple Hop Session
To configure BFD for an IPv6 BGP multiple hop session by using the VTYSH
command line, at the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
router bgp <asnumber> |
BGP autonomous system. asnumber is a required parameter. |
neighbor <ipv6addr> remote-as <num> |
Update the IPv6 BGP table with the link local IPv6 address of the neighbor in the specified autonomous system. |
neighbor <ipv6addr> fall-over bfd multihop |
Enable BFD for the specified neighbor. |
address-family ipv6 |
Enter address family configuration mode. |
neighbor <ipv6addr> activate |
Exchange prefixes for the IPv6 router family between the peer and the local node by using the link-local address. |
Sample configuration:
> vtysh
ns# configure terminal
ns(config)# bfd multihop-peer ipv6 20fe:125::138 interval 500 minrx 500 multiplier 5
ns(config)#router bgp 1
ns(config-router)#neighbor 20fe:125::138 remote-as 1
ns(config-router)#neighbor 20fe:125::138 fall-over bfd multihop
ns(config-router)#address-family ipv6
ns(config-router-af)#neighbor 20fe:125::138 activate
ns(config-router-af)#redistribute kernel
ns(config-router-af)#end
<!--NeedCopy-->
Configuring BFD for OSPFv2 (IPv4) on Interfaces
You can enable BFD on all or on a specific interface that uses the OSPFv2 protocol.
To configure BFD for OSPFv2 on all interfaces by using the VTYSH
command line:
At the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
router ospf <process tag> |
Enter OSPFv2 configuration mode. |
bfd all-interfaces |
Enable BFD on all interfaces that use OSPFv2. |
Sample configuration:
> vtysh
ns# configure terminal
ns(config)#router ospf 1
ns(config-router)#bfd all-interfaces
ns(config-router)#redistribute kernel
ns(config-router)#exit
<!--NeedCopy-->
To configure BFD for OSPFv2 on a specific interface by using the VTYSH
command line:
At the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
interface <vlan ID> |
Enter the interface configuration mode. |
ip ospf bfd |
Enable BFD on the specified interface that uses OSPFv2. |
Sample configuration:
> vtysh
ns# configure terminal
ns(config)# interface vlan5
ns(config-if)# ip ospf bfd
ns(config-if)# exit
<!--NeedCopy-->
Configuring BFD for OSPFv3 (IPv6) on Interfaces
You can enable BFD on all or on a specific interface that uses the OSPFv3 protocol.
To configure BFD for OSPFv3 on all interfaces by using the VTYSH
command line:
At the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
router ipv6 ospf <process tag> |
Enter OSPFv3 configuration mode. |
bfd all-interfaces |
Enable BFD on all interfaces that use OSPFv3. |
Sample configuration:
> vtysh
ns# configure terminal
ns(config)#router ipv6 ospf 10
ns(config-router)#bfd all-interfaces
ns(config-router)#redistribute kernel
ns(config-router)#exit
<!--NeedCopy-->
To configure BFD for OSPFv3 on a specific interface by using the VTYSH
command line:
At the command prompt, type the following commands, in the order shown:
Command | Specifies |
---|---|
vtysh |
Display VTYSH command prompt. |
configure terminal |
Enter global configuration mode. |
interface <vlan ID> |
Enter the interface configuration mode. |
ipv6 ospf bfd |
Enable BFD on the specified interface that uses OSPFv3. |
Sample configuration:
> vtysh
ns# configure terminal
ns(config)# interface vlan15
ns(config-if)# ipv6 ospf bfd
ns(config-if)# exit
<!--NeedCopy-->