< Home

Creating a Static BFD Session

By creating BFD sessions on both ends of an IP link, you can detect faults on the link rapidly. Static BFD sessions support one-hop detection and multi-hop detection. You can use the detection method according to the network of a session.

Prerequisites

Before you configure a static BFD session, complete the following tasks:
  • Correctly connecting interfaces and setting IP addresses.
  • Configuring routing protocols for the reachability of the network layer.
  • Configure global BFD functions, including enabling BFD and adjusting global parameters. For details, see Configuring Global BFD Functions.

Context

One-hop detection and multi-hop detection of static BFD sessions are described as follows:

  • One-hop detection detects the connectivity of the IP link between two directly-connected systems. One-hop refers to a hop of the IP address.

    Only one BFD session exists on the specified interface between the two systems going through BFD one-hop detection.

  • Multi-hop detection detects any paths between two systems. The paths may cover multiple hops or even overlap in certain parts.

To detect and monitor direct links (or links connected by a Layer-2 switch) rapidly, you can configure either BFD one-hop detection or multi-hop detection. However, the former is recommended.

If the peer IP address resides on different network segments from the IP address of the local outbound interface, you can configure only multi-hop detection to rapidly detect and monitor the connectivity of IP links. By creating BFD sessions on both ends of a multi-hop path, you can detect faults on the path rapidly.

To detect the physical link status using BFD, static BFD sessions can be configured in the following ways:
  • Specifying the peer IP address

    If the peer IP address is known, bind the BFD session to this IP address and send BFD control packets to the IP address.

  • Using the default IP address

    If the peer IP address cannot be specified (in some cases, the peer end does not have an IP address), bind the BFD session to a multicast address and send BFD control packets to the multicast address. The multicast address can be adjusted as required. For details, see Configuring Global BFD Functions.

    Creating a BFD session through the default IP address is valid only for one-hop detection.

When multiple protocols are bound to one static BFD session, the change of the session status affects all related protocols.

Procedure

  1. Access the system view.

    system-view

  2. According to whether BFD detects an IPv4 or IPv6 link, perform either of the following operations:
    • According to whether the remote end is configured with an IP address, run either of the following commands to configure a BFD binding relationship:

      • For the Layer-3 interfaces with IP addresses, create a BFD binding and set up BFD sessions:

        bfd cfg-name bind peer-ip peer-ip [ vpn-instance vpn-instance-name ] [ interface interface-type interface-number [ nexthop { nexthop-address | dhcp } ] ] [ source-ip source-ip ]

        • For one-hop detection during your binding of the BFD session, you need to specify only the local outbound interface. Otherwise, it is multi-hop detection.
        • When you create a one-hop BFD session for the first time, you must bind it to the peer IP address and the local interface. The session cannot be changed once created. When you create a multi-hop BFD session for the first time, you must bind it to the peer IP address at least. If the outbound interface and next hop are also configured, the BFD control packet is forwarded from the specified outbound interface to the next hop.
        • If you need to access the session view after a BFD session is created, specify the session configuration name.
        • When you create BFD configuration items, the system only checks whether the IP address format is legitimate, rather than the correctness. If bound to an incorrect peer or source IP address, the BFD session cannot be established.
        • To configure DHCP to interwork with BFD, specify the next hop of the static BFD session as nexthop dhcp.
        • If both interface and source-ip are specified, the source IP address must be the same as the IP address of the interface.
      • For Layer-2 interfaces and the Layer-3 interfaces without IP addresses, create a static BFD session (by using the default multicast IP address) and access the BFD session view:

        bfd cfg-name bind peer-ip default-ip interface interface-type interface-number [ source-ip source-ip ]

    • Run:

      bfd session-name bind peer-ipv6 ipv6-address [ vpn-instance vpn-name ] [ interface interface-type interface-number ] [ source-ipv6 ipv6-address ]

      • For one-hop detection during your binding of the BFD session, you need to specify only the local outbound interface. Otherwise, it is multi-hop detection.
      • If a single-hop BFD session for IPv6 is created for the first time, the BFD session must be bound to the remote IPv6 address and the local interface. The binding cannot be modified after being created.
      • When a BFD session for IPv6 is created, the system checks only the validity of the IPv6 address format. Binding the BFD session for IPv6 to an incorrect remote or local IPv6 address results in a failure in establishing the BFD session for IPv6.
  3. Configure the discriminator.

    • Configure a local discriminator.

      discriminator local local-discr-value
    • Configure a remote discriminator.

      discriminator remote remote-discr-value
    • The local discriminator must correspond to the remote discriminator on both ends of a BFD session. Otherwise, the session cannot be established.
    • For a BFD session bound to the default multicast address, the local discriminator cannot be the same as the remote one.
    • The local and remote discriminators cannot be changed once they are created.

  4. Commit the configuration.

    commit

    After all necessary parameters (such as the local and remote discriminators) are specified, you must run the commit command to successfully create a BFD session.

Example

# Create static BFD session test on FW_A, set the peer IP address to 10.1.1.1, and set the local discriminator to 10 and remote one to 20.

<FW_A> system-view
[FW_A] bfd
[FW_A-bfd] quit
[FW_A] bfd test bind peer-ip 10.1.1.1
[FW_A-bfd-session-test] discriminator local 10
[FW_A-bfd-session-test] discriminator remote 20
[FW_A-bfd-session-test] commit

# Create static BFD session test on FW_B, set the peer IP address to 10.1.1.2, and set the local discriminator to 20 and remote one to 10.

<FW_B> system-view
[FW_B] bfd
[FW_B-bfd] quit
[FW_B] bfd test bind peer-ip 10.1.1.2
[FW_B-bfd-session-test] discriminator local 20
[FW_B-bfd-session-test] discriminator remote 10
[FW_B-bfd-session-test] commit

Follow-up Procedure

  • Run the display bfd configuration command to display the configuration information about the static BFD session. The following uses the information that is displayed on FW_A as an example.

    <FW_A> display bfd configuration static verbose
    --------------------------------------------------------------------------------
      BFD Session Configuration Name : test  
    --------------------------------------------------------------------------------
      Local Discriminator    : 10               Remote Discriminator   : 20
      BFD Bind Type          : Peer IP Address
      Bind Session Type      : Static
      Bind Peer IP Address   : 10.1.1.1
      Bind Interface         : -
      Select Board           : -
      Track Interface        : -
      TOS-EXP                : 6                Local Detect Multi     : 3 
      Min Tx Interval (ms)   : 1000             Min Rx Interval (ms)   : 1000 
      Proc interface status  : Disable          WTR Interval (ms)      : -
      Bind Application       : No Application Bind  
      Session Description    : -  
      Session Create Status  : Success    
    --------------------------------------------------------------------------------
    
         Total Commit/Uncommit CFG Number : 1/0

    The local and remote discriminators, interface bound to the session, and peer IP address configured on FW_A are displayed in the output information. According to the statistics, the configuration of the session is submitted.

  • Run the display bfd session command to display the information about the static BFD session. The following uses the information that is displayed on FW_A as an example.

    <FW_A> display bfd session static
     --------------------------------------------------------------------------------
     Local Remote     PeerIpAddr      State     Type        InterfaceName
     --------------------------------------------------------------------------------
     10    20         10.1.1.1        Up        S_IP_PEER         -
     --------------------------------------------------------------------------------
          Total UP/DOWN Session Number : 0/1

    According to the output, if the BFD session is in Up state, the BFD session between two devices is established. If the BFD session is in Down state, it failed to be established.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >