Skip to content

Reliability Configuration

[Command]

show bfd peer ip-address

show bfd peers

show bfd peers brief

[Purpose]

View BFD session information

[View]

System view

[Use Cases]

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

[Command]

show bfd peers counters

clear bfd peers counters

[Purpose]

View BFD session statistics

[View]

System view

[Use Cases]

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

[Command]

bfd

[Purpose]

Enter BFD configuration view

[View]

System configuration view

[Use Cases]

sonic(config)# bfd
sonic(config-bfd)#

[Command]

peer ip-address [{multihop|local-address ip-address|interface interface-type interface-name}]

no peer ip-address [{multihop|local-address ip-address|interface interface-type interface-name}]

[Purpose]

Create BFD session binding information and enter BFD-peer view

[Parameter]

ParameterDescription
ip-addressIP address of the counterpart to which the BFD session is bound
multihopSpecify 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]

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

[Command]

profile profile-name

no profile profile-name

[Purpose]

Configure BFD policy group/bind specified policy group to peer

[Parameter]

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]

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

[Command]

detect-multiplier value

[Purpose]

Local detection multiplier for BFD sessions

[Parameter]

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]

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

[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]

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

[Command]

echo-interval value

[Purpose]

Configure the minimum reception interval of BFD packets for the single-arm echo function

[Parameter]

value Value range: 10-60000, unit: ms

[View]

BFD-peer view, BFD-profile view

[Use Cases]

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

[Command]

minimum-ttl value

[Purpose]

Configure the survival time of BFD packets

[Parameter]

value Value range: 1-254

[View]

BFD-peer view, BFD-profile view

[Use Cases]

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

[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]

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

[Command]

receive-interval value

[Purpose]

Configure the reception interval of BFD packets

[Parameter]

value Value range: 10-60000, unit: ms

[View]

BFD-peer view, BFD-profile view

[Use Cases]

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

[Command]

shutdown

no shutdown

[Purpose]

Abort BFD session detection

[View]

BFD-peer view, BFD-profile view

[Use Cases]

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

[Command]

transmit-interval value

[Purpose]

Configure the sending interval of BFD packets

[Parameter]

value Value range: 10-60000, unit: ms

[View]

BFD-peer view, BFD-profile view

[Use Cases]

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

[Command]

show monitor-link

[Purpose]

View interface linkage group configuration

[View]

System view

[Use Cases]

sonic# show monitor-link
+--------------+---------+------------------+--------------------+
| Group Name | Delay | Uplink Members | Downlink Members |
+==============+=========+==================+====================+
| 1 | 10 | Ethernet49 | Ethernet19 |
| | | Ethernet50 | Ethernet20 |
+--------------+---------+------------------+--------------------+

[Command]

monitor-link-group group-id delay-time

no monitor-link-group group-id

[Purpose]

Create interface linkage groups

[Parameter]

group-id Linkage Group ID

delay-time Delayed response time, uplink UP wait for delay time before downlink UP

[View]

System configuration view

[Usage Scenario]

The interface bundling group synchronizes the monitoring of the upstream link to make corresponding settings on the downstream link. This ensures that faults in the upstream link are quickly communicated to the downstream devices, thereby triggering actions to prevent prolonged traffic loss due to upstream link failures.

[Use Cases]

sonic(config)# monitor-link-group 1 10
sonic(config-monitor-link-group-1)#

[Command]

monitor-link group-name mode

no monitor-link group-name

[Purpose]

Add the interface to the linkage group and specify the interface as uplink or downlink

[Parameter]

mode Uplink refers to the interface that connects to upstream devices

Downlink refers to the interface that connects to downstream devices, typically user terminals

[View]

Interface view

[Use Cases]

sonic(config)# monitor-link-group test 10
sonic(config)# port-group ethernet 1-10
sonic(config-port-group-1-10)# monitor-link test downlink
sonic(config)# interface ethernet 49
sonic(config-if-49)# monitor-link test uplink

[Command]

show vrrp interface {vlan|ethernet|link-aggregation ID}

show vrrp ID

[Purpose]

View detailed information about the VRRP backup group

[View]

System view

[Use Cases]

sonic# show vrrp 1
Virtual Router ID 1
Protocol Version 3
Autoconfigured No
Shutdown No
Interface Vlan10
VRRP interface (v4) vrrp4-1-1
VRRP interface (v6) None
Primary IP (v4) 10.1.1.1
Primary IP (v6) ::
Virtual MAC (v4) 00:00:5e:00:01:01
Virtual MAC (v6) 00:00:5e:00:02:01
Status (v4) Master
Status (v6) Initialize
Priority 100
Effective Priority (v4) 100
Effective Priority (v6) 100
Preempt Mode Yes
Accept Mode Yes
Advertisement Interval 1500 ms
Master Advertisement Interval (v4) 1500 ms
Master Advertisement Interval (v6) 0 ms
Advertisements Tx (v4) 2546
Advertisements Tx (v6) 0
Advertisements Rx (v4) 892
Advertisements Rx (v6) 0
Gratuitous ARP Tx (v4) 2
Neigh. Adverts Tx (v6) 0
State transitions (v4) 4
State transitions (v6) 0
Skew Time (v4) 910 ms
Skew Time (v6) 0 ms
Master Down Interval (v4) 5410 ms
Master Down Interval (v6) 0 ms
IPv4 Addresses 1
.................................. 10.1.1.11
IPv6 Addresses 0

