Basic Configuration
Login System
Section titled “Login System”By default, AsterNOS appliances both support serial console-based login and SSH-based login. The default user is:
Username: admin
Password: asteros
In the case of SSH login, the user can use the serial console configured management interface (mgmt 0) IP address.
Serial Login
Section titled “Serial Login”[Use Cases]
Debian GNU/Linux 9 sonic ttyS0sonic login: adminPassword:Last login: Mon Jun 3 14:44:09 CST 2019 from 192.168.10.161 on pts/4Linux sonic 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2015-12-19) x86_64 _ _ _ _ ___ ____ / \ ___ | |_ ___ _ __ | \ | | / _ \ / ___| / _ \ / __|| __| / _ \| '__|| \| || | | |\___ \ / ___ \ \__ \| |_ | __/| | | |\ || |_| | ___) |/_/ \_\|___/ \__| \___||_| |_| \_| \___/ |____/-------Asterfusion Network Operating System -------Help: http://www.asterfusion.com/admin@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>acl arp counters history image interface link-aggregationlldp mac-address platform running-config startup-config sub-interface trafficsonic# 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 Mode exit Exit from current mode no Negate a command or set its defaults rule Add an access list entry show show running-configsonic(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
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
-
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 thisinterface ethernet 1 ip address 2022::9110/127 ip address 30.11.13.1/30 speed 10000
system bash
Section titled “system bash”[Command]
system bash
[Purpose]
Exit system view and enter the Linux operating system view.
[View]
System view
[Use Cases]
sonic# system bashUse 'exit' to return sonic-cliadmin@sonic:~$
Management Port Configuration
Section titled “Management Port Configuration”The management interface (mgmt 0) of AsterNOS can be used by default to obtain an IP address from a DHCP server via a DHCP client, connecting the management interface to a network with a DHCP server on the same network segment. The management port can only have one IPv4 address and one IPv6 address, multiple configurations will overwrite the original configuration and the last one will prevail.
show interface mgmt
Section titled “show interface mgmt”[Command]
show interface mgmt
[Purpose]
Display management port configuration information
[View]
System view
[Use Cases]
sonic# show interface mgmtManagement IP address = 192.168.1.10/24Management Network Default Gateway = 192.168.0.1
ip address
Section titled “ip address”[Command]
ip address A.B.C.D/M A.B.C.D
[Purpose]
Configure/modify management port IP address and gateway.
[Parameter]
Parameter | Description |
---|---|
A.B.C.D/M | IP address with prefix length |
A.B.C.D | Optional parameter, Gateway IP, IP address without prefix length |
[View]
Management Port Configuration View
[Use Cases]
sonic# configuresonic(config)# interface mgmt 0sonic(config-mgmt-0)# ip address 10.250.0.103/24 10.250.0.254
vrf mgmt
Section titled “vrf mgmt”[Command]
vrf mgmt
[Purpose]
Add the management network port to the mgmt vrf
[View]
Management Port Configuration View
[Notes]
By default, the management port and the service port belong to default vrf, if user need to isolate the management port and the service port can add the management port to mgmt vrf
[Use Cases]
sonic# configuresonic(config)# interface mgmt 0sonic(config-mgmt-0)# vrf mgmt
Device Upgrade
Section titled “Device Upgrade”image update
Section titled “image update”[Command]
image update bin-file
[Purpose]
Upgrade system version
[Parameter]
Parameter | Description |
---|---|
bin-file | Software image file name |
[View]
System view
[Notes]
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 AsterNOS-V5.2R001.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 1dot1x accounting-realtime 1000dot1x reauthenticate-period 1000mtu 9210no storm-suppress broadcaststorm-suppress broadcast packets 10!...!ip protocol static route-map RM_SET_SRC!line vty!end
show startup-config
Section titled “show startup-config”[Command]
show startup-config
[Purpose]
Display configuration information for startup
[View]
System view
[Use Cases]
sonic# show startup-config!interface ethernet 1dot1x accounting-realtime 1000dot1x reauthenticate-period 1000mtu 9210no storm-suppress broadcaststorm-suppress broadcast packets 10!...!ip protocol static route-map RM_SET_SRC!ip protocol bgp route-map RM_SET_SRC!ipv6 protocol bgp route-map RM_SET_SRC6!line vty!end
reboot
Section titled “reboot”[Command]
reboot [-y]
[Purpose]
Reboot system
[View]
System view
[Use Cases]
sonic# reboot
[Command]
write running-config [-y]
[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# wite running-config save running-config...
delete startup-config
Section titled “delete startup-config”[Command]
delete startup-config [all] [-y]
[Purpose]
Delete saved configuration
[View]
System view
[Notes]
Saved configurations related to the management interface will not be deleted.If the “all” parameter is used, all configurations will be deleted.
[Use Cases]
sonic# delete startup-config