FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
srajeswaran
Staff
Staff
Article Id 397176
Description This article describes how to remove BFD sessions without impacting the BGP sessions.
Scope FortiGate.
Solution

Consider the following topology:

 

image.png

 

BGP and BFD is up between FortiGate-1 and FortiGate-2.

 

FortiGate-2 # get router info bgp summary

 

VRF 0 BGP router identifier 10.10.10.2, local AS number 12345

BGP table version is 1

3 BGP AS-PATH entries

0 BGP community entries

 

Neighbor    V  AS     MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

10.10.10.1  4  12346  14      14      1      0   0    00:10:01      1

 

Total number of neighbors 1

 

FortiGate-2 # get router info bfd neighbor


OurAddress NeighAddress State Interface LDesc/RDesc
10.10.10.2 10.10.10.1   UP    port4         4/2

 

To remove the BFD dependency on BGP, configure 'set bfd disable' under the BGP neighbor configuration.

 

This will bring down the BFD neighborship, but will not bring down BGP as BFD uses 'Diagnostic Code: Administratively Down (0x07)'. This informs the neighbor that BFD is administratively disabled and not down due to reasons like keepalive being missing.

 

FortiGate-2 # get router info bfd neighbor

OurAddress NeighAddress State Interface LDesc/RDesc
10.10.10.2 10.10.10.1   DOWN  port4         7/6

 

FortiGate-2 # get router info bgp summary

VRF 0 BGP router identifier 10.10.10.2, local AS number 12345
BGP table version is 2
3 BGP AS-PATH entries
0 BGP community entries

Neighbor    V   AS    MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.10.10.1  4   12346 228     233     1      0   0 0  1:02:44    2    <----- BGP stays UP even though BFD is down.

Total number of neighbors 1

 

Admin Down PCAP:

 

image.png

 

When keepalives are missed, BFD sends 'Diagnostic Code: Control Detection Time Expired (0x01)'. This will trigger BGP to go down.

 

Keepalive missing PCAP:

 

image.png

 

Related article:

Technical Tip: FortiGate BFD implementation and examples (Bidirectional Forwarding Detection for OSP...