No part of this documentation may be reproduced or transmitted in any form or by any means without
prior written consent of Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
HEWLETT-PACKARD COMPANY MAKES NO WARRANTY OF ANY KIND WITH REGARD TO THIS
MATERIAL, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE. Hewlett-Packard shall not be liable for errors contained
herein or for incidental or consequential damages in connection with the furnishing, performance, or
use of this material.
The only warranties for HP products and services are set forth in the express warranty statements
accompanying such products and services. Nothing herein should be construed as constituting an
additional warranty. HP shall not be liable for technical or editorial errors or omissions contained
herein.
Logging in to the switch commands··························································································································13
terminal type ·························································································································································· 40
user privilege level ················································································································································41
user-interface·························································································································································· 42
FTP server configuration commands····························································································································· 44
display ftp-server···················································································································································· 44
display ftp-user······················································································································································· 45
free ftp user ···························································································································································· 46
ftp server acl ·························································································································································· 46
ftp server enable···················································································································································· 47
ftp timeout······························································································································································· 47
ftp update······························································································································································· 48
Index ········································································································································································ 210
v
CLI configuration commands
command-alias enable
Syntax
command-alias enable
undo command-alias enable
View
System view
Default level
2: System level
Parameters
None
Description
Use the command-alias enable command to enable the command alias function.
Use the undo command-alias enable command to disable the command alias function.
By default, the command alias function is disabled.
cmdkey: The complete form of the first keyword of a command.
1
alias: Specifies the command alias, which cannot be the same as the first keyword of an existing
command.
Description
Use the command-alias mapping command to configure command aliases.
Use the undo command-alias mapping command to delete command aliases.
By default, a command has no alias.
The configured alias takes effect only after you enable the command alias function.
Examples
# Configure command aliases by specifying show to replace the display keyword.
<Sysname> system-view
[Sysname] command-alias mapping display show
After configuring the command aliases, the display commands have their aliases. For example, if the
original command is display clock, now its alias is show clock and you can input the alias to view the
system time and date.
# Delete the command aliases by canceling the replacement of the display keyword.
level level: Command level, in the range of 0 to 3.
view view: Specifies a view. The value shell represents a user view. The view argument must be the view
where the command resides.
command: Command to be set in the specified view.
Description
Use the command-privilege command to assign a level for the specified command in the specified view.
Use the undo command-privilege view command to restore the default.
By default, each command in a view has a specified level.
Command levels include four privileges: visit (0), monitor (1), system (2), and manage (3). You can
assign a privilege level according to the user’s need. When logging in to the switch, the user can access
the assigned level and all levels below it.
2
• Level changes can cause maintenance, operation, and security problem. HP recommends that you
use the default command level or that you modify the command level under the guidance of
professional staff.
•The command specified in the command-privilege command must be complete, and has valid
arguments. For example, the default level of the tftp server-address { get | put | sget }
source-filename [ destination-filename ] [ source { interface interface-type interface-number | ip
source-ip-address } ] command is 3. After the command-privilege level 0 view shell tftp 1.1.1.1 put
a.cfg command is executed, when users with the user privilege level of 0 log in to the switch, they
can execute the tftp server-address putsource-filename command (such as the tftp 192 .168 .1. 26 put
syslog.txt command), but cannot execute the command with the get, sget or source keyword, and
cannot specify the destination-filename argument.
•The command specified in the undo command-privilege view command can be incomplete. For
example, after the undo command-privilege viewsystem ftp command is executed, all commands
starting with the keyword ftp (such as ftp server acl, ftp server enable, and ftp timeout) are restored
to their default level. If you have modified the level of commands ftp server enable and ftp timeout,
and you want to restore only the ftp server enable command to its default level, you should use the
undo command-privilege view system ftp server command.
• If you modify the command level of a command in a specified view from the default command level
to a lower level, remember to modify the command levels of the quit c
corresponding command used to enter this view. For example, the default command level of
commands interface and system-view is 2 (system level). If you want to make the interface
command available to the level 1 users, you need to execute the following three commands:
command-privilege level 1 view shell system-view, command-privilege level 1 view system
interface GigabitEthernet 2/0/1, and command-privilege level 1 view system quit. Then, the level
1 users can enter system view, execute the interface GigabitEthernet command, and return to user
view.
ommand and the
Examples
# Set the command level of the system-view command to 3 in system view. (By default, level 2 and level
3 users can use the system-view command. After the configuration, only level 3 users can use this
command.)
display command-alias [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display command-alias command to display defined command aliases and the corresponding
commands.
Examples
# Display the defined command aliases and the corresponding commands.
<Sysname> display command-alias
Command alias is enabled
index alias command key
1 show display
4
display history-command
Syntax
display history-command [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display history-command command to display commands saved in the history command buffer.
By default, the system saves the last 10 executed commands in the history command buffer.
To set the size of the history command buffer, use the history-command max-size command. For more
information, see the chapter “Logging in to the switch commands.”
=System hotkeys=
Hotkeys Function
CTRL_A Move the cursor to the beginning of the current line.
CTRL_B Move the cursor one character left.
CTRL_C Stop current command function.
CTRL_D Erase current character.
CTRL_E Move the cursor to the end of the current line.
CTRL_F Move the cursor one character right.
CTRL_H Erase the character left of the cursor.
CTRL_K Kill outgoing connection.
CTRL_N Display the next command from the history buffer.
CTRL_P Display the previous command from the history buffer.
CTRL_R Redisplay the current line.
CTRL_V Paste text from the clipboard.
CTRL_W Delete the word left of the cursor.
CTRL_X Delete all characters up to the cursor.
CTRL_Y Delete all characters after the cursor.
CTRL_Z Return to the User View.
CTRL_] Kill incoming connection or redirect connection.
ESC_B Move the cursor one word back.
ESC_D Delete remainder of word.
ESC_F Move the cursor forward one word.
ESC_N Move the cursor down a line.
ESC_P Move the cursor up a line.
ESC_< Specify the beginning of clipboard.
Use the return command to return to user view from the current view, which can also be done with the hot
key Ctrl+Z.
Related commands: quit.
Examples
# Return to user view from GigabitEthernet 2/0/1 view.
[Sysname-GigabitEthernet2/0/1] return
<Sysname>
screen-length disable
Syntax
screen-length disable
undo screen-length disable
View
User view
Default level
1: Monitor level
8
Parameters
None
Description
Use the screen-length disable command to disable the multiple-screen output function.
Use the undo screen-length disable command to enable the multiple-screen output function.
By default, a login user uses the settings of the screen-length command. The default settings of the screen-length command are: multiple-screen output is enabled and 24 lines are displayed on the next
screen. (For more information about the screen-length command, see the chapter “Logging in to the
switch commands.”)
Disabling the multiple-screen output function prevents you from viewing the information in time because
the information refreshes continuously.
When the user logs out, the settings restore to their default values.
Examples
# Disable multiple-screen output for the current user.
<Sysname> screen-length disable
super
Syntax
super [ level ]
View
User view
Default level
0: Visit level
Parameters
level: User level, in the range of 0 to 3. The default value is 3.
Description
Use the super command to switch from the current user privilege level to a specified user privilege level.
If a level is not specified, the command switches the user privilege level to 3. Command levels include four
privileges: visit (0), monitor (1), system (2), and manage (3). You can assign a privilege level according
to the user’s need. When logging in to the switch, the user can access the assigned level and all levels
below it.
A user can switch to a lower privilege level unconditionally. An AUX user can switch to a higher privilege
level without inputting any password. A VTY user must input the switching password set by the super password command to switch to a higher privilege level. If the password is incorrect or no password is
configured, the switching operation fails.
Examples
Related commands: super password.
# Switch to user privilege level 2 (The current user privilege level is 3.).
<Sysname> super 2
User privilege level is 2, and only those commands can be used
9
whose level is equal or less than this.
Privilege note: 0-VISIT, 1-MONITOR, 2-SYSTEM, 3-MANAGE
# Switch the user privilege level back to 3 (switching password 12 3 has been set. If no password is set,
the user privilege level cannot be switched to 3.).
<Sysname> super 3
Password:
User privilege level is 3, and only those commands can be used
whose level is equal or less than this.
Privilege note: 0-VISIT, 1-MONITOR, 2-SYSTEM, 3-MANAGE
super authentication-mode
Syntax
super authentication-mode { local | scheme } *
undo super authentication-mode
View
System view
Default level
2: System level
Parameters
local: Authenticates a user by using the local password set with the super password command. When no
password is set with the super password command, two results can occur: The privilege level switch
succeeds if the user is logged in through the console port. The switch fails if the user logs in through a VTY
user interface or inputs an incorrect switch password.
scheme: AAA authentication. For more information about AAA, see Security Configuration Guide.
local scheme: First local and then scheme, which means to authenticate a user by using the local
password first. If no password is set for the user logged in through the console port, the privilege level
switch succeeds. If no password is set for the user logged in through a VTY user interface, the AAA
authentication is performed.
scheme local: First scheme and then local, which means that AAA authentication is performed first. If the
AAA configuration is invalid (the domain parameters or authentication scheme are not configured) or the
server does not respond, the local password authentication is performed.
Description
Use the super authentication-mode command to set the authentication mode for user privilege level
switch.
Use the undo super authentication-mode command to restore the default.
By default, the authentication mode for the user privilege level switch is local.
Related commands: super password.
Examples
# Set the authentication mode for the user privilege level switch to local.
<Sysname> system-view
[Sysname] super authentication-mode local
10
# Set the authentication mode for the user privilege level switch to scheme local.
<Sysname> system-view
[Sysname] super authentication-mode scheme local
ipv6: When this keyword is present, the command supports IPv6; otherwise, it supports IPv4.
acl-number: Number of the access control list (ACL):
• Basic ACL: 2000 to 2999
• Advanced ACL: 3000 to 3999
• Ethernet frame header ACL: 4000 to 4999
inbound: Restricts Telnet or SSH connections established in the inbound direction through the VTY user
interface. If the received packets for establishing a Telnet or SSH connection are permitted by an ACL rule,
the connection is allowed to be established. When the device functions as a Telnet server or SSH server,
this keyword is used to control access of Telnet clients or SSH clients.
outbound: Restricts Telnet connections established in the outbound direction through the VTY user
interface. If the packets sent for establishing a Telnet connection are permitted by an ACL rule, the
connection is allowed to be established. When the device functions as a Telnet client, this keyword is
used to define Telnet servers accessible to the client.
Description
Use the acl command to reference ACLs to control access to the VTY user interface.
Use the undo acl command to cancel the ACL application. For more information about ACL, see ACL and QoS Configuration Guide.
By default, access to the VTY user interface is not restricted.
• If no ACL is referenced in VTY user interface view, the V TY user interface has no access control over
establishing a Telnet or SSH connection.
• If an ACL is referenced in VTY user interface view, the connection is permitted to be established
only when packets for establishing a Telnet or SSH connection match a permit statement in the ACL.
13
Examples
The system regards the basic/advanced ACL with the inbound keyword, the basic/advanced ACL with
the outbound keyword, and Ethernet frame header ACL as different types of ACLs, which can coexist in
one VTY user interface. The match order is basic/advanced ACL, Ethernet frame header ACL. At most
one ACL of each type can be referenced in the same VTY user interface, and the last configured one
takes effect.
# Allow only the user with the IP address of 192.168.1.26 to access the device through Telnet or SSH.
After your configuration, user A (with IP address 192.168.1.26) can Telnet to the device while user B (with
IP address 192.168.1.60) cannot Telnet to the device. Upon a connection failure, a message appears,
saying "%connection closed by remote host!"
# Allow the device to only Telnet to the Telnet server with IP address 192.168.1.41.
After your configuration, if you Telnet to 192.168.1.46, your operation fails.
<Sysname> telnet 192.168.1.46
%Can't access the host from this terminal!
But you can Telnet to 192.168.1.41.
<Sysname> telnet 192.168.1.41
Trying 192.168.1.41 ...
Press CTRL+K to abort
Connected to 192.168.1.41 ...
activation-key
Syntax
activation-key character
undo activation-key
View
User interface view
Default level
3: Manage level
14
Parameters
character: Shortcut key for starting a terminal session, a single character (or its corresponding ASCII
code value that ranges from 0 to 127) or a string of 1 to 3 characters. However, only the first character
functions as the shortcut key. For example, if you input an ASCII code value of 97, the system uses its
corresponding character a as the shortcut key. If you input string b@c, the system uses the first character
b as the shortcut key.
Description
Use the activation-key command to define a shortcut key for starting a terminal session.
Use the undo activation-key command to restore the default.
By default, pressing the Enter key starts a terminal session. However, if a new shortcut key is defined with
the activation-key command, the Enter key no longer functions. To display the shortcut key you have
defined, use the display current-configuration | include activation-key command.
NOTE:
The activation-key command is not supported by the VTY user interface.
Examples
# Configure character s as the shortcut key for starting a terminal session on the console port.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] activation-key s
To verify the configuration:
• Exit the terminal session on the console port.
[Sysname-ui-aux0] return
<Sysname> quit
• Log in to the console port again. The following message appears.
******************************************************************************
* Copyright (c) 2010-2011 Hewlett-Packard Development Company, L.P. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
User interface aux0 is available.
Please press ENTER.
• At this moment, pressing Enter does not start a session. To start the terminal session, enter s.
command: Specifies a command to be automatically executed.
Description
Use the auto-execute command command to specify a command to be automatically executed when a
user logs in to the current user interface.
Use the undo auto-execute command command to remove the configuration.
By default, command auto-execution is disabled.
The auto-executecommand command is not supported by the AUX user interface.
The system automatically executes the specified command when a user logs in to the user interface, and
tears down the user connection after the command is executed. If the command triggers another task, the
system does not tear down the user connection until the task is completed.
Examples
Typically, you can use the auto-execute commandtelnet command in user interface view to enable a user
to automatically Telnet to the specified host when the user logs in to the device. After the user terminates
the connection with the host, the user’s connection with the device is automatically terminated.
CAUTION:
The auto-execute command command may disable you from configuring the system through the user
interface to which the command is applied. Before confi
uring the command and saving the configuration
(by using the save command), make sure that you can access the device through VTY or AUX user
interfaces to remove the configuration when a problem occurs.
# Configure the device to automatically Telnet to 192.168.1.41 after a user logs in to interface VTY 0.
<Sysname> system-view
<Sysname> system-view
[Sysname] user-interface vty 0
[Sysname -ui-vty0] auto-execute command telnet 192.168.1.41
% This action will lead to configuration failure through ui-vty0. Are you sure?
[Y/N]:y
[Sysname-ui-vty0]
To verify the configuration:
Tel net to 19 2.168 .1.4 0 . T h e d e vic e aut o ma tic a ll y Tel n et s to 19 2.168 .1.41. T he f oll owin g ou tpu t is
displayed:
C:\> telnet 192.168.1.40
******************************************************************************
* Copyright (c) 2010-2011 Hewlett-Packard Development Company, L.P. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
<Sysname>
Trying 192.168.1.41 ...
Press CTRL+K to abort
Connected to 192.168.1.41 ...
******************************************************************************
* Copyright (c) 2010-2011 Hewlett-Packard Development Company, L.P. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<Sysname.41>
This operation is the same as directly logging in to the device at 192.168.1.41. If the Telnet connection to
192.168.1.41 is broken down, the Telnet connection to 192.168.1.40 breaks down at the same time.
authentication-mode
Syntax
authentication-mode { none | password | scheme }
undo authentication-mode
View
User interface view
Default level
3: Manage level
Parameters
none: Performs no authentication.
password: Performs local password authentication.
scheme: Performs AAA authentication. For more information about AAA, see Security Configuration Guide.
Description
Use the authentication-mode command to set the authentication mode for the user interface.
Use the undo authentication-mode command to restore the default.
By default, the authentication mode for VTY user interfaces is password, and for AUX user interfaces is none.
Related commands: set authentication password.
Examples
# Specify that no authentication is needed for VTY 0. (This mode is insecure.)
Use the databits command to set data bits for each character.
Use the undo databits command to restore the default.
By default, 8 data bits are set for each character.
NOTE:
• The command is only applicable to the asynchronous serial port (console port).
• The data bits settin
must be the same for the user interfaces of the connecting ports on the device and
the terminal device for communication.
Examples
# Specify 5 data bits for each character.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] databits 5
display telnet client configuration
Syntax
display telnet client configuration [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display telnet client configuration command to display the configuration of the device when it
serves as a Telnet client.
Examples
# Display the configuration of the device when it serves as a Telnet client.
<Sysname> display telnet client configuration
The source IP address is 1.1.1.1.
The output shows that when the device serves as a client, the source IPv4 address for sending Telnet
p a c k et s i s 1.1.1.1.
20
display user-interface
Syntax
display user-interface [ num1 | { aux | vty } num2 ] [ summary ] [ | { begin | exclude | include }
regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
num1: Absolute number of a user interface. The value range varies with devices, and typically starts from
0.
aux: Specifies the AUX user interface.
vty: Specifies the VTY user interface.
num2: Relative number of a user interface. The value range varies with devices for an AUX user interface
and the value is in the range of 0 to 15 for a VTY user interface.
summary: Displays summary about user interfaces.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display user-interface command to display information about the specified or all user interfaces.
If the summary keyword is not included, the command displays the type of the user interface, absolute or
relative number, transmission rate, user privilege level, authentication mode, and the access port.
If the summary keyword is included, the command displays all the numbers and types of user interfaces.
Examples
# Display information about user interface 0.
<Sysname> display user-interface 0
Idx Type Tx/Rx Modem Privi Auth Int
F 0 AUX 0 9600 - 3 N -
+ : Current user-interface is active.
F : Current user-interface is active and work in async mode.
Idx : Absolute index of user-interface.
Type : Type and relative index of user-interface.
Privi: The privilege of user-interface.
Auth : The authentication mode of user-interface.
Int : The physical location of UIs.
21
A : Authentication use AAA.
L : Authentication use local database.
N : Current UI need not authentication.
P : Authentication use current UI's password.
Table 1 Output description
Field Description
+ The current user interface is active.
F The current user interface is active and works in asynchronous mode.
Idx Absolute number of the user interface.
Type Type and relative number of the user interface.
Tx/Rx Transmission/Receive rate of the user interface
Modem
Whether the modem is allowed to dial in (in), dial out (out), or both (inout)
By default, the character - is displayed to indicate that this function is disabled.
Privi Indicates the command level of a user under that user interface
Auth Authentication mode for the users, which can be A, P, L, and N.
Int
The physical port that corresponds to the user interface. (For AUX and VTY user interfaces,
- is displayed.)
A AAA authentication
L Local authentication (not supported)
N No authentication
P Password authentication
# Display summary about all user interfaces.
<Sysname> display user-interface summary
User interface type : [AUX]
0:UX
User interface type : [VTY]
18:UXXX XXXX XXXX XXXX
2 character mode users. (U)
16 UI never used. (X)
2 total UI in use
Table 2 Output description
Field Description
User interface type Type of user interface (AUX/VTY)
0:X
character mode users. (U) Number of users, or, the total number of character U.
UI never used. (X)
0 represents the absolute number of the user interface. X means this
user interface is not used; U means this user interface is in use.
Number of user interfaces not used, or, the total number of
character X.
22
Field Description
total UI in use Total number of user interfaces in use
display users
Syntax
display users [ all ] [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
1: Monitor level
Parameters
all: Displays information about all user interfaces that the device supports.
|: Filters command output by specifying a regular expression. For more information about regular
expressions, see Fundamentals Configuration Guide.
begin: Displays the first line that matches the specified regular expression and all lines that follow.
exclude: Displays all lines that do not match the specified regular expression.
include: Displays all lines that match the specified regular expression.
regular-expression: Specifies a regular expression, a case-sensitive string of 1 to 256 characters.
Description
Use the display users command to display information about the user interfaces that are being used.
Use the display users all command to display information about all user interfaces supported by the
device.
Examples
# Display information about the user interfaces that are being used.
<Sysname> display users
The user application information of the user interface(s):
Idx UI Delay Type Userlevel
+ 18 VTY 0 00:00:00 TEL 3
19 VTY 1 00:02:34 TEL 3
Following are more details.
VTY 0 :
Location: 192.168.1.54
VTY 1 :
Location: 192.168.1.58
+ : Current operation user.
F : Current operation user work in async mode.
The output shows that two users have logged in to the device. The one with IP address 192.168.1.54 uses
VTY 0, and the other with IP address 192.168.1.58 uses VTY 1.
23
Loading...
+ 190 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.