BFD
Manage BFD endpoints
- BFD
Manage BFD (Bidirectional Forwarding Detection) endpoints in the switch. The BFD sessions are run by a BFD application on the switch’s embedded microcontroller. Type keywords in full; abbreviations are not accepted. An unknown sub-command prints
Invalid BFD subcommand: <word>.On a SONiC Trident 3 switch the BFD module is not set up, and the commands fail with
Command failed. Feature unavailablefollowed byFailed to execute the diagnostic command. Error: Operation failed.(bcmcmdstill exits 0). SONiC runs BFD in software on the host, not through this module.The built-in help does not match the shell for
endpoint addandendpoint update. The help shows[V6] [IP=<val>], but there is noIPkey. Give the source and destination addresses as numbers withSIP=andDIP=.V6takes a value (V6=1), and an MPLS label can be given withLABEL=.IP=…is rejected withInvalid option: …. All values are plain numbers.endpoint showandtraceare read-only.initandendpoint add|update|deletechange BFD state in the switch. Do not runbfd initon a switch whose SAI uses BFD offload.- BFD init
Initialise the BFD module. Prints
BFD module initialized..Unvalidated
drivshell> bfd init
- BFD endpoint add [ID=<id>] [GPORT=<n>] [TYPE=<n>] [VRF=<n>] INTPRI=<n> [CPUPRI=<n>] [DISCRIMINATOR=<n>] [V6=<0|1>] [SIP=<n>] [DIP=<n>] [LABEL=<n>]
Create an endpoint, with the given
IDif one is given.GPORTis a local port number.TYPEis the numeric BFD encapsulation type.INTPRIis required (An internal priority is required.). On success the shell printsBFD endpoint <id> created..BFD endpoint updatetakes the same keys, withIDnaming the endpoint to change.Unvalidated
drivshell> bfd endpoint add GPORT=1 TYPE=1 INTPRI=0 DISCRIMINATOR=100 SIP=0x0a000001 DIP=0x0a000002
- BFD endpoint delete ID=<id>
Delete an endpoint.
Unvalidated
drivshell> bfd endpoint delete ID=1
- BFD endpoint show [ID=<id>]
Show one endpoint.
bfd endpointwith nothing after it does the same. GiveID; without it no endpoint is found. The output is a header and one row:ID Type VRF GPORT V6 IPADDR DISCRIMINATOR CpuPri IntPri -- ---- --- ----- -- ------ ------------- ------ ------
The row prints both the source and the destination address, in hex, under the single
IPADDRheading.On a SONiC switch it fails with
Feature unavailable, as shown below.Hardware-validated
drivshell> bfd endpoint show ID=1 Command failed. Feature unavailable Failed to execute the diagnostic command. Error: Operation failed.
- BFD trace
Print the BFD application’s trace buffer. Read-only.
Unvalidated
drivshell> bfd trace
Built-in help
bfd init bfd endpoint add [GPORT=<id>] [TYPE=<type>] [VRF=<id>] [INTPRI=<intpri>] [CPUPRI=<qid>] [DISCRIMINATOR=<id>] [V6] [IP=<val>] bfd endpoint update [ID=<id>] [TYPE=<type>] [VRF=<id>] [INTPRI=<intpri>] [CPUPRI=<qid>] [DISCRIMINATOR=<id>] [V6] [IP=<val>] bfd endpoint delete [ID=<id>] bfd endpoint show [ID=<id>] bfd trace