Sie sind auf Seite 1von 14

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

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

Huawei Technologies Proprietary i

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

Chapter 1 CLI Configuration


1.1 Introduction to the CLI
Quidway series Ethernet switches provide a command line interface (CLI) and commands for you to configure and manage your switches. The CLI is featured by the following:
!

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.

! ! ! ! !

1.2 Command Level/Command View


To prevent unauthorized accesses, commands are grouped by level. Commands fall into four levels: visit, monitor, system, and manage.
!

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.

Huawei Technologies Proprietary 1-1

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

1.2.1 Switching between User Levels


You can switch from one user level to another by executing a related command and set a password for the switching as required after logging in to a switch.

I. Setting a password for user level switching


Table 1-1 lists the operations to set a password for user level switching. Table 1-1 Set a password for user level switching Operation Enter system view Set a password for switching from a lower user level to the user level specified by the level argument Command system-view Optional super password [ level level ] { simple | cipher } password A password is necessary only when a user switches from a lower user level to a higher user level. Description

II. Switching between user levels


Table 1-2 lists the operation to switch between user levels. Table 1-2 Switch between user levels Operation Command Description Required Execute this command in user view. If you have set a password for user level switching by using the super password command and you want to switch from a lower user level to a higher user level, you need to enter the correct password. Otherwise, you will remain at the original user level.

Switch from the current user level to the user level specified by the level argument

super [ level ]

Huawei Technologies Proprietary 1-2

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

" 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.

1.2.2 Configuring a Level for a Specific Command in a Specific View


You can configure a level for a specific command in a specific view. Commands fall into four levels: visit, monitor, system, and manage, which are identified as 0, 1, 2, and 3 respectively. The administrator can change the command level according to the requirements.. Table 1-3 lists the operations to configure a level for a specific command. Table 1-3 Configure a level for a specific command in a specific view Operation Enter system view Command system-view Required Configure a level for a specific command in a specific view command-privilege level level view view command It is forbidden to change the command level at will. Doing so may bring inconvenience to maintenance and operation. Description

1.2.3 CLI Views


CLI views are designed for different configuration tasks. They are related but distinguished. You will enter user view once you log in to a switch successfully, where you can view operation status and statistics information. After executing the system-view command, you can enter system view, where you can go into other views by entering corresponding commands. The following CLI views are provided:
! ! ! ! ! !

User view System view Ethernet interface view VLAN view VLAN interface view Loopback interface view

Huawei Technologies Proprietary 1-3

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510


! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! !

Chapter 1 CLI Configuration

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]

Huawei Technologies Proprietary 1-4

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

View

Available operation

Prompt

Enter method 100M Ethernet interface view

Quit method

[Quidway-E thernet1/0/1 ] Configure Ethernet interface parameters [Quidway-G igabitEthern et1/1/1]

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.

Ethernet interface view

Execute the quit command to return to system view. Execute the return command to return to user view.

VLAN view

Configure VLAN parameters

