Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

APIs and CLI Commands for Bond Interfaces

SUMMARY Read this topic to learn about the APIs and CLIs available in the L2 mode of the Juniper Cloud-Native Router. JCNR supports an API that can be used to force traffic to switch from the active interface to the standby interface in a bonded pair. Another JCNR API and a CLI can be used to view the active node details in a bond interface.

APIs for Bond Interfaces

When you run cloud-native router in L2 mode with cascaded nodes, you can configure those nodes to use bond interfaces. You can configure the bond mode in the values.yaml file before deployment. For example:

API to View the Active and Backup Interfaces in a Bond Interface Pair

Starting with JCNR Release 23.3, use the REST API call: curl -X GET http://127.0.0.1:9091/bond-get-active/bond0 on localhost port 9091 to fetch the active and backup interface details of a bond interface pair.

A sample output is shown below:

API to Force Bond Link Switchover

Starting with JCNR Release 22.4, you can force traffic switchover from an active to backup interface in a bond interface pair using a REST API. If you have configured the bond interface pair in the ACTIVE_BACKUP mode before deploying JCNR, then the vRouter-agent exposes the REST API call: curl -X POST http://127.0.0.1:9091/bond-switch/bond0 on localhost port 9091. Use this REST API call to force traffic to switch from the active interface to the backup interface.

A sample output is shown below:

CLI Commands for Bond Interfaces

The vRouter contains the following CLI commands which are related to bond interfaces:

  • dpdkinfo -b—displays the active interface in a bonded pair.

  • dpdkinfo -n—displays the traffic statistics associated with your bond interfaces.