Basic Configuration
Login System
Section titled “Login System”By default, the appliances both support serial console-based login and SSH-based login. The default credentials for login are admin/asteros. In the case of SSH login, the user can use the serial console configured management interface IP address.
Serial Login
Section titled “Serial Login”[Use Cases]
Last login: Tue Jun 10 17:48:41 UTC 2025 from 192.168.200.240 on pts/0...Entering cli view, please wait...sonic#
Enter The Command Line Configuration Interface
Section titled “Enter The Command Line Configuration Interface”To use the Klish command line, you need to first enter the Klish view.
sonic-cli
Section titled “sonic-cli”[Command]
sonic-cli
[Purpose]
Enter the Klish command line view
[Notes]
This command is executed in the terminal and use system bash command to exit the CLI view.
[Use Cases]
admin@sonic:~$ sonic-clisonic#
All commands support help by typing Tab or ”?” to help the user understand the command and its parameters. Tab and ”?” can be used at any level of the command and will show the next possible input command or sub-command. If you have problems using the command line, you can use the help function to get help without having to remember a lot of complicated commands.
When you enter a command, press the Tab key, the system will list the set of keywords that can be matched; enter ”? , the system will give the corresponding keyword hint or explanation of the meaning of the parameter.
Example:
sonic# show <tab>aaa access-list arp arp-to-host authentication bfd bgp bgpdclock copp crm dhcp dhcp-relay dns dot1x endexit filter-list hash igmp-snooping interface ip ipfix ipv6isisd key l2vpn ldpd lldp local-user location-led logmac-address mcast-snooping mclag mirror mld-snooping monitor-link-group mpls natnd ndp nexthop-group no ntp ospf6d ospfd pbr-mappoe port-group port-isolate-group pseudowire ptp qos qos-map-all quitradv route-map router router-id show sla snmp-agent snp-syncssh stp syslog tacacs telnet time-range traffic user-bindvlan vlan-group vrf vrrp ztpsonic# configure terminalsonic(config)# access-list l3 test ingress <tab><cr>sonic(config)# access-list l3 test <enter>Syntax error: The command is not completedsonic(config)# access-list l3 test1 ingresssonic(config-l3-acl-test1)# ?end Exit to the exec Modeexit Exit from current modeno Negate a command or set its defaultsrule Add an access list entryshow show running-configsonic(config-l3-acl-test1)# rule ?String rule ID(0..500,the larger num has higher priority) or rule name(not pure digit)sonic(config-l3-acl-test1)# rule 1 ?src-mac Specify source mac addressethernet-type Specify ethernet protocol typeouter-vlan Specify outer VLAN idvlan-pri Specify outer VLAN priorityip-protocol Specify IP protocolsrc-ip Specify source IP address(mask)dst-ip Specify destination IP address(mask)icmp-type Specify type of ICMPsrc-port Specify L4 source portdst-port Specify L4 destination portpacket-action Specify action of matched packetip-type Specify ip typeredirect-action Specify redirect action of matched packettraffic-behavior Specify a traffic-behavior to bind<cr>
Description:
-
Enter an incorrect command or a command that does not apply to this view will not allow a carriage return to be entered
-
If the command line is not entered completely, press the entry key directly, the system will give a prompt
-
<cr>Indicates that there are no keywords or parameters in this position, and can be executed by typing directly into the carriage return
[Command]
exit
[Purpose]
Exit a view
[Notes]
This command is executed in any view
show this
Section titled “show this”[Command]
show this
[Purpose]
Show all configuration commands in the current view
[Usage Scenario]
This command would display the currently running configuration on the device, including all the parameters and settings that are currently in effect.
[Notes]
This command is executed in any view.
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# show this!interface ethernet 1ip address 2022::9110/127ip address 30.11.13.1/30speed 1000
Device Upgrade
Section titled “Device Upgrade”image update bin-file
Section titled “image update bin-file”[Command]
image update bin-file
[Purpose]
Upgrade system version
[Parameter]
bin-file Software image file name
[View]
System view
[Notes]
Upgrade package storage path:/home/admin. By default, during an upgrade, the system will automatically copy the currently saved configuration file to the new version and load it after the restart. If you need to clear the configuration or save the latest configuration, please execute the appropriate commands before the upgrade.
[Use Cases]
sonic# image update AsterNOS6.1-R0100P03.bin
System Boot Configuration
Section titled “System Boot Configuration”show running-config
Section titled “show running-config”[Command]
show running-config
[Purpose]
Display the currently running configuration information
[View]
System view
[Use Cases]
sonic# show running-config!interface ethernet 1mtu 9210!…!ip protocol static route-map RM_SET_SRC!line vty!end
reboot
Section titled “reboot”[Command]
reboot
[Purpose]
Reboot system
[View]
System view
[Use Cases]
sonic# reboot
[Command]
write
[Purpose]
Configuration saving
[View]
System view
[Usage Scenario]
Users modify the device’s current configuration via the command line, and these configurations are temporary. To ensure that the current configuration remains effective after the device is rebooted, it’s necessary to save the current configuration to a configuration file before restarting the device.
[Notes]
The configurations will be saved in JSON format in the system’s /etc/sonic directory, with the filename as config_db.json. The file saved during the previous ‘write’ command execution will be renamed in the format config_db_date for record-keeping and rollback purposes.
[Use Cases]
sonic# writesave running-config...
delete startup-config
Section titled “delete startup-config”[Command]
delete startup-config
[Purpose]
Delete saved configuration
[View]
System view
[Notes]
Saved configurations related to the management interface will not be deleted.
[Use Cases]
sonic# delete startup-config