BFD
此内容尚不支持你的语言。
Table 1 BFD View
| Command | Purpose |
|---|---|
| **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 counters | Clear BFD session statistics. |
| clear bfd peer {A.B.C.D|X:X::X:X} [multihop|local-address|interface] counters | Clear the specified BFD session statistics. |
show bfd peers [
Section titled “show bfd peers [”[Command] **show bfd peers ** [OPTIONs]
[Purpose] Display BFD session information.
[Options]
| Option | Description |
|---|---|
| brief | Display abbreviated BFD information. |
| json | Display in json format. |
| counters | Display BFD statistics. |
[View] Privileged User View
[Use Cases]
sonic# show bfd peersBFD 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: 50mssonic# show bfd peers briefSession count: 2SessionId LocalAddress PeerAddress Status========= ============ =========== ======1634016920 10.226.33.2 10.226.46.2 up2943610781 2000:226:33::2 2000:226:46::2 admin-downsonic# show bfd peers countersBFD 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: 1show bfd peer { X:X
Section titled “show bfd peer { X:X”[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]
| Parameter | Description |
|---|---|
| A.B.C.D | IPv4 neighbor address. |
| X:X::X:X | IPv6 neighbor address. |
[View] Privileged User View
[Use Cases]
sonic# show bfd peer 10.226.46.2 local-address 10.226.33.2 multihopBFD 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: 50msclear bfd peers counters
Section titled “clear bfd peers counters”[Command] clear bfd peers counters
[Purpose] Clear BFD session statistics.
[View] Privileged User View
[Use Cases]
sonic# clear bfd peers countersclear bfd peer {
Section titled “clear bfd peer {”[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]
| Parameter | Description |
|---|---|
| A.B.C.D | IPv4 neighbor address. |
| X:X::X:X | IPv6 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 counterssonic#BFD Config
Section titled “BFD Config”Table 2 BFD Config
| Command | Purpose |
|---|---|
| bfd | Enter 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_name | Create a BFD configuration template, and enter BFD Profile Configuration View. |
| profile-accelerate profile_name | Create a hardware accelerated BFD configuration template, and enter BFD Profile-accelerate Configuration View. |
| detect-multiplier detect-multiplier-value | Set BFD detection times |
| echo-mode | Enable echo mode. |
| echo {transmit-interval interval | receive-interval {interval | disabled} } | Specify the transmit or receive interval of echo packets. |
| echo-interval interval | Specify both the transmit and receive interval of echo packets. |
| passive-mode | Set BFD to passive mode. |
| receive-interval interval | Specify the receive interval of BFD control messages. |
| transmit-interval interval | Specify the transmit interval of BFD control messages. |
| shutdown | Shutdown the BFD session. |
| profile profile_name | Use BFD profile settings. |
[Command] bfd
[Purpose] Enter BFD Configuration View.
[View] Global Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# bfdsonic(config-bfd)#peer {
Section titled “peer {”[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]
| Parameter | Description |
|---|---|
| A.B.C.D | IPv4 neighbor address. |
| X:X::X:X | IPv6 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 terminalsonic(config)# bfdsonic(config-bfd)# peer 10.226.46.2 multihop local-address 10.226.33.2sonic(config-bfd-peer)#profile
Section titled “profile”[Command] profile profile_name
[Purpose] Create a BFD configuration template, and enter BFD Profile Configuration View.
[Parameters]
| Parameter | Description |
|---|---|
| profile_name | BFD profile name. |
[View] BFD Configuration View
[Notes] Run command no profile profile_name to delete the profile.
[Use Cases]
sonic# configure terminasonic(config)# bfdsonic(config-bfd)# profile profile1sonic(config-bfd-profile)#profile-accelerate
Section titled “profile-accelerate”[Command] profile-accelerate profile_name
[Purpose] Create a hardware accelerated BFD configuration template, and enter BFD Profile-accelerate Configuration View.
[Parameters]
| Parameter | Description |
|---|---|
| profile_name | BFD 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:
- Only one profile-accelerate profile is configured on local system, but over 7 different session parameters are configured on remote system.
- 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
- Work with BGP. Run command neighbor {A.B.C.D|X:X::X:X*|String*} bfd profile profile_name in BGP Configuration View;
- 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 terminalsonic(config)# bfdsonic(config-bfd)# profile-accelerate profile1sonic(config-bfd-profile-accelerate)#detect-multiplier
Section titled “detect-multiplier”[Command] detect-multiplier detect-multiplier-value
[Purpose] Set BFD detection times
[Parameters]
| Parameter | Description |
|---|---|
| detect-multiplier-value | The 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 terminalsonic(config)# bfdsonic(config-bfd)# peer 10.226.46.2 multihop local-address 10.226.33.2sonic(config-bfd-peer)# detect-multiplier 5echo-mode
Section titled “echo-mode”[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 terminalsonic(config)# bfdsonic(config-bfd)# peer 10.226.46.2sonic(config-bfd-peer)# echo-modeecho {transmit-interval
Section titled “echo {transmit-interval”[Command] echo {transmit-interval interval|receive-interval {interval|disabled}}
[Purpose] Specify the transmit or receive interval of echo packets.
[Parameters]
| Parameter | Description |
|---|---|
| interval | Specify 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 terminalsonic(config)# bfdsonic(config-bfd)# peer 10.226.33.1sonic(config-bfd-peer)# echo transmit-interval 100sonic(config-bfd-peer)# echo receive-interval 100echo-interval
Section titled “echo-interval”[Command] echo-interval interval
[Purpose] Specify both the transmit and receive interval of echo packets.
[Parameters]
| Parameter | Description |
|---|---|
| interval | Specify the interval in msec, and the default value is 50. |
[View] BFD Peer Configuration View / BFD Profile Configuration View
[Use Cases]
sonic# configure terminalsonic(config)# bfdsonic(config-bfd)# peer 10.226.33.1sonic(config-bfd-peer)# echo-interval 100passive-mode
Section titled “passive-mode”[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 terminasonic(config)# bfdsonic(config-bfd)# peer 10.226.33.1sonic(config-bfd-peer)# passive-modereceive-interval
Section titled “receive-interval”[Command] receive-interval interval
[Purpose] Specify the receive interval of BFD control messages.
[Parameters]
| Parameter | Description |
|---|---|
| interval | Specify 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 terminasonic(config)# bfdsonic(config-bfd)# peer 10.226.33.1sonic(config-bfd-peer)# receive-interval 100transmit-interval
Section titled “transmit-interval”[Command] transmit-interval interval
[Purpose] Specify the transmit interval of BFD control messages.
[Parameters]
| Parameter | Description |
|---|---|
| interval | Specify 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 terminasonic(config)# bfdsonic(config-bfd)# peer 10.226.33.1sonic(config-bfd-peer)# transmit-interval 100shutdown
Section titled “shutdown”[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 terminasonic(config)# bfdsonic(config-bfd)# peer 10.226.33.1sonic(config-bfd-peer)# shutdownsonic(config-bfd-peer)#profile profile_name
Section titled “profile profile_name”[Command] profile profile_name
[Purpose] Use BFD profile settings
[Parameters]
| Parameter | Description |
|---|---|
| profile_name | BFD 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 terminasonic(config)# bfdsonic(config-bfd)# peer 10.226.33.1sonic(config-bfd-peer)# profile profile1sonic(config-bfd-peer)# no profile profile1