Base BFD Configuration
This chapter provides the steps for configuring the base Bidirectional Forwarding Detection (BFD) setup.
Overview
This section provides an overview of Bidirectional Forwarding Detection (BFD). BFD is a detection protocol designed to provide fast forwarding path failure detection times for all media types, encapsulations, topologies, and routing protocols like BGP, EIGRP, IS-IS, and OSPF. In addition to fast forwarding path failure detection, BFD provides a consistent failure detection method for network administrators.The configuration and command reference for BFD is given in the following chapters in this section.
Note: It is mandatory to enable the bfd-group filter for bfd session used in Trident-III devices. This filter is applicable only for Trident-III devices. Refer to
hardware-profile filter (XGS) section for more information.
Topology
Basic Topology of Three Routers
BFD Echo Function
R1
R1#configure terminal | Enter the Configure mode. |
R1(config)#interface eth1 | Enter interface Mode. |
R1(config-if)#ip address 10.1.1.1/24 | Assign IP address for interface |
R1(config-if)#bfd session 10.1.1.1 10.1.1.2 | Configure BFD session on interface. |
R1(config-if)#exit | Exit from interface mode. |
R1(config)#bfd echo | Enable BFD echo mode. |
R1(config)#commit | Commit the candidate configuration to the running configuration. |
R1(config)#exit | Exit from interface mode. |
R2
R2#configure terminal | Enter the Configure mode. |
R2(config)#interface eth1 | Enter interface Mode. |
R2(config-if)#ip address 10.1.1.2/24 | Assign IP address for interface |
R2(config-if)#bfd session 10.1.1.2 10.1.1.1 | Configure BFD session on interface. |
R2(config-if)#exit | Exit from interface mode. |
R2(config)#bfd echo | Enable BFD echo mode. |
R2(config)#commit | Commit the candidate configuration to the running configuration. |
R2(config)#exit | Exit from interface mode. |
Validation
R1
#sh bfd session detail
Session Interface Index : 3 Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Down
Local Discriminator : 1 Local Address : 10.1.1.1/32
Remote Discriminator : 1 Remote Address : 10.1.1.2/32
Local Port : 49152 Remote Port : 3784
Local Echo Port : 49153
Options :
Echo Enabled
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 2000 Neg Rx: 2000 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 1000
Storage type : 2
Sess down time : 00:00:01
Sess discontinue time : 00:00:00
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 000000000000010a Pkt Out : 00000000000001f7
Echo Out : 00000000000000ab IPv6 Echo Out : 0000000000000000
IPv6 Pkt In : 0000000000000000 IPv6 Pkt Out : 0000000000000000
UP Count : 57 UPTIME : 00:00:00
Protocol Client Info:
BFD-> Client ID: 28 Flags: 4
----------------------------------------------------------
Number of Sessions: 1
R2
#sh bfd session detail
Session Interface Index : 3 Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 1 Local Address : 10.1.1.2/32
Remote Discriminator : 1 Remote Address : 10.1.1.1/32
Local Port : 49152 Remote Port : 3784
Local Echo Port : 49153
Options :
Echo Enabled
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 2000 Neg Rx: 2000 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 1000
Storage type : 2
Sess down time : 00:00:00
Sess discontinue time : 00:00:00
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000ad Pkt Out : 0000000000000105
Echo Out : 0000000000000063 IPv6 Echo Out : 0000000000000000
IPv6 Pkt In : 0000000000000000 IPv6 Pkt Out : 0000000000000000
UP Count : 33 UPTIME : 00:00:03
Protocol Client Info:
BFD-> Client ID: 28 Flags: 4
----------------------------------------------------------
Number of Sessions: 1
BFD Slow Timer
R1
R1#configure terminal | Enter the Configure mode. |
R1(config)#interface eth1 | Enter interface Mode. |
R1(config-if)#ip address 10.1.1.1/24 | Assign IP address for interface |
R1(config-if)#bfd session 10.1.1.1 10.1.1.2 | Configure BFD session on interface. |
R1(config-if)#exit | Exit from interface mode. |
R1(config)#bfd slow-timer 1000 | Configure BFD slow-timer in milliseconds. |
R2(config)#commit | Commit the candidate configuration to the running configuration. |
R2(config)#exit | Exit from interface mode. |
R2
R2#configure terminal | Enter the Configure mode. |
R2(config)#interface eth1 | Enter interface Mode. |
R2(config-if)#ip address 10.1.1.2/24 | Assign IP address for interface |
R2(config-if)#bfd session 10.1.1.2 10.1.1.1 | Configure BFD session on interface. |
R2(config-if)#exit | Exit from interface mode. |
R2(config)#bfd slow-timer 1000 | Configure BFD slow-timer in milliseconds. |
BFD Multihop Peer Timer
R1
R1#configure terminal | Enter the Configure mode. |
R1(config)#interface eth1 | Enter interface Mode. |
R1(config-if)#ip address 10.1.1.1/24 | Assign IP address for interface |
R1(config-if)#exit | Exit from interface mode. |
R1(config)#router ospf 1 | Enter router OSPF mode |
R1(config-router)#network 10.1.1.0/24 area 0 | Advertise the network to area 0 |
R1(config-router)#redistribute connected | |
R1(config-router)#exit | Exit router OSPF mode |
R1(config)#bfd multihop-peer 20.1.1.3 interval 100 minrx 100 multiplier 3 | Configure BFD multihop-peer timer and reception intervals in milliseconds and the Hello multiplier. |
R1(config)#commit | Commit the candidate configuration to the running configuration. |
R1(config)#exit | Exit router OSPF mode |
R2
R2#configure terminal | Enter the Configure mode. |
R2(config)#interface eth1 | Enter interface Mode. |
R2(config-if)#ip address 10.1.1.2/24 | Assign IP address for interface |
R2(config-if)#exit | Exit from interface mode. |
R2(config)#interface eth2 | Enter interface Mode. |
R2(config-if)#ip address 20.1.1.2/24 | Assign IP address for interface |
R2(config-if)#exit | Exit from interface mode. |
R2(config)#router ospf 1 | Enter router OSPF mode |
R2(config-router)#network 10.1.1.0/24 area 0 | Advertise the network to area 0 |
R2(config-router)#network 20.1.1.0/24 area 0 | Advertise the network to area 0 |
R2(config-router)#redistribute connected | |
R2(config-router)#commit | Commit the candidate configuration to the running configuration. |
R2(config-router)#exit | Exit router OSPF mode |
R3
R1#configure terminal | Enter the Configure mode. |
R1(config)#interface eth2 | Enter interface Mode. |
R1(config-if)#ip address 20.1.1.3/24 | Assign IP address for interface |
R1(config-if)#exit | Exit from interface mode. |
R1(config)#router ospf 1 | Enter router OSPF mode |
R1(config-router)#network 20.1.1.0/24 area 0 | Advertise the network to area 0 |
R1(config-router)#redistribute connected | |
R1(config-router)#exit | Exit router OSPF mode |
R1(config)#bfd multihop-peer 10.1.1.1 interval 100 minrx 100 multiplier 3 | Configure BFD multihop-peer timer and reception intervals in milliseconds and the Hello multiplier.v |
R1(config)#commit | Commit the candidate configuration to the running configuration. |
R1(config)#exit | Exit router OSPF mode |
Validation:
R1
#sh bfd session detail
Session Interface Index : 0 Session Index : 2
Lower Layer : IPv4 Version : 1
Session Type : Multihop Arbit Path Session State : Up
Local Discriminator : 2 Local Address : 10.1.1.1/32
Remote Discriminator : 0 Remote Address : 20.1.1.3/32
Local Port : 49153 Remote Port : 4784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 100 Min Rx: 100 Multiplier: 3
Neg Tx: 0 Neg Rx: 0 Neg detect mult: 0
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess discontinue time : 00:00:00
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 0000000000000000 Pkt Out : 0000000000000097
Echo Out : 0000000000000000 IPv6 Echo Out : 0000000000000000
IPv6 Pkt In : 0000000000000000 IPv6 Pkt Out : 0000000000000000
UP Count : 0 UPTIME : 00:00:00
Protocol Client Info:
BFD-> Client ID: 28 Flags: 4
----------------------------------------------------------
Number of Sessions: 1
R3
#sh bfd session detail
Session Interface Index : 0 Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Multihop Arbit Path Session State : Up
Local Discriminator : 1 Local Address : 20.1.1.3/32
Remote Discriminator : 1 Remote Address : 10.1.1.1/32
Local Port : 49152 Remote Port : 4784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 100 Min Rx: 100 Multiplier: 3
Neg Tx: 100 Neg Rx: 100 Neg detect mult: 3
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess discontinue time : 00:00:00
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000001df Pkt Out : 00000000000001e0
Echo Out : 0000000000000000 IPv6 Echo Out : 0000000000000000
IPv6 Pkt In : 0000000000000000 IPv6 Pkt Out : 0000000000000000
UP Count : 1 UPTIME : 00:01:26
Protocol Client Info:
BFD-> Client ID: 28 Flags: 4
----------------------------------------------------------
Number of Sessions: 1
BFD Single-hop Session Timer
R1
R1#configure terminal | Enter the Configure mode. |
R1(config)#interface eth1 | Enter interface Mode. |
R1(config-if)#ip address 10.1.1.1/24 | Assign IP address for interface |
R1(config-if)#bfd session 10.1.1.1 10.1.1.2 | Configure BFD session on interface. |
R1(config-if)#bfd interval 100 minrx 100 multiplier 4 | Configure BFD single-hop sessions timer and reception interval in millisecond and the Hello multiplier. |
R1(config-if)#commit | Commit the candidate configuration to the running configuration. |
R1(config-if)#exit | Exit from interface mode. |
R2
R2#configure terminal | Enter the Configure mode. |
R2(config)#interface eth1 | Enter interface Mode. |
R2(config-if)#ip address 10.1.1.2/24 | Assign IP address for interface |
R2(config-if)#bfd session 10.1.1.2 10.1.1.1 | Configure BFD session on interface. |
R2(config-if)#bfd interval 100 minrx 100 multiplier 4 | Configure BFD single-hop sessions timer and reception interval in millisecond and the Hello multiplier. |
R2(config-if)#commit | Commit the candidate configuration to the running configuration. |
R2(config-if)#exit | Exit from interface mode. |
Validation:
R1
#sh bfd session detail
Session Interface Index : 3 Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 1 Local Address : 10.1.1.1/32
Remote Discriminator : 1 Remote Address : 10.1.1.2/32
Local Port : 49152 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 100 Min Rx: 100 Multiplier: 4
Neg Tx: 100 Neg Rx: 100 Neg detect mult: 4
Min echo Tx: 100 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess discontinue time : 00:00:00
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 000000000000156e Pkt Out : 0000000000001748
Echo Out : 000000000000019b IPv6 Echo Out : 0000000000000000
IPv6 Pkt In : 0000000000000000 IPv6 Pkt Out : 0000000000000000
UP Count : 139 UPTIME : 00:14:23
Protocol Client Info:
BFD-> Client ID: 28 Flags: 4
----------------------------------------------------------
Number of Sessions: 1
R2
#sh bfd session detail
Session Interface Index : 3 Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 1 Local Address : 10.1.1.2/32
Remote Discriminator : 1 Remote Address : 10.1.1.1/32
Local Port : 49152 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 100 Min Rx: 100 Multiplier: 4
Neg Tx: 100 Neg Rx: 100 Neg detect mult: 4
Min echo Tx: 100 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess discontinue time : 00:00:00
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 000000000000181d Pkt Out : 00000000000019ab
Echo Out : 00000000000001b5 IPv6 Echo Out : 0000000000000000
IPv6 Pkt In : 0000000000000000 IPv6 Pkt Out : 0000000000000000
UP Count : 145 UPTIME : 00:15:19
Protocol Client Info:
BFD-> Client ID: 28 Flags: 4
----------------------------------------------------------
Number of Sessions: 1
BFD Echo Interval
R1
R1#configure terminal | Enter the Configure mode. |
R1(config)#interface eth1 | Enter interface Mode. |
R1(config-if)#ip address 10.1.1.1/24 | Assign IP address for interface |
R1(config-if)#bfd session 10.1.1.1 10.1.1.2 | Configure BFD session on interface. |
R1(config-if)#bfd echo interval 100 | |
R1(config-if)#exit | Exit from interface mode. |
R1(config)#bfd echo | Enable BFD echo mode. |
R1(config)#commit | Commit the candidate configuration to the running configuration. |
R1(config)#exit | Exit from interface mode. |
R2
R2#configure terminal | Enter the Configure mode. |
R2(config)#interface eth1 | Enter interface Mode. |
R2(config-if)#ip address 10.1.1.2/24 | Assign IP address for interface |
R2(config-if)#bfd session 10.1.1.2 10.1.1.1 | Configure BFD session on interface. |
R1(config-if)#bfd echo interval 100 | . |
R2(config-if)#exit | Exit from interface mode. |
R2(config)#bfd echo | Enable BFD echo mode. |
R2(config)#commit | Commit the candidate configuration to the running configuration. |
R2(config)#exit | Exit from interface mode. |
Validation
R1
#sh bfd session detail
Session Interface Index : 3 Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Down
Local Discriminator : 1 Local Address : 10.1.1.1/32
Remote Discriminator : 1 Remote Address : 10.1.1.2/32
Local Port : 49152 Remote Port : 3784
Local Echo Port : 49153
Options :
Echo Enabled
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 2000 Neg Rx: 2000 Neg detect mult: 3
Min echo Tx: 100 Min echo Rx: 1000 Neg echo intrvl: 1000
Storage type : 2
Sess down time : 00:00:00
Sess discontinue time : 00:00:00
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000001ea Pkt Out : 0000000000000398
Echo Out : 0000000000000147 IPv6 Echo Out : 0000000000000000
IPv6 Pkt In : 0000000000000000 IPv6 Pkt Out : 0000000000000000
UP Count : 109 UPTIME : 00:00:00
Protocol Client Info:
BFD-> Client ID: 28 Flags: 4
----------------------------------------------------------
Number of Sessions: 1
R2
#sh bfd session detail
Session Interface Index : 3 Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Down
Local Discriminator : 1 Local Address : 10.1.1.2/32
Remote Discriminator : 1 Remote Address : 10.1.1.1/32
Local Port : 49152 Remote Port : 3784
Local Echo Port : 49153
Options :
Echo Enabled
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 2000 Neg Rx: 2000 Neg detect mult: 3
Min echo Tx: 100 Min echo Rx: 1000 Neg echo intrvl: 1000
Storage type : 2
Sess down time : 00:00:01
Sess discontinue time : 00:00:00
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 000000000000028f Pkt Out : 00000000000003b8
Echo Out : 0000000000000183 IPv6 Echo Out : 0000000000000000
IPv6 Pkt In : 0000000000000000 IPv6 Pkt Out : 0000000000000000
UP Count : 129 UPTIME : 00:00:00
Protocol Client Info:
BFD-> Client ID: 28 Flags: 4
----------------------------------------------------------
Number of Sessions: 1