Enabling BFD Monitoring for BGP Neighbors

By default, Bidirectional Forwarding Detection (BFD) monitoring is disabled for the BGP peers. When BFD monitoring is enabled, BGP registers with BFD for monitoring the particular neighbor path after the BGP session becomes ESTABLISHED.

When BFD detects the path failure, it informs BGP about the path status change.

The figure shown below depicts the topology setup used for this configuration.

Figure 1. BGP Configuration and Testing Topology


  1. To enable BGP in Router R1:

    Execute the following commands:

    • Enter the Global Configuration Mode.
    iS5comm# configure terminal
    • Enable BGP in R1.
    iS5comm(config)# router bgp 100
    • Configure R2 (with as-num 200) as external peer in R1.
    iS5comm(config-router)# neighbor 12.0.0.2 remote-as 100.2
    • Configure BFD monitoring for the peer R2.
    iS5comm(config-router)# neighbor 12.0.0.2 fall-over bfd

  2. To enable BGP in Router R2:

    Execute the following commands:

    • Enter the Global Configuration Mode.
    iS5comm# configure terminal
    • Enable BGP in R2 (assigning a 4 byte ASN).
    iS5comm(config)# router bgp 100.2
    • Configure R1 (with as-num 100) as external peer in R2.
    iS5comm(config-router)# neighbor 12.0.0.1 remote-as 100
    • Configure BFD monitoring for the peer R1.
    iS5comm(config-router)# neighbor 12.0.0.1 fall-over bfd

  3. R1: View the output using the show command mentioned below.

    Type the following:

    iS5comm# show ip bgp neighbor
    Context Name : default
    -------------
    BGP router identifier is 12.0.0.2, remote AS 200, external linkBGP version 4, remote router ID 12.0.0.2
    Network Address: None
    BGP state = Established, up for 7 seconds, un-authenticated session
    Configured BGP Maximum Prefix Limit 5000
    AutomaticStart DISABLED
    AutomaticStop DISABLED
    DampPeer Oscillations DISABLED
    DelayOpen DISABLED
    Configured Connect Retry Count 5
    Current Connect Retry Count 0
    Default-originate : DISABLED
    Peer Passive : DISABLED
    Peer Status : NOT DAMPED
    GateWay Address : NONE
    Rcvd update before 5 secs, hold time is 90, keepalive interval is 30 secs
    Neighbors Capability:
    Route-Refresh: Advertised and received
    4-byte ASN: Advertised and received
    Address family IPv4 Unicast: Advertised and received
    AF-dependant capabilities:
    Outbound Route Filter (ORF) type : (64) Address Prefix based ORF
    Send-mode : not supported
    Receive-mode : not supported
    BFD Monitoring : Enabled
    Received 3 messages, 1 Updates
    Sent 3 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 30 seconds
    Connections established 1 time(s)
    Graceful Restart Capability: advertised and received
    Remote Restart timer is 90
    Local host: 12.0.0.1, Local port: 179
    Foreign host: 12.0.0.2, Foreign port: 52696
    Last Error: Code 0, SubCode 0.
    Update Source 12.0.0.1
    Next-Hop is automatic
    MultiHop Status - disabled
    Send-Community is standard,extended

  4. R2: View the output using the show command mentioned below.

    Type the following:

    iS5comm# show ip bgp neighbor
    Context Name : default
    -------------
    BGP router identifier is 12.0.0.1, remote AS 100, external linkBGP version 4, remote router ID 12.0.0.1
    Network Address: None
    BGP state = Established, up for 2 minutes 10 seconds, un-authenticated session
    Configured BGP Maximum Prefix Limit 5000
    AutomaticStart DISABLED
    AutomaticStop DISABLED
    DampPeer Oscillations DISABLED
    DelayOpen DISABLED
    Configured Connect Retry Count 5
    Current Connect Retry Count 0
    Default-originate : DISABLED
    Peer Passive : DISABLED
    Peer Status : NOT DAMPED
    GateWay Address : NONE
    Rcvd update before 5 secs, hold time is 90, keepalive interval is 30 secs
    Neighbors Capability:
    Route-Refresh: Advertised and received
    4-byte ASN: Advertised and received
    Address family IPv4 Unicast: Advertised and received
    AF-dependant capabilities:
    Outbound Route Filter (ORF) type : (64) Address Prefix based ORF
    Send-mode : not supported
    Receive-mode : not supported
    BFD Monitoring : Enabled
    Received 7 messages, 1 Updates
    Sent 7 messages, 0 Updates
    Route refresh: Received 0, sent 0.
    Minimum time between advertisement runs is 30 seconds
    Connections established 1 time(s)
    Graceful Restart Capability: advertised and received
    Remote Restart timer is 90
    Local host: 12.0.0.2, Local port: 52696
    Foreign host: 12.0.0.1, Foreign port: 179
    Last Error: Code 0, SubCode 0.
    Update Source 12.0.0.1
    Next-Hop is automatic
    MultiHop Status - disabled
    Send-Community is standard,extended