Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


SONiC Device Agent

SONiC Device Agent Overview

Although the preferred method of installing device system agents is by creating agents in the Apstra GUI, you can manually install Apstra agents from the CLI. Only in rare exceptions is it needed to manually install agents, which is error-prone and requires more effort. An in-depth understanding of the various device states, configuration stages, and agent operations is required before manually installing agents. For assistance, contact Juniper Support.

The only Software for Open Networking in the Cloud (SONiC) distribution that is supported is SONiC Enterprise (starting with Apstra version 3.3.0a).

The SONiC device agent manages the following files in the filesystem:

  • /etc/sonic/config_db.json - The main configuration file for SONiC, specifying interfaces, IP addresses, port breakouts etc.
  • /etc/sonic/frr/frr.conf - frr.conf contains all of the routing application configuration for BGP on the device.

Do not edit the config_db.json or frr.conf files manually at any time, before or after device system agent installation. The agent overwrites any existing configuration in these files.

Configure Management IP Manually (SONiC)

SONiC automatically creates a management VRF for the "eth0" management interface. By default, "eth0" gets a DHCP address from the management network. In most cases, no management configuration should be needed.

However, if you need to manually configure a SONiC device management IP address, you must configure it using the sonic-cli interface.

You can check the Managment VRF from the SONiC Linux command line.

Install Agent Manually (SONiC)

To manually install SONiC device agents you'll download, install and configure the agent software, then acknowledge it to bring it under Apstra management.
  1. Download the Apstra agent with the ​sudo cgexec -g l3mdev:mgmt curl -o /tmp/ -k -O https://{{aos-ip-address}}/ device_agent_images/aos_device_agent{{aos-version}}-{{aos-build}}.runcurl​​` command.
  2. Install the Apstra agent with the sudo /bin/bash /tmp/ -- --no-start command.
  3. Set the IP of the Apstra server and enable configuration service by editing /etc/aos/aos.conf with the sudo vi /etc/aos/aos.conf command.
    • For the following, replace "aos-server" with the IP address or valid FQDN of your Apstra server.
    • For example
    • For the following, add the management interface (usually eth0).
    • For the following, set "enable_configuration_service" to 1 to enable "full control" mode from Apstra.
    • Add the following, "credential" configuration with "username = " and the local Linux user to be used for the agent (usually "admin").
  4. Start the agent with the sudo service aos start command and check its status with the sudo service aos status command.
  5. From the left navigation menu in the Apstra GUI, navigate to Devices > Managed Devices to acknowledge the device, then you can assign it to a blueprint.

Uninstall Agent Manually (SONiC)

To manually uninstall SONiC Apstra device agents you'll stop Apstra server, uninstall the agent, and remove any remaining Apstra files.
  1. Stop the Apstra agent with the sudo service aos stop command.
  2. Uninstall the Apstra agent with the sudo dpkg --purge --force-all aos-device-agent command.
  3. Remove remaining Apstra files with the sudo rm -fr /etc/aos /var/log/aos /mnt/persist/.aos /opt/aos /run/aos /run/lock/aos /tmp/aos_show_tech /usr/sbin/aos* command.