Quick Start Guide
This topic assumes you are configuring SONiC for the first time and have already installed and powered on your switch according to the instructions in the hardware installation guide that shipped with the switch.
Reboot the switch into ONIE and select ONIE: Install OS:
GNU GRUB version 2.02-beta3 +----------------------------------- | *ONIE: Install OS | ONIE: Rescue | ONIE: Uninstall OS | ONIE: Update ONIE | ONIE: Embed ONIE
Download the SONiC disk image. If you want an NVIDIA Mellanox version of SONiC, download it from the Azure website.
Decide which installation process to follow from the list described in Installation Management. For example, copying the image to the switch and running
When the NOS installation completes, the switch reboots into SONiC by default, as shown here:
GNU GRUB version 2.02-beta3 +---------------------------------- |*SONiC-05-HEAD.517-6045235 |ONIE
Log into SONiC. The default login credentials are:
- Username: admin
- Password: YourPaSsWoRd
Verify the current image version.
admin@switch:~$ show version SONiC Software Version: SONiC.202012.15-cb79de1b Distribution: Debian 10.7 Kernel: 4.19.0-9-2-amd64 Build commit: cb79de1b Build date: Sat Jan 30 11:14:42 UTC 2021 Built by: johnar@jenkins-worker-11 Platform: x86_64-mlnx_msn2700-r0 HWSKU: ACS-MSN2700 ASIC: mellanox Serial Number: 000000 Uptime: 04:14:22 up 1 day, 2:25, 1 user, load average: 2.05, 2.96, 3.33
Verify the platform type.
switch:~$ show platform summary Platform: x86_64-mlnx_msn2700-r0 HWSKU: ACS-MSN2700 ASIC: mellanox
Verify that all the Docker containers are running.
The list in the example below is the default. More containers can be loaded based on the user system’s configuration.
It might take up to 2 minutes for the full list of running containers and interfaces to appear.
admin@leaf01:~$ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 7693970157e4 docker-sonic-telemetry:latest "/usr/bin/supervisord" 26 hours ago Up 26 hours telemetry 1346bf47d5aa docker-snmp-sv2:latest "/usr/bin/supervisord" 26 hours ago Up 26 hours snmp b4927925be4a docker-router-advertiser:latest "/usr/bin/docker-ini…" 26 hours ago Up 26 hours radv fd4006a177d1 docker-dhcp-relay:latest "/usr/bin/docker_ini…" 26 hours ago Up 26 hours dhcp_relay d90bf65d463f docker-lldp-sv2:latest "/usr/bin/docker-lld…" 26 hours ago Up 26 hours lldp 7e1c5217eff3 docker-syncd-vs:latest "/usr/bin/supervisord" 4 days ago Up 26 hours syncd dcede1ab4ac0 docker-teamd:latest "/usr/bin/supervisord" 4 days ago Up 26 hours teamd 8e3c153cafdb docker-orchagent:latest "/usr/bin/docker-ini…" 4 days ago Up 26 hours swss cdeb016623c5 docker-fpm-frr:latest "/usr/bin/supervisord" 7 days ago Up 26 hours bgp 2f6ac855e3e1 docker-platform-monitor:latest "/usr/bin/docker_ini…" 7 days ago Up 26 hours pmon 77917d9efb8a docker-database:latest "/usr/local/bin/dock…" 7 days ago Up 26 hours database
Verify the status of the interfaces.
admin@leaf01:~$ show interfaces status Interface Lanes Speed MTU FEC Alias Vlan Oper Admin Type Asym PFC ----------- --------------- ------- ----- ----- -------------- ------ ------ ------- ------ ---------- Ethernet0 25,26,27,28 40G 9216 N/A fortyGigE0/0 trunk up up N/A N/A Ethernet4 29,30,31,32 40G 9216 N/A fortyGigE0/4 trunk up up N/A N/A Ethernet8 33,34,35,36 40G 9216 N/A fortyGigE0/8 trunk up up N/A N/A Ethernet12 37,38,39,40 40G 9216 N/A fortyGigE0/12 routed up up N/A N/A Ethernet16 45,46,47,48 40G 9216 N/A fortyGigE0/16 routed up up N/A N/A Ethernet20 41,42,43,44 40G 9216 N/A fortyGigE0/20 routed up up N/A N/A Ethernet24 1,2,3,4 40G 9216 N/A fortyGigE0/24 routed up up N/A N/A Ethernet28 5,6,7,8 40G 9216 N/A fortyGigE0/28 routed up up N/A N/A Ethernet32 13,14,15,16 40G 9216 N/A fortyGigE0/32 routed up up N/A N/A Ethernet36 9,10,11,12 40G 9216 N/A fortyGigE0/36 routed down up N/A N/A Ethernet40 17,18,19,20 40G 9216 N/A fortyGigE0/40 routed down up N/A N/A Ethernet44 21,22,23,24 40G 9216 N/A fortyGigE0/44 routed down up N/A N/A Ethernet48 53,54,55,56 40G 9216 N/A fortyGigE0/48 routed down up N/A N/A Ethernet52 49,50,51,52 40G 9216 N/A fortyGigE0/52 routed down up N/A N/A Ethernet56 57,58,59,60 40G 9216 N/A fortyGigE0/56 routed down up N/A N/A Ethernet60 61,62,63,64 40G 9216 N/A fortyGigE0/60 routed down up N/A N/A Ethernet64 69,70,71,72 40G 9216 N/A fortyGigE0/64 routed down up N/A N/A Ethernet68 65,66,67,68 40G 9216 N/A fortyGigE0/68 routed down up N/A N/A Ethernet72 73,74,75,76 40G 9216 N/A fortyGigE0/72 routed down up N/A N/A Ethernet76 77,78,79,80 40G 9216 N/A fortyGigE0/76 routed down up N/A N/A Ethernet80 109,110,111,112 40G 9216 N/A fortyGigE0/80 routed down up N/A N/A Ethernet84 105,106,107,108 40G 9216 N/A fortyGigE0/84 routed down up N/A N/A Ethernet88 113,114,115,116 40G 9216 N/A fortyGigE0/88 routed down up N/A N/A Ethernet92 117,118,119,120 40G 9216 N/A fortyGigE0/92 routed down up N/A N/A Ethernet96 125,126,127,128 40G 9216 N/A fortyGigE0/96 routed down up N/A N/A Ethernet100 121,122,123,124 40G 9216 N/A fortyGigE0/100 routed down up N/A N/A Ethernet104 81,82,83,84 40G 9216 N/A fortyGigE0/104 routed down up N/A N/A Ethernet108 85,86,87,88 40G 9216 N/A fortyGigE0/108 routed down up N/A N/A Ethernet112 93,94,95,96 40G 9216 N/A fortyGigE0/112 routed down up N/A N/A Ethernet116 89,90,91,92 40G 9216 N/A fortyGigE0/116 routed down up N/A N/A Ethernet120 101,102,103,104 40G 9216 N/A fortyGigE0/120 routed down up N/A N/A Ethernet124 97,98,99,100 40G 9216 N/A fortyGigE0/124 routed down up N/A N/A
By default, all physical ports (Ethernet##) should appear. The number of ports depends on the system you are using.
If the SKU includes split ports, then a lowercase letter (a, b, c, d) is appended to the physical port alias. For example, if port Ethernet12 is broken out to two ports, the resulting ports are named fortyGigE0/12a and fortyGigE0/12b.
If no interfaces are showing, it might indicate one of the following:
/etc/sonic/config_db.jsonfile is missing or was misconfigured.
- There is an issue with the
- There was an error processing a configuration file such as
All SONiC switches support both serial console-based login and SSH-based login by default. The default credentials to log in (if you did not modify when you built the SONiC image) is admin/YourPaSsWoRd.
For SSH login, you can log in to the management interface (eth0) IP address after configuring the it using the serial console. Refer the next section for configuring the IP address for management interface.
You can add new users with the Linux
useradd command. You manage passwords with the Linux
Configure Using CLI or JSON
You configure SONiC in one of two ways:
Using the SONiC CLI. SONiC includes a broad range of
configcommands that configure almost every feature in the operating system. Changes made using the CLI are applied to a running configuration that does not persist after you reboot the switch, unless you save the configuration with
config save. The Azure GitHub documentation contains a command reference, and you can also run
config ?to list all the configuration commands available:▼ config ? Output
Editing the SONiC CONFIG_DB JSON configuration file
config_db.jsondirectly. To apply your changes, reload the configuration with
Show the Running Configuration
A running configuration is a combination of the startup configuration that loads when you boot the switch, plus any updates that are made to the configuration that are not committed to CONFIG_DB (that is, they’re not saved to the configuration with
show runningconfiguration all command shows the current running state of the
You can filter the configuration to only show the running configuration for ACLs, BGP, interfaces, NTP, ports, SNMP or
admin@switch:~$ show runningconfiguration ntp NTP Servers ------------- 10.10.249.30