---
title: BFD
slug: aidc/bfd
createdAt: 2025-12-01T11:11:08.000Z
---

## <font color="#1d50a2">BFD View</font>

<font color="#1d05a2">Table 1 BFD View</font>

| Command                                                                                               | Purpose                                        |
| ----------------------------------------------------------------------------------------------------- | ---------------------------------------------- |
| **show bfd peers** \[*OPTIONs*]                                                                       | Display BFD session information.               |
| **show bfd peer** \{*A.B.C.D\|X\:X\::X\:X*} \[**multihop\|local-address\|interface\|json\|counters**] | Display the specified BFD session information. |
| **clear bfd peers counters**                                                                          | Clear BFD session statistics.                  |
| **clear bfd peer** \{*A.B.C.D\|X\:X\::X\:X*} \[**multihop\|local-address\|interface**] **counters**   | Clear the specified BFD session statistics.    |

### <font color="#1d50a2">show bfd peers \[*OPTIONs*\]</font>

**\[Command]**
**show bfd peers** \[*OPTIONs*]

**\[Purpose]**
Display BFD session information.

**\[Options]**

| **Option**   | **Description**                      |
| ------------ | ------------------------------------ |
| **brief**    | Display abbreviated BFD information. |
| **json**     | Display in json format.              |
| **counters** | Display BFD statistics.              |

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# show bfd peers
BFD Peers:
        peer 10.226.46.2 multihop local-address 10.226.33.2 vrf default
                ID: 1634016920
                Remote ID: 2927170466
                Passive mode
                Minimum TTL: 254
                Status: up
                Uptime: 32 minute(s), 14 second(s)
                Diagnostics: ok
                Remote diagnostics: ok
                Peer Type: configured
                Local timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo receive interval: 50ms
                        Echo transmission interval: disabled
                Remote timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo receive interval: 50ms
sonic# show bfd peers brief
Session count: 2
SessionId  LocalAddress                             PeerAddress                             Status
=========  ============                             ===========                             ======
1634016920 10.226.33.2                              10.226.46.2                             up
2943610781 2000:226:33::2                           2000:226:46::2                          admin-down
sonic# show bfd peers counters
BFD Peers:
        peer 10.226.46.2 multihop local-address 10.226.33.2 vrf default
                Control packet input: 7808 packets
                Control packet output: 7675 packets
                Echo packet input: 0 packets
                Echo packet output: 0 packets
                Session up events: 1
                Session down events: 3
                Zebra notifications: 1
```

### <font color="#1d50a2">show bfd peer \{ *A.B.C.D|X\:X\:\:*</font><font color="#1d50a2">*X\:X*</font>

**\[Command]**
**show bfd peer \{** *A.B.C.D|X\:X\::X\:X* **} \[multihop| local-address| interface| json| counters]**
**\[Purpose]**
Display the specified BFD session information.

**\[Parameters]**

| **Parameter** | **Description**        |
| ------------- | ---------------------- |
| *A.B.C.D*     | IPv4 neighbor address. |
| *X\:X\::X\:X* | IPv6 neighbor address. |

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# show bfd peer 10.226.46.2 local-address 10.226.33.2 multihop
BFD Peer:
        peer 10.226.46.2 multihop local-address 10.226.33.2 vrf default
                ID: 1634016920
                Remote ID: 2927170466
                Passive mode
                Minimum TTL: 254
                Status: up
                Uptime: 3 minute(s), 56 second(s)
                Diagnostics: ok
                Remote diagnostics: ok
                Peer Type: configured
                Local timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo receive interval: 50ms
                        Echo transmission interval: disabled
                Remote timers:
                        Detect-multiplier: 3
                        Receive interval: 300ms
                        Transmission interval: 300ms
                        Echo receive interval: 50ms
```

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

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

