bfd bind peer-ip (System view)

Function

The bfd bind peer-ip command creates the binding between a BFD session and a peer IP address and displays the BFD session view.

The bfd bind peer-ip source-ip auto command creates a static BFD session with automatically negotiated discriminators.

The undo bfd command deletes a specified BFD session and cancels the binding between a BFD session and a peer IP address.

By default, the binding between a BFD session and a peer address is not created.

Format

bfd session-name bind peer-ip peer-ip [ vpn-instance vpn-name ] [ interface { interface-name | interface-type interface-number } ] [ source-ip source-ip ]

bfd session-name bind peer-ip peer-ip [ vpn-instance vpn-name ] [ interface { interface-name | interface-type interface-number } ] source-ip source-ip auto

Parameters

Parameter Description Value
session-name

Specifies the name of a BFD session.

The value is a string of 1 to 64 characters, spaces not supported. When quotation marks are used around the string, spaces are allowed in the string.

  • When the name of a BFD session is configured, the uppercase and lowercase letters in the name must be the same as what you enter.
  • BFD session names are case-insensitive. For example, ABC and abc are regarded as the same BFD session. If you have configured ABC as the name of a BFD session, the ABC BFD session view is directly displayed when you configure abc.
peer-ip peer-ip

Specifies the peer IP address bound to a BFD session.

The value is in dotted decimal notation.

vpn-instance vpn-name

Specifies the name of a VPN instance bound to a BFD session.

The value is a string of 1 to 31 case-sensitive characters, spaces not supported. In addition, the VPN instance name must not be _public_. When double quotation marks are used around the string, spaces are allowed in the string.

interface interface-type interface-number

Specifies the local Layer 3 interface to which a BFD session is bound.

-

source-ip source-ip

Specifies the source IPv4 address carried in BFD packets.

If this parameter is not specified, the system searches the local routing table for the IP address of an outbound interface connected to the remote end and uses the IP address as the source IP address before sending BFD packets. This parameter usually does not need to be specified.

The value is in dotted decimal notation.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bfd write

Usage Guidelines

Usage Scenario

To rapidly detect link faults on a network, create a BFD session.

When creating the binding between a BFD session and a peer IP address:

  • If only the peer IP address is specified, BFD detects faults in a multi-hop link.
  • If both the peer IP address and local interface are specified, BFD detects faults in a single-hop link. That is, BFD monitors a fixed route whose outbound interface is this interface and the next-hop address is the peer IP address.
  • If both the peer IP address and the VPN instance are specified, BFD detects faults in the multi-hop link for a specified VPN instance.
  • If the peer IP address, the VPN instance, and the local interface are specified, BFD detects faults in the single-hop link for a specified VPN instance.

    A BFD session is established to rapidly detect faults in links on a network. A device needs to establish a BFD session with a remote device on which a dynamic BFD session is established to detect faults in static routes. In this case, the bfd bind peer-ip source-ip auto command is used to create a BFD session with automatically negotiated discriminators.

    When creating a static BFD session with automatically negotiated discriminators:
  • If only the peer IP address is specified, BFD detects faults in a multi-hop link.
  • If both the peer IP address and local interface are specified, BFD detects faults in a single-hop link. That is, BFD monitors a fixed route whose outbound interface is this interface and the next-hop address is the peer IP address.
  • If the source IP address is specified for the interface whose physical status is to be monitored by BFD, BFD packets are correctly forwarded after URPF has been enabled. The source-ip parameter must be configured correctly because the system checks only the validity of the source IP address. A multicast or broadcast address is an invalid source IP address.
  • If both the peer IP address and the VPN instance are specified, BFD detects faults in the multi-hop link for a specified VPN instance.
  • If the peer IP address, the VPN instance, and the local interface are specified, BFD detects faults in the single-hop link for a specified VPN instance.

    One-arm BFD echo is used when two devices are directly connected and only one of them supports BFD. A one-arm BFD echo session can be established on the device that supports BFD. After receiving a one-arm BFD echo session packet, the device that does not support BFD immediately loops back the packet, implementing quick link failure detection.

    When a one-arm BFD echo session is created:
  • If the source IP address is specified and URPF is enabled, BFD packets can be correctly forwarded. The source IP address must be configured correctly because the system checks only the validity of the source IP address format. A multicast or broadcast address is invalid.
  • If a VPN instance is specified, a single-hop link for VPN routes is monitored.
  • If the source IP address is specified, the device searches the routing table for the outbound interface address based on the value of peer-ip, and uses the address as the destination address in BFD packets. The device uses the value of source-ip as the source address.
  • If no source address is specified, the device searches the routing table for the outbound interface address based on the value of peer-ip, and uses the address as the source and destination addresses in BFD packets.

Prerequisites

BFD has been globally enabled using the bfd command in the system view.

Configuration Impact

You can run the bfd bind peer-ip command to create the binding between a static BFD session and a peer IP address.

Precautions

  • If the source IP address is configured for the interface whose physical status is to be monitored by BFD, BFD packets are correctly forwarded after URPF has been enabled. The source-ip parameter must be configured correctly because the system checks only the validity of the source IP address. A multicast or broadcast address is an invalid source IP address.
  • The bfd bind peer-ip command must be run on both ends of a link because BFD detects faults in a bidirectional link.
  • A BFD for link-bundle session bound to the Eth-Trunk interface and IP address cannot be configured together with a BFD for peer-IP auto session bound to the same Eth-Trunk interface and IP address.
  • If the IP address of the outbound interface is changed after a BFD session has been created, either of the following situations occurs:
  • During negotiation, the source IP address to be carried in BFD packets is updated.
  • During detection, the source IP address carried in BFD packets is not updated.

Example

# Create a static BFD session with automatically negotiated discriminators.
<HUAWEI> system-view
[~HUAWEI] bfd
[*HUAWEI-bfd] quit
[*HUAWEI] interface GigabitEthernet 0/1/0
[*HUAWEI-GigabitEthernet0/1/0] ip address 10.1.1.1 24
[*HUAWEI-GigabitEthernet0/1/0] quit
[*HUAWEI] bfd atob bind peer-ip 10.1.1.2 interface GigabitEthernet 0/1/0 source-ip 10.1.1.1 auto
# Create a BFD session named session so that BFD can detect faults in the multi-hop link to the IP address 10.10.20.2.
<HUAWEI> system-view
[~HUAWEI] bfd
[*HUAWEI-bfd] quit
[*HUAWEI] bfd session bind peer-ip 10.10.20.2
[*HUAWEI-bfd-session-session]
# Create a BFD session named atob so that BFD can detect faults in the single-hop link from the local interface to the peer interface whose IP address is 10.2.2.1.
<HUAWEI> system-view
[~HUAWEI] bfd
[*HUAWEI-bfd] quit
[*HUAWEI] interface GigabitEthernet 0/1/0
[*HUAWEI-GigabitEthernet0/1/0] ip address 10.2.2.2 24
[*HUAWEI-GigabitEthernet0/1/0] quit
[*HUAWEI] bfd atob bind peer-ip 10.2.2.1 interface GigabitEthernet 0/1/0
[*HUAWEI-bfd-session-atob]
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >