Vous êtes sur la page 1sur 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

Command

Enter system view

system-view

Set a password for


switching from a lower
user level to the user level
specified by the level
argument

Description

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.

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.

Switch from the current


user level to the user level
specified by the level
argument

super [ level ]

Huawei Technologies Proprietary


1-2

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.

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

Command

Enter system view

system-view

Description

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.

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
!

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

Chapter 1 CLI Configuration

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

User view

Display
operation
status
and
statistical
information

System
view

Configure
system
parameters

Prompt

Enter method

Quit method

<Quidway>

Enter user view


once logging in
to the switch.

Execute the quit


command in user
view to log out of the
switch.

[Quidway]

Execute
the
system-view
command
in
user view.

Execute the quit or


return command to
return to user view.

Huawei Technologies Proprietary


1-4

Operation Manual CLI


Quidway S3900 Series Ethernet Switches-Release 1510

View

Available
operation

Prompt

Chapter 1 CLI Configuration

Enter method

Quit method

100M Ethernet
interface view
[Quidway-E
thernet1/0/1
]

Ethernet
interface
view

Configure
Ethernet
interface
parameters

Gigabit
Ethernet
interface view
[Quidway-G
igabitEthern
et1/1/1]

VLAN
view

Configure
VLAN
parameters

VLAN
interface
view

Configure IP
interface
parameters
for
VLANs
and
aggregated
VLANs

Loopback
interface
view

Configure
loopback
interface
parameters

Local user
view

Configure
local
user
parameters

User
interface
view

Configure
user
interface
parameters

Execute
the
interface
ethernet 1/0/1
command
in
system view.

Execute
the
interface
gigabitetherne
t
1/1/1
command
in
system view.

[Quidway-vl
an1]

Execute
the
vlan
1
command
in
system view.

[Quidway-Vl
an-interface
1]

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

[Quidway-L
oopBack0]

Execute
the
interface
loopback
0
command
in
system view

[Quidway-lu
ser-user1]

Execute
the
local-user
user1
command
in
system view.

[Quidway-ui
0]

Execute
the
user-interface
0 command in
system view.

Huawei Technologies Proprietary


1-5

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.

Operation Manual CLI


Quidway S3900 Series Ethernet Switches-Release 1510

View

Available
operation

FTP client
view

Configure
FTP
client
parameters

SFTP
client view

Configure
SFTP client
parameters

MST
region
view

Configure
MST region
parameters

Cluster
view

Configure
cluster
parameters

Public key
view

Configure
RSA public
keys for SSH
users

Public key
code view

Edit
RSA
public key for
SSH users

DHCP
address
pool view

Configure
DHCP
address pool
parameters

PIM view

Configure
PIM
parameters

Prompt

Chapter 1 CLI Configuration

Enter method

Quit method

[ftp]

Execute the ftp


command
in
user view.

Execute the quit


command to return
to user view.

sftp-client>

Execute
the
sftp 10.1.1.1
command
in
system view.

Execute the quit


command to return
to user view.

[Quidway-m
st-region]

Execute
the
stp
region-config
uration
command
in
system view.

[Quidway-cl
uster]

Execute
the
cluster
command
in
system view.

[Quidway-rs
a-public-key
]

Execute
the
rsa
peer-public-ke
y
a003
command
in
system view.

Execute
the
peer-public-key
end command to
return to system
view.

[Quidway-rs
a-key-code]

Execute
the
public-key-co
de
begin
command
in
public key code
view

Execute
the
public-key-code
end command to
return to public key
view

[Quidway-d
hcp-pool-a1
23]

Execute
the
dhcp
server
ip-pool a123
command
in
system view

[Quidway-pi
m]

Execute
the
pim command
in system view

Huawei Technologies Proprietary


1-6

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.

Operation Manual CLI


Quidway S3900 Series Ethernet Switches-Release 1510

View

RIP view

OSPF
view

OSPF
area view

Available
operation

Configure
RIP
parameters

Configure
OSPF
protocol
parameters

Configure
OSPF area
parameters