**\[Purpose]**
Clear BFD session statistics.

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# clear bfd peers counters
```

### <font color="#1d50a2">clear bfd peer \{ *A.B.C.D|X\:X\:\:X\:X* \} \[multihop| local-address| interface\] counters</font>

**\[Command]**
**clear bfd peer** *\{ A.B.C.D|X\:X\::X\:X }* **\[multihop| local-address| interface] counters**

**\[Purpose]**
Clear the specified BFD session statistics.

**\[Parameters]**

| **Parameter** | **Description**        |
| ------------- | ---------------------- |
| *A.B.C.D*     | IPv4 neighbor address. |
| *X\:X\::X\:X* | IPv6 neighbor address. |

**\[View]**
Privileged User View

**\[Use Cases]**

```plaintext
sonic# clear bfd peer 10.226.46.2 multihop local-address 10.226.33.2 interface ethernet 0/81 counters
sonic#
```

## <font color="#1d50a2">BFD Config</font>

<font color="#1d05a2">Table 2 BFD Config</font>

| Command                                                                                             | Purpose                                                                                                        |
| --------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| **bfd**                                                                                             | Enter BFD Configuration View.                                                                                  |
| **peer** \{ *A.B.C.D\|X\:X\::X\:X* } \[**multihop\| local-address\| interface**]                    | Create a BFD peer, and enter BFD Peer Configuration View.                                                      |
| **profile** *profile\_name*                                                                         | Create a BFD configuration template, and enter BFD Profile Configuration View.                                 |
| **profile-accelerate** *profile\_name*                                                              | Create a hardware accelerated BFD configuration template, and enter BFD Profile-accelerate Configuration View. |
| **detect-multiplier** *detect-multiplier-value*                                                     | Set BFD detection times                                                                                        |
| **echo-mode**                                                                                       | Enable echo mode.                                                                                              |
| **echo** \{**transmit-interval** *interval* \| **receive-interval** \{*interval* **\| disabled**} } | Specify the transmit or receive interval of echo packets.                                                      |
| **echo-interval** *interval*                                                                        | Specify both the transmit and receive interval of echo packets.                                                |
| **passive-mode**                                                                                    | Set BFD to passive mode.                                                                                       |
| **receive-interval** *interval*                                                                     | Specify the receive interval of BFD control messages.                                                          |
| **transmit-interval** *interval*                                                                    | Specify the transmit interval of BFD control messages.                                                         |
| **shutdown**                                                                                        | Shutdown the BFD session.                                                                                      |
| **profile** *profile\_name*                                                                         | Use BFD profile settings.                                                                                      |

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

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

**\[Purpose]**
Enter BFD Configuration View.

**\[View]**
Global Configuration View

**\[Use Cases]**

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

### <font color="#1d50a2">peer \{ *A.B.C.D|X\:X\:\:X\:X* \} \[multihop| local-address| interface\]</font>

**\[Command]**
**peer \{** *A.B.C.D|X\:X\::X*:X **} \[multihop| local-address| interface]**
**\[Purpose]**
Create a BFD peer, and enter BFD Peer Configuration View.

**\[Parameters]**

| **Parameter** | **Description**        |
| ------------- | ---------------------- |
| *A.B.C.D*     | IPv4 neighbor address. |
| *X\:X\::X*:X  | IPv6 neighbor address. |

**\[View]**
BFD Configuration View

**\[Notes]**
Run command **no peer \{** *A.B.C.D|X\:X\::X*:X **} \[multihop| local-address| interface]** to delete BFD peer.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.46.2 multihop local-address 10.226.33.2
sonic(config-bfd-peer)#
```

### <font color="#1d50a2">profile *profile\_name*</font>

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

**\[Purpose]**
Create a BFD configuration template, and enter BFD Profile Configuration View.

**\[Parameters]**

| **Parameter**   | **Description**   |
| --------------- | ----------------- |
| *profile\_name* | BFD profile name. |

**\[View]**
BFD Configuration View

**\[Notes]**
Run command **no profile** *profile\_name* to delete the profile.

**\[Use Cases]**

```plaintext
sonic# configure termina
sonic(config)# bfd
sonic(config-bfd)# profile profile1
sonic(config-bfd-profile)#
```

### <font color="#1d50a2">profile-accelerate *profile\_name*</font>

&#x20;**\[Command]**
**profile-accelerate** *profile\_name*

**\[Purpose]**
Create a hardware accelerated BFD configuration template, and enter BFD Profile-accelerate Configuration View.

**\[Parameters]**

| **Parameter**   | **Description**   |
| --------------- | ----------------- |
| *profile\_name* | BFD profile name. |

**\[View]**
BFD Configuration View

**\[Notes]**
The distributed BFD feature is recommended when there is a requirement for the number of BFD sessions (more than 64) or when the detection accuracy is required to be high (the packet sending interval is less than 100ms).
Currently, only the physical Layer 3 ports on the CX308P-48Y-N-V2, CX532P-N-V2 and CX732Q-N-V2 support distributed BFD, and there are limitations on its use: multihop mode, echo mode and passive mode are not supported.
It supports at most 7 different local detection durations. There will be more than 7 different local detection durations in the following scenarios:

1. Only one profile-accelerate profile is configured on local system, but over 7 different session parameters are configured on remote system.
2. More than 8 profile-accelerate profiles is configured on local system and is bound to BFD sessions.
   The calculation method for local detection duration is as follows:
   Local actual receiving time interval = MAX \{local receive interval, remote transmission interval}
   Local detection duration= local actual receiving time interval x remote Detect-multiplier.
   It is not supported to work alone with at present, you can combine it with other protocol