[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.

VLAN interface view

Configure IP interface parameters for VLANs and aggregated VLANs Configure loopback interface parameters

[Quidway-Vl an-interface 1]

Execute the interface vlan-interface 1 command in system view.

Loopback interface view

[Quidway-L oopBack0]

Execute the interface loopback 0 command in system view

Local user view

Configure local user parameters

[Quidway-lu ser-user1]

Execute the local-user user1 command in system view.

User interface view

Configure user interface parameters

[Quidway-ui 0]

Execute the user-interface 0 command in system view.

Huawei Technologies Proprietary 1-5

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

View FTP client view

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 view

sftp-client>

MST region view

Configure MST region parameters

[Quidway-m st-region]

Cluster view

Configure cluster parameters

[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

Public key view

Configure RSA public keys for SSH users

[Quidway-rs a-public-key ]

Public key code view

Edit RSA public key for SSH users

[Quidway-rs a-key-code]

DHCP address pool view

Configure DHCP address pool parameters

[Quidway-d hcp-pool-a1 23]

PIM view

Configure PIM parameters

[Quidway-pi m]

Execute the pim command in system view

Huawei Technologies Proprietary 1-6

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

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

Configure RIP parameters

[Quidway-ri p]

Execute the rip command in system view

OSPF view

Configure OSPF protocol parameters

[Quidway-o spf-1]

Execute the ospf command in system view

OSPF area view

Configure OSPF area parameters

[Quidway-o spf-1-area0.0.0.1]

Execute the area 1 command in OSPF view

Routing policy view

Configure routing policies

[Quidway-ro ute-policy]

Execute the route-policy policy1 permit node 10 command in system view

Basic ACL view

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]

Execute the acl number 2000 command in system view.

Advanced ACL view

[Quidway-a cladv-3000]

Execute the acl number 3000 command in system view.

Layer 2 ACL view

[Quidway-a cl-ethernetfr ame-4000]

Execute the acl number 4000 command in system view.

Huawei Technologies Proprietary 1-7

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

View

Available operation Define sub-rules for a user-defined ACL (with ID ranging from 5000 to 5999)

Prompt

Enter method

Quit method

User-defin ed ACL view

[Quidway-a cl-user-500 0]

Execute the acl number 5000 command in system 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. Execute the quit command to return to system view. Execute the return command to return to user view.

QoS profile view

Define profile

QoS

[Quidway-q os-profile-a 123]

Execute the qos-profile a123 command in system view

RADIUS scheme view

Configure RADIUS parameters

[Quidway-ra dius-1]

Execute the radius scheme 1 command in system view.

ISP domain view

Configure ISP domain parameters

[Quidway-is p-aaa163.n et]

Execute the domain aaa163.net command in system view.

HWPing view

Configure HWPing parameters

[Quidway-h wping-a123 -a123]

Execute the hwping a123 a123 command in system view

HWTACA CS view

Configure HWTACACS parameters

[Quidway-h wtacacs-a1 23]

Execute the hwtacacs scheme a123 command in system view

MSDP view

Configure MSDP parameters

[Quidway-m sdp]

Execute the msdp command in system view

Huawei Technologies Proprietary 1-8

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

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.

PoE profile view

Configure PoE profile parameters

[Quidway-p oe-profile-a 123]

Execute the poe-profile a123 command in system view

" Note: The <Ctrl + Z> keys function as the return command does.

1.3 CLI Features


1.3.1 Online Help
CLI provides two types of online help: complete online help and partial online help. You can obtain help information necessary for the switch configuration.

I. Complete online help


Enter a "?" character in any view on your terminal to display all the commands available in the view and their brief descriptions. The following takes user view as an example.
<Quidway> ? User view commands: backup boot cd clock cluster copy debugging delete dir display <omitted> Backup current configuration Set boot option Change current directory Specify the system clock Run cluster command Copy from one file to another Enable system debugging functions Delete a file List files on a file system Display current system information

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

Huawei Technologies Proprietary 1-9

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510


summer-time timezone Configure summer time Configure time zone

Chapter 1 CLI Configuration

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

[Quidway] interface vlan-interface 1 ?

<cr> The <cr> string means that no argument is available in the ? position. You can directly execute the command by pressing <Enter>.

II. Partial online help


Enter a character string followed by a "?" character on your terminal to display all the commands beginning with the string. For example:
<Quidway> pi? ping

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.

1.3.2 Terminal Display


CLI provides the following display features:
!

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.

Huawei Technologies Proprietary 1-10

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

Operation Press the space key Press <Enter>

Function Scroll the output information up by one page. Scroll the output information up by one line.

1.3.3 History Commands


The CLI provides a function similar to Doskey to store the history commands automatically. You can recall and execute these history commands at any time. By default, the CLI can store 10 history commands for each user. Table 1-6 lists history command-related operations. Table 1-6 Access history commands Operation Display commands history Operation Execute the display history-command command Press the up-arrow key or <Ctrl+P> Pressing the down-arrow key or <Ctrl+N> Description This command displays valid history commands. This operation recalls the previous history command (if available). This operation recalls the next history command (if available).

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.

1.3.4 Error Messages


If the command you enter passes the syntax check, it will be successfully executed; otherwise an error message will appear. Table 1-7 lists the common error messages.

Huawei Technologies Proprietary 1-11

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

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.

1.3.5 Command Edit


The CLI provides basic command edit functions and supports multi-line editing. The maximum number of characters a command can contain is 254. Table 1-8 lists the CLI edit operations. Table 1-8 Edit operations Press To Insert the character the key represents at the cursor and move the cursor one character to the right if the edit buffer is not full. Delete the character on the left of the cursor and move the cursor one character to the left. Move the cursor one character to the left. Move the cursor one character to the right. Display history commands.

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>

Huawei Technologies Proprietary 1-12

Operation Manual CLI Quidway S3900 Series Ethernet Switches-Release 1510

Chapter 1 CLI Configuration

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

Huawei Technologies Proprietary 1-13

Das könnte Ihnen auch gefallen