Reliability Configuration
BFD Configuration
Section titled “BFD Configuration”show bfd peers
Section titled “show bfd peers”[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 briefSession count: 3SessionId LocalAddress PeerAddress Status========= ============ =========== ======3607940072 30.11.13.130 30.11.13.129 down3035614313 2022::9111 2022::9110 up1781668247 30.11.13.2 30.11.13.1 up
show bfd peers counters
Section titled “show bfd peers counters”[Command]
show bfd peers counters
clear bfd peers counters
[Purpose]
View BFD session statistics
[View]
System view
[Use Cases]
sonic# show bfd peers countersBFD Peers:peer 30.11.13.129 vrf default interface ethernet 50Control packet input: 300387 packetsControl packet output: 300181 packetsEcho packet input: 0 packetsEcho packet output: 0 packetsSession up events: 1Session down events: 1Zebra notifications: 3
[Command]
bfd
[Purpose]
Enter BFD configuration view
[View]
System configuration view
[Use Cases]
sonic(config)# bfdsonic(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]
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]
sonic(config)# bfdsonic(config-bfd)# peer 30.11.13.1 interface ethernet 49
profile
Section titled “profile”[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)# bfdsonic(config-bfd)# profile testsonic(config-bfd-profile)# detect-multiplier 3sonic(config-bfd-profile)# exitsonic(config-bfd)# peer 30.11.13.1sonic(config-bfd-peer)# profile test
detect-multiplier
Section titled “detect-multiplier”[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)# bfdsonic(config-bfd)# peer 30.11.13.1sonic(config-bfd-peer)# detect-multiplier 3
echo-mode
Section titled “echo-mode”[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)# bfdsonic(config-bfd)# peer 30.11.13.1sonic(config-bfd-peer)# echo mode
echo-interval
Section titled “echo-interval”[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)# bfdsonic(config-bfd)# peer 30.11.13.1sonic(config-bfd-peer)# echo modesonic(config-bfd-peer)# echo-interval 20
minimum-ttl
Section titled “minimum-ttl”[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)# bfdsonic(config-bfd)# peer 30.11.13.1sonic(config-bfd-peer)# minimum-ttl 254
passive-mode
Section titled “passive-mode”[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)# bfdsonic(config-bfd)# peer 30.11.13.1sonic(config-bfd-peer)# passive-mode
receive-interval
Section titled “receive-interval”[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)# bfdsonic(config-bfd)# peer 30.11.13.1sonic(config-bfd-peer)# receive-interval 10
shutdown
Section titled “shutdown”[Command]
shutdown
no shutdown
[Purpose]
Abort BFD session detection
[View]
BFD-peer view, BFD-profile view
[Use Cases]
sonic(config)# bfdsonic(config-bfd)# peer 30.11.13.1sonic(config-bfd-peer)# shutdown
transmit-interval
Section titled “transmit-interval”[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)# bfdsonic(config-bfd)# peer 30.11.13.1sonic(config-bfd-peer)# transmit-interval 20
Monitor Link Configuration
Section titled “Monitor Link Configuration”show monitor-link
Section titled “show monitor-link”[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 |+--------------+---------+------------------+--------------------+
monitor-link-group
Section titled “monitor-link-group”[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 10sonic(config-monitor-link-group-1)#
monitor link
Section titled “monitor link”[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 10sonic(config)# port-group ethernet 1-10sonic(config-port-group-1-10)# monitor-link test downlinksonic(config)# interface ethernet 49sonic(config-if-49)# monitor-link test uplink
VRRP Configuration
Section titled “VRRP Configuration”show vrrp interface
Section titled “show vrrp interface”[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 1Virtual Router ID 1Protocol Version 3Autoconfigured NoShutdown NoInterface Vlan10VRRP interface (v4) vrrp4-1-1VRRP interface (v6) NonePrimary IP (v4) 10.1.1.1Primary IP (v6) ::Virtual MAC (v4) 00:00:5e:00:01:01Virtual MAC (v6) 00:00:5e:00:02:01Status (v4) MasterStatus (v6) InitializePriority 100Effective Priority (v4) 100Effective Priority (v6) 100Preempt Mode YesAccept Mode YesAdvertisement Interval 1500 msMaster Advertisement Interval (v4) 1500 msMaster Advertisement Interval (v6) 0 msAdvertisements Tx (v4) 2546Advertisements Tx (v6) 0Advertisements Rx (v4) 892Advertisements Rx (v6) 0Gratuitous ARP Tx (v4) 2Neigh. Adverts Tx (v6) 0State transitions (v4) 4State transitions (v6) 0Skew Time (v4) 910 msSkew Time (v6) 0 msMaster Down Interval (v4) 5410 msMaster Down Interval (v6) 0 msIPv4 Addresses 1.................................. 10.1.1.11IPv6 Addresses 0
show vrrp summary
Section titled “show vrrp summary”[Command]
show vrrp summary
[Purpose]
View VRRP backup group information
[View]
System view
[Use Cases]
sonic# show vrrp summaryInterface VRID Priority IPv4 IPv6 State (v4) State (v6)----------------------------------------------------------------------Vlan10 1 150 1 1 Master MasterVlan10 2 30 1 1 Backup Backup
vrrp ID [version ID]
Section titled “vrrp ID [version ID]”[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 1sonic(config-if-1)# vrrp 1 version 2
vrrp ID priority VALUE
Section titled “vrrp ID priority VALUE”[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 1sonic(config-if-1)# vrrp 1 priority 20
vrrp ID advertisement-interval VALUE
Section titled “vrrp ID advertisement-interval VALUE”[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 1sonic(config-if-1)# vrrp 1 advertisement-interval 2500
vrrp ID ip A.B.C.D
Section titled “vrrp ID ip A.B.C.D”[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 1sonic(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
vrrp ID preempt
Section titled “vrrp ID preempt”[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
vrrp ID shutdown
Section titled “vrrp ID shutdown”[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 1sonic(config-if-1)# vrrp shutdown
vrrp default
Section titled “vrrp default”[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