SONiC Device Agent
SONiC Device Agent Overview
Although the preferred method of installing device system agents is from the Apstra GUI, you can manually install Apstra agents from the CLI. Only in rare exceptions would you need to manually install agents, which requires more effort and is error-prone. Before manually installing agents, you should have an in-depth understanding of the various device states, configuration stages, and agent operations . For assistance, contact Juniper Support.
You can also use Apstra ZTP to automatically boot and install agents and prerequisite configuration on switches. Using Apstra ZTP is simpler and easier to support at scale than manually installing agents.
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.
admin@sonic:~$ sonic-cli sonic# show interface Management 0 eth0 is up, line protocol is up Hardware is MGMT Description: Management0 Mode of IPV4 address assignment: not-set Mode of IPV6 address assignment: not-set IP MTU 1500 bytes LineSpeed 1GB, Auto-negotiation True Input statistics: 11 packets, 1412 octets 0 Multicasts, 0 error, 4 discarded Output statistics: 31 packets, 5290 octets 0 error, 0 discarded sonic# configure terminal sonic(config)# interface Management 0 sonic(conf-if-eth0)# ip address 192.168.59.7/24 gwaddr 192.168.59.1 sonic(conf-if-eth0)# exit sonic(config)# exit sonic# write memory sonic# show interface Management 0 eth0 is up, line protocol is up Hardware is MGMT Description: Management0 IPV4 address is 192.168.59.7/24 Mode of IPV4 address assignment: MANUAL Mode of IPV6 address assignment: not-set IP MTU 1500 bytes LineSpeed 1GB, Auto-negotiation True Input statistics: 18 packets, 2494 octets 0 Multicasts, 0 error, 6 discarded Output statistics: 38 packets, 6455 octets 0 error, 0 discarded sonic#
You can check the Managment VRF from the SONiC Linux command line.
admin@leaf1:~$ show mgmt-vrf ManagementVRF : Enabled Management VRF interfaces in Linux: 48: mgmt: <NOARP,MASTER,UP,LOWER_UP> mtu 65536 qdisc noqueue state UP mode DEFAULT group default qlen 1000 link/ether 8e:32:49:6c:ec:71 brd ff:ff:ff:ff:ff:ff promiscuity 0 vrf table 5000 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master mgmt state UP mode DEFAULT group default qlen 1000 link/ether 52:54:00:c1:ac:1b brd ff:ff:ff:ff:ff:ff 49: lo-m: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue master mgmt state UNKNOWN mode DEFAULT group default qlen 1000 link/ether c2:39:a7:6c:4b:be brd ff:ff:ff:ff:ff:ff admin@leaf1:~$ show mgmt-vrf routes Routes in Management VRF Routing Table: default via 172.20.9.1 dev eth0 metric 201 broadcast 127.0.0.0 dev lo-m proto kernel scope link src 127.0.0.1 127.0.0.0/8 dev lo-m proto kernel scope link src 127.0.0.1 local 127.0.0.1 dev lo-m proto kernel scope host src 127.0.0.1 broadcast 127.255.255.255 dev lo-m proto kernel scope link src 127.0.0.1 broadcast 172.20.9.0 dev eth0 proto kernel scope link src 172.20.9.7 172.20.9.0/24 dev eth0 proto kernel scope link src 172.20.9.7 local 172.20.9.7 dev eth0 proto kernel scope host src 172.20.9.7 broadcast 172.20.9.255 dev eth0 proto kernel scope link src 172.20.9.7 admin@leaf1:~$