SONIC Operation and Commands - amybuck/SONiC-NAS GitHub Wiki
This information describes the standard Linux Debian distribution operation and commands for the SONiC Host-Adapter package.
The default admin username is part of the Linux sudo
group for executing privilege commands. The default password is admin but you must change the password the first-time you log into the device. Before continuing, verify you have connected to the serial console on the device.
The Management port name is eth0, and the Management interface is configured to automatically obtain its IP address using DHCP by default. You can change the behavior by modify the /etc/network/interfaces
file with the following parameters:
auto eth0
iface eth0
inet static address 10.11.133.40
netmask 255.255.0.0
gateway 10.11.133.254
After modifying the interfaces file, restart the networking service:
$ service networking restart
Use the service _servicename_ status
command to check the status of the service. The command output indicates if the service is up and running or inactive. You can also use the systemctl
command to check the service status.
$ service snmpd status
snmpd.service - LSB: SNMP agents
Loaded: loaded (/etc/init.d/snmpd)
Active: active (running) since Wed 2016-02-17 02:16:06 UTC; 2h 39min ago
CGroup: /system.slice/snmpd.service
└─930 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux ...
$ service snmpd stop
$ service snmpd status
snmpd.service - LSB: SNMP agents
Loaded: loaded (/etc/init.d/snmpd)
Active: inactive (dead) since Wed 2016-02-17 05:00:27 UTC; 3s ago
Process: 3370 ExecStop=/etc/init.d/snmpd stop (code=exited, status=0/SUCCESS)
$ service snmpd start
$ service snmpd status
snmpd.service - LSB: SNMP agents
Loaded: loaded (/etc/init.d/snmpd)
Active: active (running) since Wed 2016-02-17 05:00:39 UTC; 1s ago
Process: 3370 ExecStop=/etc/init.d/snmpd stop (code=exited, status=0/SUCCESS)
Process: 3395 ExecStart=/etc/init.d/snmpd start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/snmpd.service
└─3399 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux...
$ service snmpd restart
$ service snmpd status
snmpd.service - LSB: SNMP agents
Loaded: loaded (/etc/init.d/snmpd)
Active: active (running) since Wed 2016-02-17 05:00:46 UTC; 1s ago
Process: 3407 ExecStop=/etc/init.d/snmpd stop (code=exited, status=0/SUCCESS)
Process: 3412 ExecStart=/etc/init.d/snmpd start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/snmpd.service
└─3416 /usr/sbin/snmpd -Lsd -Lf /dev/null -u snmp -g snmp -I -smux..
$ sonic-ethtool
$ sonic-show-stats
$ sonic-config-fanout
$ sonic-switch-shell
$ sonic-config-switch
Now that you've finished the basics, see CPS API Network Configuration to understand the available network features for your application needs.