Help Center> Direct Connect> FAQs> Product Consultation> How Do I Configure BFD for a Connection?
Updated on 2022-09-14 GMT+08:00

How Do I Configure BFD for a Connection?

What Is BFD?

Bidirectional Forwarding Detection (BFD) is a network protocol designed to detect faults between two forwarding devices connected by a link.

Default BFD Configuration

Table 1 Default parameter settings

Parameter

Default Value

Global BFD

Disabled

Interval for sending BFD control packets

1000 ms

Interval for receiving BFD control packets

1000 ms

Local detection multiplier

3

WTR time

0

Delay before a BFD session becomes Up

0

Priority of BFD packets

7

BFD Support for Static Routing

Unlike dynamic routing protocols, static routes do not have a dedicated detection mechanism. If a fault occurs, static routes cannot detect the fault, and network administrators must delete the static route. With BFD, faults on static routes can be detected.

Each static route can be bound to a BFD session. When a BFD session bound to a static route detects a fault (for example, the link changes from Up to Down), BFD reports the fault to the routing management (RM) module, which then configures the route as inactive to indicate that the route is unavailable and will be deleted from the route table. When the BFD session bound to the static route is established or the link changes from Down to Up, BFD reports the event to the RM module, which then configures the static route as active to indicate that the route is available and will be added back to the route table.

BFD Support for BGP Routing

BGP periodically sends Keepalive packets to its peers to detect faults. Detecting a fault using this mechanism takes more than 1 second. If traffic is transmitted at gigabit rates, a large number of packets will be lost. To avoid packet loss, BFD can be configured for BGP to rapidly detect faults on links between BGP peers and report the faults to BGP for fast BGP route convergence. Table 2 lists the BGP convergence speeds.

Table 2 BGP convergence speeds

BFD Session Bound

Link Fault Detection Mechanism

Convergence Speed

Not bound

Keepalive packets

Within seconds

Bound

BFD session in the Down state

Within milliseconds

Figure 1 BFD support for BGP

RouterA belongs to AS 100 and RouterB belongs to AS 200. An External Border Gateway Protocol (EBGP) connection is established between RouterA and RouterB. BFD monitors the status of the EBGP connection. When the link between RouterA and RouterB becomes faulty, BFD can quickly detect the fault and notify BGP.

Verifying the BFD Configuration

You can run the following commands to view information about the configured BFD session.

  • display bfd interface [interface-type interface-number]: Check the BFD-enabled interface.
  • display bfd session {all | static | discriminator discr-value | dynamic | peer-ip { default-ip | peer-ip [ vpn-instance vpn-instance-name ] } | static-auto } [ verbose ] : View information about the BFD session.
  • display bfd statistics: Check global BFD statistics.
  • display bfd statistics session { all | static | dynamic | discriminator discr-value | peer-ip default-ip | peer-ip peer-ip [ vpn-instance vpn-name ] | static-auto }: Check BFD session statistics.

Troubleshooting

  • BFD Session Cannot Become Up

    Common causes

    Common causes are as follows:

    • The link detected by the BFD session is faulty. As a result, BFD packets cannot be exchanged.
    • The BFD session frequently flaps.

    Procedure

    1. Run display current-configuration configuration bfd to check whether the local and remote discriminators at both ends of the BFD session match.
      • If local and remote discriminators at both ends match, go to 2.
      • If the local and remote discriminators at both ends do not match, run discriminator to configure the local and remote discriminators of the BFD session, and then run display bfd session all to check whether the BFD session is Up.
        • If the value of the State field is Up, the BFD session has been established.
        • If the value of the State field is not Up, go to 2.
    2. Run display current-configuration configuration bfd to check whether the BFD detection time is longer than the delay before the BFD session becomes Up.

      Detection time = Received Detect Multi of the remote system x Max (Local RMRI/Received DMTI)

      Detect Multi is the local detection multiplier, which is configured by running the detect-multiplier command. The Required Min Rx Interval (RMRI) is the minimum interval for receiving BFD packets, which is configured by running the min-rx-interval command. The Desired Min Tx Interval (DMTI) is the minimum interval for sending BFD packets, which is configured by running the min-tx-interval command.

      The link delay can be obtained using the ping or tracert command.

      If the BFD detection time is shorter than the delay before the BFD session becomes Up, run detect-multiplier, min-rx-interval, and min-tx-interval to increase the BFD detection time to be longer than the delay.

  • BFD Detection Result Affects Forwarding on an Interface

    Common causes

    The BFD session is associated with the interface status.

    Procedure

    1. Run display interface interface-type interface-number to check the status of the interface bound to the BFD session.
      • If the value of Line protocol current state is UP (BFD status down), the interface status is affected by the BFD session status. When the BFD session detects a link fault, the interface enters the BFD status down state. Go to 2.
      • If the value of Line protocol current state is Up but the interface cannot forward packets, the forwarding module is working normally.
    1. Run display bfd session all to view the BFD session status.

      If the BFD session is Down, go to 3.

    1. Run display current-configuration configuration bfd-session to check the BFD session configuration and check whether the process-interface-status command is configured.

      If the process-interface-status command is configured, the interface enters the DOWN (BFD status down) state when the BFD session detects a link fault and enters the Down state. As a result, the interface cannot forward packets.

  • Modified BFD Parameters Do Not Take Effect

    Common causes

    The configuration is not committed after BFD session parameters are modified.

    Saving the results of each troubleshooting step is recommended. If your troubleshooting fails to correct the fault, you will have a record of your actions to provide Huawei technical support personnel.

    Procedure

    Run display current-configuration configuration bfd-session to check the BFD session configuration and check whether the commit command is configured.

    If the commit command is configured, the modified BFD parameters are committed.

    If the commit command is not used, the modified BFD parameters are not committed. Run commit to commit the configuration.

Product Consultation FAQs

more