Configuration Guide
First Use
12 min
login device login device by default, the devices support login through both the serial console and ssh (secure shell) when initially logging into the device, you will need to use the console port (referred to as the serial port below) to establish a connection after configuring the management interface's ip address, you can then use ssh to log into the device local login via the serial console is the fundamental method for accessing the device, and it forms the basis for configuring other login methods the specific steps are as follows connect the lines connect the lines this series of devices utilize rj 45 connectors for serial console connections the distribution of serial console ports varies among different models generally, they can be found on the front panel of the device, while some might be located on the rear panel, often marked with the label "con " after the device is powered on, connect the device's serial console port to a server or pc it's important to ensure that the communication parameter settings of the user terminal match the default configuration of the device's serial console to establish communication the default values for each parameter are as shown in the table below parameter default value baud rate 115200 data bits 8 stop bits 1 parity none serial port login device serial port login device 1 initial login via console port connect to the device through the console port after pressing enter, a login prompt will appear welcome to minicom 2 7 options i18n compiled on nov 15 2018, 20 18 47 port /dev/ttyusb1, 11 24 17 press ctrl a z for help on special keys debian gnu/linux 9 sonic ttys0 sonic login 2 logging into the device with default credentials username admin password asteros last login fri mar 14 03 10 51 2025 from 192 168 51 235 entering cli view, please wait sonic# 3 configuring the management interface ip address(any port, with in band management) sonic# configure sonic(config)# interface ethernet 1 sonic(config if 1)# ip address 30 1 1 2/24 30 1 1 1 4 saving the configuration sonic# write save running config existing files will be overwritten, continue? \[y/n] y running command /usr/local/bin/sonic cfggen d print data > /etc/sonic/config db json getting familiar with using cisco like command line getting familiar with using cisco like command line how to enter the command line view how to enter the command line view operation command description enter the cli view sonic cli by default, upon logging into the device, you will automatically enter the command line view exit the cli view system bash use the 'exit' command to return to the command line configuration interface common keywords common keywords keywords description no cancel or disable a specific setting show this display the current configuration of the current view configure terminal enter the system configuration mode delete delete a configuration file reboot reboot the device write save the current configuration shutdown disable or turn off a port exit exit to the previous level or log out command line usage assistance command line usage assistance when entering an incomplete keyword, pressing the tab or space key will automatically complete the keyword if you encounter issues while using the command line, you can utilize the help function to get assistance, eliminating the need to memorize extensive and intricate commands while entering a command, pressing the tab key will display a list of matching keywords entering "?" will provide hints for relevant keywords or explanations of parameters sonic(config)# aaa acl anti attack check arp authentication clock copp counters crm crm resource dhcp dot1x feature hash history image interface ipfix ipv4 source check ipv6 source check l2 multicast table license link aggregation lldp local user mac address mac flapping mac learning mac limit mclag mirror monitor link nat nd ndp ntp platform port isolate group portal ptp qos queue ra raguard running config savi sla snmp agent snooping stp sub interface supported timezones synce syslog storage capacity system tacacs traffic behavior user bind version vlan vrf vxlan ztp isis bfd route map unused debugging ip bgp mpls ipv6 evpn router id logging nexthop group pathd vrrp sonic# configure terminal sonic(config)# access list l3 test ingress \<tab> \<cr> sonic(config)# access list l3 test \<enter> syntax error the command is not completed sonic(config)# access list l3 test1 ingress sonic(config l3 acl test1)# ? end exit to the exec mode exit exit from current mode no negate a command or set its defaults rule add an access list entry show show running config sonic(config l3 acl test1)# rule ? rule id (0 500) sonic(config l3 acl test1)# rule 1 ? source mac specify source mac address destination mac specify destination mac address ethernet type specify ethernet protocol type outer vlan specify outer vlan id vlan pri specify outer vlan priority configuration file management configuration file management the configuration files for this series of devices are in json (javascript object notation) format json is a lightweight data interchange format, and its file extension is typically json viewing configuration file viewing configuration file by default, the system configuration files are stored in the /etc/sonic directory the default system configuration file is named config db json when performing configuration saving or restoration operations, it's this file that gets modified, determining the initial configuration upon the device's next startup additionally, this directory also contains backups of configuration files, labeled with timestamps, which facilitates configuration recovery for users every time the "write" command is executed, a new config db json file is generated to save the current configuration, and the original file's name is modified to the format config bd +timestamp configuration saving configuration saving after a user logs into the device, configurations made through command line operations or other means are temporary if you require persistent configurations, you should manually save the modified settings this involves updating the current configuration to the default configuration file, config db json if you don't save the configurations, the device's settings will revert to their state before modifications after a reboot operation command description save configuration write
