Beruflich Dokumente
Kultur Dokumente
Table of Contents
Table of Contents
Chapter 1 CLI Configuration ........................................................................................................ 1-1 1.1 Introduction to the CLI ....................................................................................................... 1-1 1.2 Command Level/Command View ...................................................................................... 1-1 1.2.1 Switching between User Levels .............................................................................. 1-2 1.2.2 Configuring a Level for a Specific Command in a Specific View ............................ 1-3 1.2.3 CLI Views ................................................................................................................ 1-3 1.3 CLI Features ...................................................................................................................... 1-9 1.3.1 Online Help.............................................................................................................. 1-9 1.3.2 Terminal Display.................................................................................................... 1-10 1.3.3 History Commands................................................................................................ 1-11 1.3.4 Error Messages ..................................................................................................... 1-11 1.3.5 Command Edit....................................................................................................... 1-12
Commands are grouped by level. This prevents unauthorized users from configuring switches with relevant commands. You can gain online help at any time by entering a question mark "?". Common diagnostic utilities (such as Tracert and Ping) are available. A variety of debugging information is available. A function similar to Doskey is provided for you to execute a history command. You can execute a command by entering part of the command in the CLI as long as the keywords you enter do not conflict those of other commands.
! ! ! ! !
Visit level: Commands at this level are mainly used to diagnose network and switch the language mode on the user interface, and they cannot be saved in configuration files. Such commands include ping, tracert, and language-mode.
Monitor level: Commands at this level are mainly used to maintain the system and diagnose service faults, and they cannot be saved in configuration files. Such commands include display and debugging.
System level: Commands at this level are mainly used to configure services. Commands concerning routing and network layers are at this level. These commands can be used to provide network services directly.
Manage level: Commands at this level are associated with the basic operation modules and support modules of the system. These commands provide supports for services. Commands concerning file system, FTP/TFTP/XModem downloading, user management, and level setting are at this level.
Users logging in to a switch also fall into four levels, which respectively correspond to the command levels. Users at a specific level can only use the commands at the same level or lower levels.
Switch from the current user level to the user level specified by the level argument
super [ level ]
" Note:
! !
By default, you switch from the current user level to level 3. For the purpose of security, you cannot see the password you enter on the screen. You will remain at the original user level if you fail to enter the correct password after you have tried more than three times.
User view System view Ethernet interface view VLAN view VLAN interface view Loopback interface view
Local user view User interface view FTP client view SFTP client view MST region view Cluster view Public key view Public key code view DHCP address pool view PIM view RIP view OSPF view OSPF area view Routing policy view Basic ACL view Advanced ACL view Layer 2 ACL view User-defined ACL view QoS profile view RADIUS scheme view ISP domain view HWPing view HWTACACS view MSDP view PoE profile view
Table 1-4 lists operations you can perform in these CLI views and details about commands used to enter these CLI views. Table 1-4 Operations in CLI views View Available operation Display operation status and statistical information Configure system parameters Prompt Enter method Quit method Execute the quit command in user view to log out of the switch. Execute the quit or return command to return to user view.
User view
<Quidway>
Enter user view once logging in to the switch. Execute the system-view command in user view.
System view
[Quidway]
View
Available operation
Prompt
Quit method
Execute the interface ethernet 1/0/1 command in system view. Gigabit Ethernet interface view Execute the interface gigabitetherne t 1/1/1 command in system view. Execute the vlan 1 command in system view.
Execute the quit command to return to system view. Execute the return command to return to user view.
VLAN view
[Quidway-vl an1]
Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view.
Configure IP interface parameters for VLANs and aggregated VLANs Configure loopback interface parameters
[Quidway-Vl an-interface 1]
[Quidway-L oopBack0]
[Quidway-lu ser-user1]
[Quidway-ui 0]
Available operation Configure FTP client parameters Configure SFTP client parameters
Prompt
Enter method Execute the ftp command in user view. Execute the sftp 10.1.1.1 command in system view. Execute the stp region-config uration command in system view.
Quit method Execute the quit command to return to user view. Execute the quit command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the peer-public-key end command to return to system view. Execute the public-key-code end command to return to public key view Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view.
[ftp]
sftp-client>
[Quidway-m st-region]
Cluster view
[Quidway-cl uster]
Execute the cluster command in system view. Execute the rsa peer-public-ke y a003 command in system view. Execute the public-key-co de begin command in public key code view Execute the dhcp server ip-pool a123 command in system view
[Quidway-rs a-public-key ]
[Quidway-rs a-key-code]
PIM view
[Quidway-pi m]
View
Available operation
Prompt
Enter method
Quit method Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to OSPF view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view.
RIP view
[Quidway-ri p]
OSPF view
[Quidway-o spf-1]
[Quidway-o spf-1-area0.0.0.1]
[Quidway-ro ute-policy]
Define sub-rules for a basic ACL (with ID ranging from 2000 to 2999) Define sub-rules for an advanced ACL (with ID ranging from 3000 to 3999) Define sub-rules for an layer 2 ACL (with ID ranging from 4000 to 4999)
[Quidway-a clbasic-2000]
[Quidway-a cladv-3000]
View
Available operation Define sub-rules for a user-defined ACL (with ID ranging from 5000 to 5999)
Prompt
Enter method
Quit method
[Quidway-a cl-user-500 0]
Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view. Execute the quit command to return to system view. Execute the return command to return to user view.
Define profile
QoS
[Quidway-ra dius-1]
HWPing view
HWTACA CS view
MSDP view
[Quidway-m sdp]
View
Available operation
Prompt
Enter method
Quit method Execute the quit command to return to system view. Execute the return command to return to user view.
" Note: The <Ctrl + Z> keys function as the return command does.
Enter a command, a space, and a "?" character. If a keyword is in the ? position of the command, all available keywords and their brief descriptions will be displayed on your terminal. The following takes the clock command as an example.
<Quidway> clock ? datetime Specify the time and date
Enter a command, a space, and a "?" character. If an argument is in the ? position of the command, all available arguments and their brief descriptions will be displayed on your terminal. The following takes the interface vlan command as an example.
[Quidway] interface vlan-interface ? <1-4094> VLAN interface number
<cr> The <cr> string means that no argument is available in the ? position. You can directly execute the command by pressing <Enter>.
Enter a command, a space, and a character string followed by a "?" character on your terminal to display all the keywords that belong to the command and begin with the string (if available). For example:
<Quidway> display ver? version
Enter the first several characters of a keyword in a command and then press <Tab>, the complete keyword will be displayed on the terminal screen if the input characters uniquely identify a keyword; all the keywords that match the input characters will be displayed on the terminal screen if the input characters match more than one keyword. You can use the language-mode command to display the help information in English.
The prompt information and help information can be displayed in Chinese or English. Display suspension. That is, the display of output information can be paused when the screen is full and you can then perform one of the three operations listed in Table 1-5 as needed.
Table 1-5 Display-related operations Operation Press <Ctrl+C> Function Suspend the display and execution of a command.
Function Scroll the output information up by one page. Scroll the output information up by one line.
Recall the previous history command Recall the next history command
" Note:
!
The Up and Down arrow keys can be used to recall history commands only in terminals running on Windows 3.x or Telnet running on Windows 3.x. You can press <Ctrl + P> or <Ctrl + N> in terminals running on Windows 9x to achieve the same purpose.
If you enter and execute the same command for multiple times, the command is buffered when it is entered for the first time.
Table 1-7 Common error messages Error message Description The command does not exist. The keyword does not exist. Unrecognized command The parameter type is wrong. The parameter value is out of range. Incomplete command Too many parameters Ambiguous command Wrong parameter found at '^' position The command entered is incomplete. You have entered too many parameters. The parameters entered are ambiguous. The parameter at the '^' position is incorrect.
Common key
Backspace key
Left arrow key or <Ctrl+B> Right arrow key or <Ctrl+F> Up arrow key or <Ctrl+P> Down arrow key or <Ctrl+N>
Press
To Utilize the partial online help. That is, when you enter an incomplete keyword and press the Tab key, if the input keyword uniquely identifies an existing keyword, the system substitutes the complete key word for the incomplete keyword; if the input keyword matches more than one keyword, all the keywords are displayed on the terminal screen, with each keyword on a line; if the input arguments matches no keyword, the system displays your original input on a new line without any change.
Tab key