[Command]

show vrrp summary

[Purpose]

View VRRP backup group information

[View]

System view

[Use Cases]

sonic# show vrrp summary
Interface VRID Priority IPv4 IPv6 State (v4) State (v6)
----------------------------------------------------------------------
Vlan10 1 150 1 1 Master Master
Vlan10 2 30 1 1 Backup Backup

[Command]

vrrp ID [version ID]

[Purpose]

Create a VRRP backup group and specify the VRRP version.

[View]

Interface view

[Parameter]

vrrp <ID> The range of value is: 1-255

version <ID> The default value is 3

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# vrrp 1 version 2

[Command]

vrrp ID priority VALUE

[Purpose]

Configure the priority of the device in the VRRP backup group

[View]

Interface view

[Parameter]

priority <VALUE> The range of value is: 1-254, the default value is:100. Higher numbers indicate higher priority.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# vrrp 1 priority 20

[Command]

vrrp ID advertisement-interval VALUE

[Purpose]

Configure the interval for sending VRRP advertisement packets

[View]

Interface view

[Parameter]

VALUE “The range is from 10 to 40950 milliseconds, default value is 1000 milliseconds

[Usage Scenario]

The master device periodically sends VRRP advertisement packets to the backup devices within the group to notify them of its normal operation. If a backup device does not receive VRRP advertisement packets even after the Master_Down_Interval timer expires, a new master will be elected.

When the master device voluntarily relinquishes its master status (such as when it leaves the backup group), it sends an advertisement packet with a priority of 0. This triggers a fast transition of the backup device to become the master, without waiting for the Master_Down_Interval timer to expire. The time taken for this transition is known as the Skew time, calculated as (256 - priority of the backup device) / 256, in centiseconds.

When the master device encounters a network failure and cannot send advertisement packets, the backup device cannot immediately determine its working status. Only after the Master_Down_Interval timer expires will the backup device consider the master device as unable to function normally and switch its status to master. The Master_Down_Interval timer is set to 3×Advertisement_Interval + Skew_time, in centiseconds.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# vrrp 1 advertisement-interval 2500

[Command]

vrrp ID ip A.B.C.D

[Purpose]

Create a VRRP backup group and assign a virtual IP address to the backup group

[View]

Interface view

[Usage Scenario]

VRRP allows multiple devices to form a virtual switch without changing the network topology. By configuring the virtual switch as the gateway, it provides gateway redundancy

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# vrrp 1 ip 192.168.0.1

vrrp ip send-gratuitous-arp interval value

Section titled “vrrp ip send-gratuitous-arp interval value”

[Command]

vrrp ip send-gratuitous-arp interval value

[Purpose]

Configure the interval for Master to send gratuitous ARP packets

[Parameter]

VALUE Interval,The range is from 10 to 600

[View]

System view

[Usage Scenario]

In a VRRP backup group, to ensure the MAC table entries on downstream switches are correct, the Master device periodically sends gratuitous ARP packets to refresh the MAC address table entries on the downstream switches

[Use Cases]

sonic(config)# vrrp ip send-gratuitous-arp interval 150

[Command]

vrrp id preempt

[Purpose]

Configure the switch in VRRP backup group with preempt mode

[Parameter]

ID The range is from 1 to 255

[View]

VLAN view

[Usage Scenario]

In an unstable network, the backup device may not always receive VRRP packets promptly, causing frequent VRRP state changes and network oscillations. To enhance the stability of the active/standby state, the user configures the switch in VRRP backup group with preempt mode

[Use Cases]

sonic(config-vlanif-10)# vrrp 1 preempt

[Command]

vrrp shutdown

[Purpose]

Configure the criteria for this backup group to withdraw from the VRRP election

[View]

Interface view

[Usage Scenario]

Configure the criteria for this backup group to withdraw from the VRRP election and set the interface’s VRRP state to ‘initial’.

[Use Cases]

sonic(config)# interface ethernet 1
sonic(config-if-1)# vrrp shutdown

[Command]

vrrp default advertisement-interval VALUE

vrrp default preempt

vrrp default priotiry VALUE

vrrp default shutdown

[Purpose]

Configure default values for VRRP parameters

[View]

System configuration view

[Usage Scenario]

In the system configuration view, configure default information for VRRP backup groups. Once configured, all backup groups can use this configuration as default. If a backup group specifies specific parameters, those will take precedence over the default configuration.

[Use Cases]

sonic(config)# vrrp default priotiry 10