3. Work with BGP.
   Run command **neighbor** \{*A.B.C.D|X\:X\::X*:&#x58;*|String*} **bfd profile** *profile\_name* in *BGP Configuration View*;
4. Work with OSPF/OSPFv3.
   Run command **ip ospf bfd profile** *profile\_name*/**ipv6 ospf6 bfd profile**  *profile\_name* in *Physical Interface Configuration View*.
   Run command **no profile-accelerate** *profile\_name* to delete the profile.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# bfd
sonic(config-bfd)# profile-accelerate profile1
sonic(config-bfd-profile-accelerate)#
```

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

**\[Command]**
**detect-multiplier** *detect-multiplier-value*

**\[Purpose]**
Set BFD detection times

**\[Parameters]**

| **Parameter**             | **Description**                                  |
| ------------------------- | ------------------------------------------------ |
| *detect-multiplier-value* | The default value is 3, and the range is 2\~255. |

**\[View]**
BFD Peer Configuration View / BFD Profile Configuration View / BFD Profile-accelerate Configuration View

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.46.2 multihop local-address 10.226.33.2
sonic(config-bfd-peer)# detect-multiplier 5
```

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

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

**\[Purpose]**
Enable echo mode.

**\[View]**
BFD Peer Configuration View / BFD Profile Configuration View

**\[Notes]**
The default is asynchronous mode.
Only single-hop BFD sessions can be configured as echo mode.
Run command **no echo-mode** to disable echo mode and restore to asynchronous mode.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.46.2
sonic(config-bfd-peer)# echo-mode
```

### <font color="#1d50a2">echo \{transmit-interval *interval*|receive-interval \{*interval*|disabled\}\}</font>

**\[Command]**
**echo** \{**transmit-interval** *interval*|**receive-interval** \{*interval*|**disabled**}}

**\[Purpose]**
Specify the transmit or receive interval of echo packets.

**\[Parameters]**

| **Parameter** | **Description**                                            |
| ------------- | ---------------------------------------------------------- |
| *interval*    | Specify the interval in msec, and the default value is 50. |

**\[View]**
BFD Peer Configuration View / BFD Profile Configuration View

**\[Notes]**
**echo receive-interval disabled** indicates not to receive echo packets.

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.33.1
sonic(config-bfd-peer)# echo transmit-interval 100
sonic(config-bfd-peer)# echo receive-interval 100
```

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

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

**\[Purpose]**
Specify both the transmit and receive interval of echo packets.

**\[Parameters]**

| **Parameter** | **Description**                                            |
| ------------- | ---------------------------------------------------------- |
| *interval*    | Specify the interval in msec, and the default value is 50. |

**\[View]**
BFD Peer Configuration View / BFD Profile Configuration View

**\[Use Cases]**

```plaintext
sonic# configure terminal
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.33.1
sonic(config-bfd-peer)# echo-interval 100
```

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

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

**\[Purpose]**
Set BFD to passive mode.

**\[View]**
BFD Peer Configuration View / BFD Profile Configuration View

**\[Notes]**
In passive mode, the switch does not attempt to start a session.
Run command **no passive-mode** to revert to active mode.

**\[Use Cases]**

```plaintext
sonic# configure termina
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.33.1
sonic(config-bfd-peer)# passive-mode
```

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

**\[Command]**
**receive-interval** *interval*

**\[Purpose]**
Specify the receive interval of BFD control messages.

**\[Parameters]**

| **Parameter** | **Description**                                             |
| ------------- | ----------------------------------------------------------- |
| *interval*    | Specify the interval in msec, and the default value is 300. |

**\[View]**
BFD Peer Configuration View / BFD Profile Configuration View / BFD Profile-accelerate Configuration View

**\[Notes]**
This configuration affects the local BFD session detection duration. Local BFD detection duration = peer detection multiplier \* MAX\{local receive interval, peer transmit interval}. The detection duration less than 100ms may cause BFD session flapping.

**\[Use Cases]**

```plaintext
sonic# configure termina
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.33.1
sonic(config-bfd-peer)# receive-interval 100
```

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

**\[Command]**
**transmit-interval** *interval*

**\[Purpose]**
Specify the transmit interval of BFD control messages.

**\[Parameters]**

| **Parameter** | **Description**                                             |
| ------------- | ----------------------------------------------------------- |
| *interval*    | Specify the interval in msec, and the default value is 300. |

**\[View]**
BFD Peer Configuration View / BFD Profile Configuration View / BFD Profile-accelerate Configuration View

**\[Notes]**
This configuration affects the local BFD session detection duration. Local BFD detection duration = peer detection multiplier \* MAX\{local receive interval, peer transmit interval}. The detection duration less than 100ms may cause BFD session flapping.

**\[Use Cases]**

```plaintext
sonic# configure termina
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.33.1
sonic(config-bfd-peer)# transmit-interval 100
```

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

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

**\[Purpose]**
Shutdown the BFD session.

**\[View]**
BFD Peer Configuration View / BFD Profile Configuration View / BFD Profile-accelerate Configuration View

**\[Notes]**
Run command **no shutdown** to start the BFD session.

**\[Use Cases]**

```plaintext
sonic# configure termina
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.33.1
sonic(config-bfd-peer)# shutdown
sonic(config-bfd-peer)#
```

### profile *profile\_name*

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

**\[Purpose]**
Use BFD profile settings

**\[Parameters]**

| **Parameter**   | **Description**   |
| --------------- | ----------------- |
| *profile\_name* | BFD profile name. |

**\[View]**
BFD Peer Configuration View

**\[Notes]**
Run command **no profile** *profile\_name* to unbind the profile.
When a BFD session is configured with parameters and a BFD Profile is bound, the parameters configured under the BFD Peer Configuration View take precedence.

**\[Use Cases]**

```plaintext
sonic# configure termina
sonic(config)# bfd
sonic(config-bfd)# peer 10.226.33.1
sonic(config-bfd-peer)# profile profile1
sonic(config-bfd-peer)# no profile profile1
```

