Entering CLI Configuration Mode
PicOS supports different CLI modes, which are indicated by different prompts. Some commands can only be run in certain modes.
Operation mode
When log in PicOS CLI, you are in the operation mode by default. You can execute some basic configurations in this mode, such as clear and show, etc. > indicates the operation mode, as shown in the figure below.
Figure 1. Prompt of Operation Mode
Configuration mode
You can configure the switch function in this mode, such as interface, routing, etc. Run configure in the operation mode to enter the configuration mode, and run exit to return to the operation mode. # indicates the configuration mode, as shown in the figure below.
Figure 2. Prompt of Configuration Mode
Linux shell mode
Run start shell sh in the operation mode to enter the Linux shell mode, and run exit to return to the operation mode. ~$ indicates the Linux shell mode, as shown in the figure below.
Figure 3. Prompt of Linux Shell Mode
Configuring a Host Name
Overview
A host name distinguishes one device from another. The default host name is the system name PICOS. You can modify the host name as required.
Procedure
Step1 In the configuration mode, specify or modify a host name for the switch.
set system hostname <hostname> |
---|
Step2 Commit the configuration.
commit |
---|
Verifying the Configuration
After the configuration is completed, in the configuration mode, use run show system name command to view the new host name.
Other Configurations
To reset the hostname to default, use delete system hostname command.
Configuring the Management IP Address
Overview
To facilitate the device management and meet the requirement of separating the management traffic from the data traffic, the switch supports the management interface. By default, the management interface is eth0 and the IP address is null.
Procedure
Step1 In the configuration mode, specify the IP address for management interface eth0.
set system management-ethernet eth0 ip-address {IPv4 | IPv6} <ip-address> |
---|
Step2 Commit the configuration.
commit |
---|
Verifying the Configuration
After the configuration is completed, in the configuration mode, use run show system management-ethernet command to view the MAC address, IP address, state and traffic statistics.
Other Configurations
To clear the configuration of management interface, use delete system management-ethernet eth0 ip-address command.