跳转到内容
Ask AI

BFD

此内容尚不支持你的语言。

Table 1 BFD View

CommandPurpose
**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 countersClear BFD session statistics.
clear bfd peer {A.B.C.D|X:X::X:X} [multihop|local-address|interface] countersClear the specified BFD session statistics.

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

[Purpose] Display BFD session information.

[Options]

OptionDescription
briefDisplay abbreviated BFD information.
jsonDisplay in json format.
countersDisplay BFD statistics.

[View] Privileged User View

[Use Cases]

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

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

ParameterDescription
A.B.C.DIPv4 neighbor address.
X:X::X:XIPv6 neighbor address.

[View] Privileged User View

[Use Cases]

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

[Command] clear bfd peers counters

[Purpose] Clear BFD session statistics.

[View] Privileged User View

[Use Cases]

sonic# clear bfd peers counters

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

ParameterDescription
A.B.C.DIPv4 neighbor address.
X:X::X:XIPv6 neighbor address.

[View] Privileged User View

[Use Cases]

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

Table 2 BFD Config

CommandPurpose
bfdEnter 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_nameCreate a BFD configuration template, and enter BFD Profile Configuration View.
profile-accelerate profile_nameCreate a hardware accelerated BFD configuration template, and enter BFD Profile-accelerate Configuration View.
detect-multiplier detect-multiplier-valueSet BFD detection times
echo-modeEnable echo mode.
echo {transmit-interval interval | receive-interval {interval | disabled} }Specify the transmit or receive interval of echo packets.
echo-interval intervalSpecify both the transmit and receive interval of echo packets.
passive-modeSet BFD to passive mode.
receive-interval intervalSpecify the receive interval of BFD control messages.
transmit-interval intervalSpecify the transmit interval of BFD control messages.
shutdownShutdown the BFD session.
profile profile_nameUse BFD profile settings.

[Command] bfd

[Purpose] Enter BFD Configuration View.

[View] Global Configuration View

[Use Cases]

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

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

ParameterDescription
A.B.C.DIPv4 neighbor address.
X:X::X:XIPv6 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]

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)#

[Command] profile profile_name

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

[Parameters]

ParameterDescription
profile_nameBFD profile name.

[View] BFD Configuration View

[Notes] Run command no profile profile_name to delete the profile.

[Use Cases]

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

[Command] profile-accelerate profile_name

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

[Parameters]

ParameterDescription
profile_nameBFD 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:X*|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]

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

[Command] detect-multiplier detect-multiplier-value

[Purpose] Set BFD detection times

[Parameters]

ParameterDescription
detect-multiplier-valueThe 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]

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

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

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

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

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

[Parameters]

ParameterDescription
intervalSpecify 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]

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

[Command] echo-interval interval

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

[Parameters]

ParameterDescription
intervalSpecify the interval in msec, and the default value is 50.

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

[Use Cases]

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

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

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

[Command] receive-interval interval

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

[Parameters]

ParameterDescription
intervalSpecify 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]

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

[Command] transmit-interval interval

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

[Parameters]

ParameterDescription
intervalSpecify 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]

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

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

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

[Command] profile profile_name

[Purpose] Use BFD profile settings

[Parameters]

ParameterDescription
profile_nameBFD 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]

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