BFD Configuration in BGP
This section provides the steps for configuring BFD for the BGP protocol.
Topology
Figure 2-168: Basic Topology for BFD in BGP
R1
R1#configure terminal | Enter configure mode |
R1(config)#interface eth1 | Enter the Interface configuration mode for eth1. |
R1(config-if)#ip address 10.1.1.1/24 | Assign IP Address |
R1(config-if)#exit | Exit the Interface configuration mode. |
R1(config)# interface lo | Enter interface mode |
R1(config-if)#ip address 1.1.1.1/32 secondary | Configure the IP address on loopback interface. |
R1(config-if)#bfd session 1.1.1.1 3.3.3.3 multihop | Enable BFD multihop session |
R1(config)#router ospf 100 | Enter Router mode for OSPF |
R1(config-router)# ospf router-id 1.1.1.1 | Configure router-id in OSPF |
R1(config-router)# network 1.1.1.1/32 area 0.0.0.1 | Advertise network 1.1.1.1/32 in OSPF area 1. |
R1(config-router)# network 10.1.1.0/24 area 0.0.0.1 | Advertise network 10.1.1.0/24 in OSPF area 1. |
R1(config)#router bgp 100 | Enter Router mode for BGP |
R1(config-router)# neighbor 3.3.3.3 remote-as 100 | Add the neighbor 3.3.3.3 to remote-as 100. |
R1(config-router)# neighbor 3.3.3.3 fall-over bfd | Enable BFD option for neighbor multihop |
R1(config-router)#neighbor 3.3.3.3 update-source lo | Add neighbor 3.3.3.3 to update-source lo. |
R1(config-router)#neighbor 10.1.1.2 remote-as 100 | Add neighbor 10.1.1.2 to remote-as 100. |
R1(config-router)# neighbor 10.1.1.2 fall-over bfd | Enable BFD option for neighbor |
R1(config-router)#commit | Commit the configuration on the node |
R1(config-router)#end | Exit from Router BGP mode |
R2
R2#configure terminal | Enter configure mode |
R2(config)#interface eth1 | Enter the Interface configuration mode for eth1. |
R2(config-if)#ip address 10.1.1.2/24 | Assign IP Address |
R2(config-if)#exit | Exit the Interface configuration mode. |
R2(config)#interface eth2 | Enter the Interface configuration mode for eth2. |
R2(config-if)#ip address 20.1.1.1/24 | Assign IP Address |
R2(config-if)#exit | Exit the Interface configuration mode |
R2(config)# interface lo | Enter interface mode |
R2(config-if)#ip address 2.2.2.2/32 secondary | Configure the IP address on loopback interface. |
R2(config-if)#exit | Exit the Interface configuration mode |
R2(config)#router ospf 100 | Enter Router mode for OSPF |
R2(config-router)#ospf router-id 2.2.2.2 | Configure router-id in OSPF |
R2(config-router)# network 2.2.2.2/32 area 0.0.0.1 | Advertise network 1.1.1.1/32 in OSPF area 1. |
R2(config-router)#network 10.1.1.0/24 area 0.0.0.1 | Advertise network 10.1.1.0/24 in OSPF area 1. |
R2(config-router)# network 20.1.1.0/24 area 0.0.0.1 | Advertise network 20.1.1.0/24 in OSPF area 1. |
R3(config-router)#exit | Exit from Router OSPF mode |
R2(config)#router bgp 100 | Enter Router mode for BGP |
R2(config-router)# neighbor 10.1.1.1 remote-as 100 | Add neighbor 10.1.1.1 to remote-as 100. |
R2(config-router)#neighbor 10.1.1.1 fall-over bfd | Enable BFD option for neighbor |
R2(config-router)# neighbor 20.1.1.2 remote-as 100 | Add neighbor 20.1.1.2 to remote-as 100. |
R2(config-router)# neighbor 20.1.1.2 fall-over bfd | Enable BFD option for neighbor |
R2(config-router)#commit | Commit the configuration on the node |
R2(config-router)#end | Exit from Router BGP mode |
R3
R3#configure terminal | Enter configure mode |
R3(config)#interface eth2 | Enter the Interface configuration mode for eth2. |
R3(config-if)#ip address 20.1.1.2/24 | Assign IP Address. |
R3(config-if)#exit | Exit the Interface configuration mode. |
R3(config)# interface lo | Enter interface mode |
R3(config-if)#ip address 3.3.3.3/32 secondary | Configure IP address on loopback interface. |
R1(config-if)#bfd session 3.3.3.3 1.1.1.1 multihop | Enable BFD multihop session |
R2(config-if)#exit | Exit the Interface configuration mode |
R3(config)#router ospf 100 | Enter Router mode for OSPF |
R3(config-router)#ospf router-id 3.3.3.3 | Configure router-id in OSPF |
R3(config-router)# network 3.3.3.3/32 area 0.0.0.1 | Advertise network 3.3.3.3/32 in OSPF area 1. |
R3(config-router)# network 20.1.1.0/24 area 0.0.0.1 | Advertise network 20.1.1.0/24 in OSPF area 1. |
R3(config-router)#exit | Exit from Router OSPF mode |
R3(config)#router bgp 100 | Enter Router mode for BGP |
R3(config-router)# neighbor 1.1.1.1 remote-as 100 | Add neighbor 1.1.1.1 to remote-as 100. |
R3(config-router)# neighbor 1.1.1.1 fall-over bfd multihop | Enable BFD option for neighbor |
R3(config-router)#neighbor 1.1.1.1 update-source lo | Add neighbor 1.1.1.1 to update-source lo. |
R3(config-router)# neighbor 20.1.1.1 remote-as 100 | Add neighbor 20.1.1.1 to remote-as 100. |
R3(config-router)#neighbor 20.1.1.1 fall-over bfd | Enable BFD option for neighbor |
R3(config-router)#commit | Commit the configuration on the node |
R3(config-router)#end | Exit from Router BGP mode |
Validation
R1
R1#show ip ospf neighbor
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
2.2.2.2 1 Full/Backup 00:00:35 10.1.1.2 eth1 0
R1#show bfd session
BFD process for VRF: (DEFAULT VRF)
================================================================================
=====
Sess-Idx Remote-Disc Lower-Layer Sess-Type Sess-State UP-Time Interface Down-Reason Remote-Addr
1 1 IPv4 Single-Hop Up 00:02:55 eth1 NA 10.1.1.2/32
257 0 IPv4 Multi-Hop Up 00:00:18 NA NA 3.3.3.3/32
Number of Sessions: 2
R1#show bfd session detail
BFD process for VRF: (DEFAULT VRF)
================================================================================
====
Session Interface Index : 10023 Interface name :eth1
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: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 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 Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000000814 Pkt Out : 00000000000000000814
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 1 UPTIME : 00:02:59
Protocol Client Info:
BGP-> Client ID: 44 Flags: 4
----------------------------------------------------------
Session Interface Index : 0 Session Index : 257
Lower Layer : IPv4 Version : 1
Session Type : Multihop Arbit Path Session State : Up
Local Discriminator : 257 Local Address : 1.1.1.1/32
Remote Discriminator : 0 Remote Address : 3.3.3.3/32
Local Port : 49153 Remote Port : 4784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 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 Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000000000 Pkt Out : 00000000000000000107
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 0 UPTIME : 00:00:00
R2
R2#show ip ospf neighbor
Total number of full neighbors: 2
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
1.1.1.1 1 Full/DR 00:00:32 10.1.1.1 eth1 0
3.3.3.3 1 Full/Backup 00:00:40 20.1.1.2 eth2 0
R2#show bfd session
BFD process for VRF: (DEFAULT VRF)
================================================================================
=====
Sess-Idx Remote-Disc Lower-Layer Sess-Type Sess-State UP-Time Interface Down-Reason Remote-Addr
1 1 IPv4 Single-Hop Up 00:02:33 eth1 NA 10.1.1.1/32
2 1 IPv4 Single-Hop Up 00:01:54 eth2 NA 20.1.1.2/32
Number of Sessions: 2
R2#show bfd session detail
BFD process for VRF: (DEFAULT VRF)
================================================================================
====
Session Interface Index : 10023 Interface name :eth1
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: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 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 Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000000713 Pkt Out : 00000000000000000714
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 1 UPTIME : 00:02:37
Protocol Client Info:
BGP-> Client ID: 44 Flags: 4
----------------------------------------------------------
Session Interface Index : 10053 Interface name :eth2
Session Index : 2
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 2 Local Address : 20.1.1.1/32
Remote Discriminator : 1 Remote Address : 20.1.1.2/32
Local Port : 49153 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 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 Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000000535 Pkt Out : 00000000000000000537
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 1 UPTIME : 00:01:58
Protocol Client Info:
BGP-> Client ID: 44 Flags: 4
----------------------------------------------------------
Number of Sessions: 2
R3
R3#show ip ospf neighbor
Total number of full neighbors: 1
OSPF process 100 VRF(default):
Neighbor ID Pri State Dead Time Address Interface Instance ID
2.2.2.2 1 Full/DR 00:00:36 20.1.1.1 eth1 0
R3#show bfd session
BFD process for VRF: (DEFAULT VRF)
================================================================================
=====
Sess-Idx Remote-Disc Lower-Layer Sess-Type Sess-State UP-Time Interface Down-Reason Remote-Addr
1 2 IPv4 Single-Hop Up 00:01:21 eth1 NA 20.1.1.1/32
257 1 IPv4 Multi-Hop Up 00:00:00 NA NA 1.1.1.1/32
Number of Sessions: 2
Total number of Established sessions 2
R3#show bfd session detail
BFD process for VRF: (DEFAULT VRF)
================================================================================
====
Session Interface Index : 10053 Interface name :eth1
Session Index : 1
Lower Layer : IPv4 Version : 1
Session Type : Single Hop Session State : Up
Local Discriminator : 1 Local Address : 20.1.1.2/32
Remote Discriminator : 2 Remote Address : 20.1.1.1/32
Local Port : 49152 Remote Port : 3784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 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 Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000000391 Pkt Out : 00000000000000000391
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 1 UPTIME : 00:01:26
Protocol Client Info:
BGP-> Client ID: 44 Flags: 4
----------------------------------------------------------
Session Interface Index : 0 Session Index : 257
Lower Layer : IPv4 Version : 1
Session Type : Multihop Arbit Path Session State : Up
Local Discriminator : 257 Local Address : 3.3.3.3/32
Remote Discriminator : 1 Remote Address : 1.1.1.1/32
Local Port : 49153 Remote Port : 4784
Options :
Diagnostics : None
Timers in Milliseconds :
Min Tx: 250 Min Rx: 250 Multiplier: 3
Neg Tx: 250 Neg Rx: 250 Neg detect mult:250
Min echo Tx: 1000 Min echo Rx: 1000 Neg echo intrvl: 0
Storage type : 2
Sess down time : 00:00:00
Sess Down Reason : NA
Bfd GTSM Disabled
Bfd Authentication Disabled
Counters values:
Pkt In : 00000000000000000000 Pkt Out : 00000000000000000047
Pkts Drop : 00000000000000000000 Auth Pkts Drop : 00000000000000000000
Echo Out : 00000000000000000000 IPv6 Echo Out : 00000000000000000000
IPv6 Pkt In : 00000000000000000000 IPv6 Pkt Out : 00000000000000000000
UP Count : 0 UPTIME : 00:00:00
Protocol Client Info:
BGP-> Client ID: 44 Flags: 4
----------------------------------------------------------
Number of Sessions: 2