Routing
policy
view

Configure
routing
policies

Basic ACL
view

Define
sub-rules for
a basic ACL
(with
ID
ranging from
2000
to
2999)

Advanced
ACL view

Define
sub-rules for
an advanced
ACL (with ID
ranging from
3000
to
3999)

Layer
2
ACL view

Define
sub-rules for
an layer 2
ACL (with ID
ranging from
4000
to
4999)

Prompt

[Quidway-ri
p]

Chapter 1 CLI Configuration

Enter method

Execute the rip


command
in
system view

[Quidway-o
spf-1]

Execute
the
ospf command
in system view

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

Execute
the
area
1
command
in
OSPF view

[Quidway-ro
ute-policy]

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

[Quidway-a
clbasic-2000]

Execute the acl


number 2000
command
in
system view.

[Quidway-a
cladv-3000]

Execute the acl


number 3000
command
in
system view.

[Quidway-a
cl-ethernetfr
ame-4000]

Execute the acl


number 4000
command
in
system view.

Huawei Technologies Proprietary


1-7

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.

Operation Manual CLI


Quidway S3900 Series Ethernet Switches-Release 1510

View

Available
operation

User-defin
ed
ACL
view

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

QoS
profile
view

RADIUS
scheme
view

ISP
domain
view

HWPing
view

HWTACA
CS view

MSDP
view

Define
profile

QoS

Configure
RADIUS
parameters

Configure
ISP domain
parameters

Configure
HWPing
parameters

Configure
HWTACACS
parameters

Configure
MSDP
parameters

Prompt

Chapter 1 CLI Configuration

Enter method

[Quidway-a
cl-user-500
0]

Execute the acl


number 5000
command
in
system view

[Quidway-q
os-profile-a
123]

Execute
the
qos-profile
a123 command
in system view

[Quidway-ra
dius-1]

Execute
the
radius
scheme
1
command
in
system view.

[Quidway-is
p-aaa163.n
et]

Execute
the
domain
aaa163.net
command
in
system view.

[Quidway-h
wping-a123
-a123]

Execute
the
hwping a123
a123 command
in system view

[Quidway-h
wtacacs-a1
23]

Execute
the
hwtacacs
scheme a123
command
in
system view

[Quidway-m
sdp]

Execute
the
msdp
command
in
system view

Huawei Technologies Proprietary


1-8

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

Operation Manual CLI


Quidway S3900 Series Ethernet Switches-Release 1510

View

PoE
profile
view

Available
operation

Configure
PoE profile
parameters

Chapter 1 CLI Configuration

Prompt

Enter method

[Quidway-p
oe-profile-a
123]

Execute
the
poe-profile
a123 command
in system view

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.

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

Backup current configuration

boot

Set boot option

cd

Change current directory

clock

Specify the system clock

cluster

Run cluster command

copy

Copy from one file to another

debugging

Enable system debugging functions

delete

Delete a file

dir

List files on a file system

display

Display current system information

<omitted>

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

Configure summer time

timezone

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

Operation

Chapter 1 CLI Configuration

Function

Press the space key

Scroll the output information up by one page.

Press <Enter>

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

Operation

Description

Execute
the
display
history-command
command

This command displays


valid history commands.

Recall
the
previous
history command

Press the up-arrow key or


<Ctrl+P>

This operation recalls the


previous
history
command (if available).

Recall the next history


command

Pressing the down-arrow


key or <Ctrl+N>

This operation recalls the


next history command (if
available).

Display
commands

history

" 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

The command entered is incomplete.

Too many parameters

You have entered too many parameters.

Ambiguous command

The parameters entered are ambiguous.

Wrong parameter found at '^' position

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

Common key

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.

Backspace key

Delete the character on the left of the


cursor and move the cursor one
character to the left.

Left arrow key or <Ctrl+B>

Move the cursor one character to the


left.

Right arrow key or <Ctrl+F>

Move the cursor one character to the


right.

Up arrow key or <Ctrl+P>

Display history commands.

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

Vous aimerez peut-être aussi