Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Configure BFD Health Check for BGPaaS Sessions

SUMMARY This topic describes how to configure Bidirectional Forwarding and Detection (BFD) health check for BGP as a Service (BGPaaS) sessions. Juniper Networks supports this feature using Contrail Networking Release 23.2 or later in a Kubernetes-orchestrated environment.

Bidirectional Forwarding and Detection (BFD) is a protocol-based health check. This topic describes how to configure BFD for BGPaaS sessions in CN2.

Note: BFD health check for BGPaaS is not the same as the BFD health check over the virtual machine interface (VMI) feature. You cannot use BFD health check for VMIs. This is because the BGPaaS session shares the same tenant destination address over a set of VMIs, with only one VMI active at any given time.

To configure BFD health check for BGPaaS, you must associate the health check service with a BGPaaS object. This association triggers the establishment of BFD sessions to all BGPaaS neighbors for that service. If the BFD session goes down, the resulting BGPaaS session terminates and the routes are withdrawn.


It is not necessary for a BFD session to be Up to establish a BGP neighbor.

Whenever BFD health check detects a BFD session as Up or Down, corresponding logs are generated. Logging is enabled in the contrail-vrouter-agent.conf file with the log level SYS_NOTICE. You can view the log file in the location /var/log/contrail/contrail-vrouter-agent.log.

The following is a snippet of a sample log message for BFD session events:

Configure BFD Health Check

To configure BFD health check for BGPaaS, you must associate the health check service with a BGPaaS object.


We assume that you've already performed the preliminary steps required to establish a BGPaaS session without BFD (create the NAD (virtual network and subnet) and create the pod with appropriate references to the attached VN). For instructions, see Enable BGP as a Service.

To set up the BGPaaS session with BFD Service Health Check:

  1. Create the ServiceHealthCheck and BGPAsAService objects, as shown in the following examples:


    Under ServiceHealthCheckProperties, you can specify delay, delayUSecs, or both. Delay is calculated in seconds whereas delayUsecs is calculated in microseconds.

    In the following example, packets are sent with a delay of 2 seconds and 200000 microseconds (2.2 seconds).

  2. Verify your configuration.

    • Enter the kubectl get ServiceHealthCheck -n bfd-on-bgpaas command to verify that the object was created. For example:

    • Enter the kubectl describe servicehealthcheck bfd-hc -bfd-on-bgpaas command. The object is successfully created when the State field indicates Success. For example:

    • Verify the status of the BFD session you just created.