Command Line Reference
Reliability Configuration
21 min
bfd configuration 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 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 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 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 bfd \[command] bfd \[purpose] enter bfd configuration view \[view] system configuration view \[ use cases ] sonic(config)# bfd sonic(config bfd)# peer \[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)# bfd sonic(config bfd)# peer 30 11 13 1 interface ethernet 49 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)# 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 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 note 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 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)# bfd sonic(config bfd)# peer 30 11 13 1 sonic(config bfd peer)# echo mode 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)# bfd sonic(config bfd)# peer 30 11 13 1 sonic(config bfd peer)# echo mode sonic(config bfd peer)# echo interval 20 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)# bfd sonic(config bfd)# peer 30 11 13 1 sonic(config bfd peer)# minimum ttl 254 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)# bfd sonic(config bfd)# peer 30 11 13 1 sonic(config bfd peer)# passive mode 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)# bfd sonic(config bfd)# peer 30 11 13 1 sonic(config bfd peer)# receive interval 10 shutdown \[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 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)# bfd sonic(config bfd)# peer 30 11 13 1 sonic(config bfd peer)# transmit interval 20 monitor link configuration 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 10 sonic(config monitor link group 1)# 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 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
