Reliability Configuration
BFD Configuration
Section titled “BFD Configuration”show bfd peers
Section titled “show bfd peers”[Command]
show bfd peer
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 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
show bfd peers log-info
Section titled “show bfd peers log-info”[Command]
show bfd peers log-info
[Purpose]
View the BFD status.
[View]
System view
[Use Cases]
sonic# show bfd peers log-info--------------------------------------------------Local address : 1.1.1.2Peer address : 1.1.1.1Date/Time : 2024-12-09 09:00:43State : UpDate/Time : 2024-12-09 09:00:23State : DownDown reason : administratively downDate/Time : 2024-12-09 08:52:45State : Up
[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 [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]
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]
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]
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]
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]
Parameter | Description |
---|---|
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]
Parameter | Description |
---|---|
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]
Parameter | Description |
---|---|
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]
Parameter | Description |
---|---|
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
VRRP Configuration
Section titled “VRRP Configuration”show vrrp interface
Section titled “show vrrp interface”[Command]
show vrrp [ ID**] [interface {vlan ** vlan_id**|ethernet ** interface_num**|link-aggregation ** lag_id**}]**
show vrrp
[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
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 Master Vlan10 2 30 1 1 Backup Backup
show vrrp default
Section titled “show vrrp default”[Command]
show vrrp default
[Purpose]
View default configuration for VRRP backup group
[View]
System view
[Use Cases]
sonic# show vrrp defaultadvertisement-interval Preempt mode Priority shutdown -------------------------------------------------------------- 1000 true 100 false
[Command]
**vrrp ** vrrp_ID **[version ** version_ID]
[Purpose]
Create a VRRP backup group and specify the VRRP version.
[View]
Interface view
[Parameter]
Parameter | Description |
---|---|
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 priority
Section titled “vrrp priority”[Command]
**vrrp ** ID **priority ** value
[Purpose]
Configure the priority of the device in the VRRP backup group
[View]
Interface view
[Parameter]
Parameter | Description |
---|---|
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 advertisement-interval
Section titled “vrrp advertisement-interval”[Command]
**vrrp ** ID **advertisement-interval ** value
[Purpose]
Configure the interval for sending VRRP advertisement packets
[View]
Interface view
[Parameter]
Parameter | Description |
---|---|
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 ip A.B.C.D
Section titled “vrrp ip A.B.C.D”[Command]
**vrrp 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
Section titled “vrrp ip send-gratuitous-arp interval”[Command]
**vrrp ip send-gratuitous-arp interval ** value
[Purpose]
Configure the interval for Master to send gratuitous ARP packets
[Parameter]
Parameter | Description |
---|---|
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 preempt
Section titled “vrrp preempt”[Command]
vrrp ID preempt
[Purpose]
Configure the switch in VRRP backup group with preempt mode
[Parameter]
Parameter | Description |
---|---|
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 shutdown
Section titled “vrrp 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 ** interval|preempt|priotiry ** value**|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
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 ** name monitor_delay_time
no monitor-link-group
[Purpose]
Create interface linkage groups
[Parameter]
Parameter | Description |
---|---|
name | Linkage Group Name |
monitor_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
[Purpose]
Add the interface to the linkage group and specify the interface as uplink or downlink
[Parameter]
Parameter | Description |
---|---|
mode | Uplink: refers to the interface that connects to upstream devicesDownlink: 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
show sla brief
Section titled “show sla brief”[Command]
show sla brief
[Purpose]
Display the information about SLA
[View]
System view
[Use Cases]
sonic# show sla brief===================================icmp_echo==================================== Sla_id type dst_ip min_time avg_time max_time packt_loss-------- --------- ----------- ---------- ---------- ---------- ------------ 1 icmp_echo 150.1.0.2 0.63 0.762 0.857 0%==================================user_define===================================Sla_id type dst_ip customer_file_path-------- ------ -------- --------------------
[Command]
sla ** ID icmp-echo dst-ip { A.B.C.D|A::B} [src-port ** interface_type interface_name**] [timeout ** time**] [frequency ** interval**]**
[Purpose]
Configure SLA
[Parameter]
Parameter | Description |
---|---|
ID | SLA instance ID |
A.B.C.D|A::B | The IP address monitored by the SLA instance |
interface_type interface_name | Specifies the source of the probe packet |
time | The probe timeout waiting timeout range is 1-3600, the unit is s, and the default value is 5 |
interval | The detection packet transmission interval, the value range: 1-3600, the unit: s, the default value is 5 |
[View]
System configure view
[Usage Scenario]
Configure SLA (Service Level Agreement) to measure network performance and reliability. By sending ICMP (Internet Control Message Protocol) request packets to a specified IP address, it probes whether the IP address is reachable. This helps network administrators determine the optimal data transmission path.
[Use Cases]
sonic(config)# sla 1 icmp-echo dst-ip 150.1.0.2 src-port ethernet 49
show track brief
Section titled “show track brief”[Command]
show track brief
[Purpose]
View the track routing monitoring group information
[View]
System view
[Use Cases]
sonic# show track brief Track_id bind_sla_id state---------- ------------- ------- 1 2 success
[Command]
**track ** ID
[Purpose]
Create a track monitoring group
[Parameter]
Parameter | Description |
---|---|
ID | Instance ID,the range value:1-65535 |
[View]
System configuration view
[Usage Scenario]
Create a track monitoring instance to establish coordination between static routing and SLA. When SLA detects that the next-hop address of a static route is unreachable, it notifies the static route to remove that route through the track feature. This ensures that packets are no longer forwarded through that route. When SLA detects the recovery of the next-hop address, the static route is automatically restored.
[Use Cases]
sonic(config)# track 1sonic(config-track-1)#
[Command]
route ** A.B.C.D/M A.B.C.D [ vrf_name]
route6 ** X:X::X:X/M X:X::X:X [ vrf_name]
no route ** A.B.C.D/M A.B.C.D [ vrf_name]**
[Purpose]
Add a monitoring route to a route monitoring group
[Parameter]
Parameter | Description |
---|---|
A.B.C.D/M | Specifies the destination address of the route |
A.B.C.D | Specifies the nexthop address of the route |
vrf_name | Specifies the vrf of the route |
[View]
Track view
[Use Cases]
sonic(config)# track 1sonic(config-track-1)# route 1.1.1.1/24 2.1.1.1
[Command]
**sla ** ID
no sla
[Purpose]
Bind an SLA route monitoring group
[View]
Track view
[Use Cases]
sonic(config)# track 1sonic(config-track-1)# sla 1
IP-Conflict Configuration
Section titled “IP-Conflict Configuration”show ip-conflict detect config
Section titled “show ip-conflict detect config”[Command]
show ip-conflict detect config
[Purpose]
Display the IP address conflict detection configuration
[View]
System view
[Use Cases]
sonic# show ip-conflict detect configenabled:truemax-records:2000+-------------+| INTERFACE |+=============+| Ethernet1 |+-------------+| Ethernet11 |+-------------+
show ip-conflict detect status
Section titled “show ip-conflict detect status”[Command]
show ip-conflict detect status
[Purpose]
Display the IP address conflict detection entries
[View]
System view
[Use Cases]
sonic# show ip-conflict detect status+-------------+-----------+-------------------+-------------------+---------------------+| INTERFACE | Self-IP | Self-MAC | Conflict-MAC | TIMESTAMP |+=============+===========+===================+===================+=====================+| Ethernet1 | 10.1.1.1 | 86:15:7D:DC:3D:86 | 00:00:02:01:01:04 | 2024-09-02 11:06:46 || | | | 00:00:02:01:01:02 | 2024-09-02 10:59:54 |+-------------+-----------+-------------------+-------------------+---------------------+| Ethernet11 | 20.1.1.1 | 86:15:7D:DC:3D:86 | 60:EB:5A:01:10:CB | 2024-09-02 11:05:10 |+-------------+-----------+-------------------+-------------------+---------------------++-------------+------------+-------------+----------------+-------------+| INTERFACE | Neigh-IP | Neigh-MAC | Conflict-MAC | TIMESTAMP |+=============+============+=============+================+=============+
show ip-conflict detect status This command display description table
Fields | Description |
---|---|
Self-IP | Displays the IP address that is in conflict on the interface |
self-MAC | Shows the MAC address corresponding to the conflicting IP address on the device |
Conflict-MAC | Displays the MAC address associated with the conflicting IP address. |
TIMESTAMP | Indicates the time when the conflict was detected |
Neigh-IP | Shows the IP address of the neighbor entry that is in conflict |
Neighbor-MAC | Displays the MAC address recorded in the ARP table for the conflicting IP address before the conflict |
ip-conflict detect enable
Section titled “ip-conflict detect enable”[Command]
ip-conflict detect enable
[Purpose]
Enable IP address conflict detection; it is disabled by default
[View]
System configuration view
[Usage Scenario]
In scenarios where devices in a network experience IP address conflicts, this can lead to frequent oscillations in ARP and routing table entries, significantly impacting business operations. To mitigate the effects of such conflicts, enabling IP address conflict detection helps log these events as alerts. This allows administrators to quickly identify and address the issues, minimizing disruption to network services and improving overall stability.
[Notes]
After enabling the global IP address conflict detection feature, you also need to enable IP address conflict detection at the interface and VLAN view.
If there is an IP conflict on an interface, the device will continue to use that IP address, log a warning message to syslog, and record it in the address conflict table, while responding to gratuitous ARP or NA messages.
If there is a neighbor table conflict, a warning message will be logged to syslog, and it will be recorded in the address conflict table.
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# ip-conflict detect enable
ip-conflict detect max-records
Section titled “ip-conflict detect max-records”[Command]
**ip-conflict detect max-records ** number
[Purpose]
Configure the global conflict record limit
[Parameter]
Parameter | Description |
---|---|
number | default 2000.the range value:1..20000 |
[View]
System configuration view
[Notes]
The default maximum number of IP addresses is 2000, with each IP corresponding to 10 MAC addresses. If the limit is exceeded, the oldest entries will be overwritten.
[Use Cases]
sonic(config)# ip-conflict detect max-records 20
ip-conflict detect reset
Section titled “ip-conflict detect reset”[Command]
ip-conflict detect reset
[Purpose]
Forcefully clear all IP conflict detection records
[View]
System configuration view
[Notes]
When deleting a Layer 3 interface or IP address, the associated conflict record entries will also be deleted
[Use Cases]
sonic(config)# ip-conflict detect reset