---
title: BFD Configuration
slug: enterprise-v5p2/LmxR-bfd-configuration
description: reliability configuration
createdAt: 2025-11-14T03:58:40.850Z
---

### <font color="#1d50a2">show bfd peers</font>

**\[Command]**
**show bfd peer**
**show bfd peers**
**show bfd peers brief**

**\[Purpose]**
View BFD session information

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show bfd peers brief
Session count: 3
SessionId  LocalAddress   PeerAddress   Status
=========  ============   ===========   ======
3607940072 30.11.13.130   30.11.13.129   down
3035614313 2022::9111     2022::9110     up
1781668247 30.11.13.2     30.11.13.1     up
```

### <font color="#1d50a2">show bfd peers counters</font>

**\[Command]**
**show bfd peers counters**
**clear bfd peers counters**

**\[Purpose]**
View BFD session statistics

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show bfd peers counters
BFD Peers:
    peer 30.11.13.129 vrf default interface ethernet 50
        Control packet input: 300387 packets
        Control packet output: 300181 packets
        Echo packet input: 0 packets
        Echo packet output: 0 packets
        Session up events: 1
        Session down events: 1
        Zebra notifications: 3
```

### <font color="#1d50a2">show bfd peers log-info</font>

**\[Command]**
**show bfd peers log-info**

**\[Purpose]**
View the BFD status

**\[View]**
System view

**\[Use Cases]**

```plaintext
sonic# show bfd peers log-info
--------------------------------------------------
Local address  : 1.1.1.2
Peer address   : 1.1.1.1
Date/Time      : 2024-12-09 09:00:43
State          : Up
Date/Time      : 2024-12-09 09:00:23
State          : Down
Down reason    : administratively down
Date/Time      : 2024-12-09 08:52:45
State          : Up
```

### <font color="#1d50a2">bfd</font>

**\[Command]**
**bfd**

**\[Purpose]**
Enter BFD configuration view

**\[View]**
System configuration view

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)#
```

### <font color="#1d50a2">peer</font>

**\[Command]**
**peer** *ip\_address* **\[multihop|local-address** *ip-address* **|interface** *interface\_type interface\_name* **]**
**no peer \[multihop|local-address** *ip-address* **|interface** *interface\_type interface\_name* **]**

**\[Purpose]**
Create BFD session binding information and enter BFD-peer view

**\[Parameter]**

| **Parameter**                                     | **Description**                                                  |
| ------------------------------------------------- | ---------------------------------------------------------------- |
| *ip\_address*                                     | IP address of the counterpart to which  the BFD session is bound |
| **multihop**                                      | Specify the BFD session as multi-hop mode                        |
| *local-address \<ip\_address>*                    | Specify the source IP address of the BFD packet                  |
| *interface \<interface\_type> \<interface\_name>* | Specify the interface type and name of the BFD session           |

**\[View]**
BFD View

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# peer 30.11.13.1 interface ethernet 49
```

### <font color="#1d50a2">profile</font>

**\[Command]**
**profile** *profile\_name*
**no profile** *profile\_name*

**\[Purpose]**
Configure BFD policy group/bind specified policy group to peer

**\[Parameter]**

| **Parameter**   | **Description** |
| --------------- | --------------- |
| *profile\_name* | Profile name    |

**\[View]**
BFD View, BFD-peer View

**\[Usage Scenario]**
When creating a large number of Bidirectional Forwarding Detection (BFD) sessions on a device, configuring peer policies one by one can significantly reduce configuration efficiency. Therefore, configuring BFD policy groups and then binding the policy group to peers can effectively streamline the configuration process.

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# profile test
sonic(config-bfd-profile)# detect-multiplier 3
sonic(config-bfd-profile)# exit
sonic(config-bfd)# peer 30.11.13.1
sonic(config-bfd-peer)# profile test
```

### <font color="#1d50a2">detect-multiplier</font>

**\[Command]**
**detect-multiplier&#x20;***value*

**\[Purpose]**
Local detection multiplier for BFD sessions

**\[Parameter]**

| **Parameter** | **Description**    |
| ------------- | ------------------ |
| *value*       | Value range: 2-255 |

**\[View]**
BFD-peer view, BFD-profile view

**\[Usage Scenario]**
The local detection multiplier of a BFD session directly determines the detection time for the remote BFD session. Users can increase or decrease the local detection multiplier of a BFD session based on the actual network conditions. For example, on a relatively stable link where frequent detection of link status is not necessary, users can increase the local detection multiplier of a BFD session.
BFD Detection Time = Detection Multiplier x Transmission Interval

**\[Notes]**
For less stable links, configuring a small detection multiplier for a BFD session may lead to BFD session oscillations. It is recommended that users configure the detection time multiplier to a larger value.
If the detection multiplier for a configured BFD session is too large, the BFD session needs a longer time interval to detect a link failure. During this time period, traffic needs to switch to a backup link within a specified time. Packet loss may occur during this period. It is advisable to carefully choose the detection multiplier based on the actual network conditions and the requirements for fault detection.

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# peer 30.11.13.1
sonic(config-bfd-peer)# detect-multiplier 3
```

### <font color="#1d50a2">echo-mode</font>

**\[Command]**
**echo-mode**
**no echo-mode**

**\[Purpose]**
Configure the BFD session as a single-arm echo function

**\[View]**
BFD-peer view, BFD-profile view

**\[Usage Scenario]**
Among two directly connected devices, one of them supports BFD function and the other one does not support BFD function. In this case, in order to detect link failures more quickly, a single-arm echo-capable BFD session can be created on the device that supports the BFD function. After the device that does not support BFD function receives a BFD packet, it directly loops the packet back at the IP layer, so as to achieve the purpose of fast link detection.

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# peer 30.11.13.1
sonic(config-bfd-peer)# echo mode
```

### <font color="#1d50a2">echo-interval</font>

**\[Command]**
**echo-interval** *value*

**\[Purpose]**
Configure the minimum reception interval of BFD packets for the single-arm echo function

**\[Parameter]**

| **Parameter** | **Description**                 |
| ------------- | ------------------------------- |
| *value*       | Value range: 10-60000, unit: ms |

**\[View]**
BFD-peer view, BFD-profile view

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# peer 30.11.13.1
sonic(config-bfd-peer)# echo mode
sonic(config-bfd-peer)# echo-interval 20
```

### <font color="#1d50a2">minimum-ttl</font>

**\[Command]**
**minimum-ttl** *value*

**\[Purpose]**
Configure the survival time of BFD packets

**\[Parameter]**

| **Parameter** | **Description**    |
| ------------- | ------------------ |
| *value*       | Value range: 1-254 |

**\[View]**
BFD-peer view, BFD-profile view

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# peer 30.11.13.1
sonic(config-bfd-peer)# minimum-ttl 254
```

### <font color="#1d50a2">passive-mode</font>

**\[Command]**
**passive-mode**
**no passive-mode**

**\[Purpose]**
Configure the operation mode of BFD as passive mode

**\[View]**
BFD-peer view, BFD-profile view

**\[Notes]**
This command switches the operation mode of BFD to active mode.

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# peer 30.11.13.1
sonic(config-bfd-peer)# passive-mode
```

### <font color="#1d50a2">receive-interval</font>

**\[Command]**
**receive-interval&#x20;**&#x20;*value*

**\[Purpose]**
Configure the reception interval of BFD packets

**\[Parameter]**

| **Parameter** | **Description**                 |
| ------------- | ------------------------------- |
| *value*       | Value range: 10-60000, unit: ms |

**\[View]**
BFD-peer view, BFD-profile view

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# peer 30.11.13.1
sonic(config-bfd-peer)# receive-interval 10
```

### <font color="#1d50a2">shutdown</font>

**\[Command]**
**shutdown**
**no shutdown**

**\[Purpose]**
Abort BFD session detection

**\[View]**
BFD-peer view, BFD-profile view

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# peer 30.11.13.1
sonic(config-bfd-peer)# shutdown
```

### <font color="#1d50a2">transmit-interval</font>

**\[Command]**
**transmit-interval&#x20;**&#x20;*value*

**\[Purpose]**
Configure the sending interval of BFD packets

**\[Parameter]**

| **Parameter** | **Description**                 |
| ------------- | ------------------------------- |
| *value*       | Value range: 10-60000, unit: ms |

**\[View]**
BFD-peer view, BFD-profile view

**\[Use Cases]**

```plaintext
sonic(config)# bfd
sonic(config-bfd)# peer 30.11.13.1
sonic(config-bfd-peer)# transmit-interval 20
```

