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
Table 3 Output description
Field Description
Idx Absolute number of the user interface
UI
Delay Time elapsed since the user's last input, in the format of hh:mm:ss.
Type User type, such as Telnet or SSH.
Userlevel User level: 0 for visit, 1 for monitor, 2 for system, and 3 for manage.
+ Current user
Location IP address of the user
F The current user works in asynchronous mode
escape-key
Syntax
Relative number of the user interface. For example, with VTY, the first column
represents user interface type, and the second column represents the relative number of
the user interface.
escape-key { default | character }
undo escape-key
View
User interface view
Default level
3: Manage level
Parameters
character: Specifies the shortcut key for terminating a task, a single character (or its corresponding ASCII
code value in the range 0 to 127) or a string of 1 to 3 characters. Only the first character of a string
functions as the shortcut key. For example, if you enter an ASCII code value of 113 , t h e s ys te m u s es i t s
corresponding character q as the shortcut key. If you enter the string q@c, the system uses the first
character q as the shortcut key.
default: Restores the default escape key combination of Ctrl+C.
Description
Use the escape-key command to define a shortcut key for terminating a task.
Use the undo escape-key command to disable the shortcut key for terminating tasks.
By default, you can use Ctrl+C to terminate a task.
After you define a new shortcut key by using the escape-key command, the new shortcut key is used to
terminate a task. To display the shortcut key you have defined, use the display current-configuration
command.
If you set the character argument in a user interface to log in to the device and then Telnet to another
device, the character argument can be used as a control character to terminate a task rather than used
as a common character. For example, if you specify character e in VTY 0 user interface of Device A,
when you log in to Device A by using VTY 0 from a PC (Hyper Terminal), you can input e as a common
24
Examples
character on the PC, and you can also use e to terminate the task running on Device A. If you Telnet to
Device B from Device A, you can only use e to terminate the task running on Device B, rather than use e
as a common character, so specify character as a key combination.
# Define key a as the shortcut key for terminating a task.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] escape-key a
To verify the configuration:
# Ping the IP address of 192.168.1.49 and use the -c keyword to specify the number of ICMP echo packets
to be sent as 20.
<Sysname> ping -c 20 192.168.1.49
PING 192.168.1.49: 56 data bytes, press a to break
Reply from 192.168.1.49: bytes=56 Sequence=1 ttl=255 time=3 ms
Reply from 192.168.1.49: bytes=56 Sequence=2 ttl=255 time=3 ms
# Enter a. The task terminates immediately and the system returns to system view.
0.00% packet loss
round-trip min/avg/max = 3/3/3 ms
<Sysname>
flow-control
Syntax
flow-control { hardware | none | software }
undo flow-control
View
User interface view
Default level
2: System level
Parameters
hardware: Performs hardware flow control.
none: Disables flow control.
software: Performs software flow control.
Description
Use the flow-control command to configure the flow control mode.
Use the undo flow-control command to restore the default.
By default, the flow control mode is none, which means no flow control is performed.
25
A flow control mode takes effect on both inbound and outbound directions. In inbound flow control, the
local device listens to the remote device for flow control information while in the outbound flow control,
the local device sends flow control information to the remote device.
Two ends must be configured with the same flow control mode.
NOTE:
• The command is only applicable to the asynchronous serial port (console port).
• The switch supports the none flow control mode only.
Examples
# Configure no flow control in the inbound and outbound directions for AUX 0.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] flow-control none
free user-interface
Syntax
free user-interface { num1 | { aux | vty } num2 }
View
User view
Default level
3: Manage 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.
Description
Use the free user-interface command to release the connection(s) established on the specified user
interface.
This command cannot release the connection that you are using.
Examples
# Release the connection established on user interface VTY 1.
• Display the users that are operating the device.
<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:09:51 TEL 3
Following are more details.
26
VTY 0 :
Location: 192.168.0.10
VTY 1 :
Location: 192.168.0.5
+ : Current operation user.
F : Current operation user work in async mode.
• If the operations of the user using VTY 1 affect the operations of the administrator, log out the user.
<Sysname> free user-interface vty 1
Are you sure to free user-interface vty1? [Y/N]:y
history-command max-size
Syntax
history-command max-size size-value
undo history-command max-size
View
User interface view
Default level
2: System level
Parameters
size-value: Specifies the maximum number of history commands that the buffer can store. The value is in
the range of 0 to 256.
Description
Use the history-command max-size command to set the size of the history command buffer of the current
user interface.
Use the undo history-command max-size command to restore the default.
By default, the buffer saves 10 history commands.
The history command buffer saves executed history commands per user interface and buffers for different
user interfaces do not affect each other. To displ ay the commands that are stored in the history buffer, use
the display history-command command. To view the recently executed commands, press the upper
arrow or lower arrow key. For more information about the display history-command command, see
Fundamentals Command Reference.
After you terminate the current session, the system automatically removes the commands saved in the
corresponding history buffer.
Examples
# Set the buffer to store 20 history commands at most.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] history-command max-size 20
idle-timeout
Syntax
27
idle-timeout minutes [ seconds ]
undo idle-timeout
View
User interface view
Default level
2: System level
Parameters
minutes: Specifies the timeout time in minutes, in the range of 0 to 35791. The default value is 10 minutes.
seconds: Specifies timeout time in seconds, in the range of 0 to 59. The default value is 0 seconds.
Description
Use the idle-timeout command to set the idle-timeout timer.
Use the undo idle-timeout command to restore the default.
The default idle-timeout is 10 minutes.
NOTE:
• The system automatically terminates the user’s connection(s) if there is no information interaction
between the device and the users within the idle timeout time.
• Setting idle-timeout to zero disables the timer. In this case, connections are maintained unless you
Examples
# Set the idle-timeout timer to 1 minute and 30 seconds.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] idle-timeout 1 30
lock
Syntax
lock
View
User view
Default level
3: Manage level
Parameters
None
terminate them.
Description
Use the lock command to lock the user interface. This method prevents unauthorized users from using the
user interface.
28
Examples
When entering the lock command, you are asked to input a password (up to 16 characters) and then
confirm it by inputting the password again. After locking the user interface, you must press Enter and
input the correct password next time you enter this user interface.
By default, this function is disabled.
# Lock the current user interface.
<Sysname> lock
Please input password<1 to 16> to lock current user terminal interface:
Password:
Again:
locked !
Password:
<Sysname>
modem
Syntax
modem [ both | call-in | call-out ]
undo modem [ both | call-in | call-out ]
View
AUX interface view
Default level
2: System level
Parameters
both: Allows both incoming and outgoing calls.
call-in: Allows incoming calls only.
call-out: Allows outgoing calls only.
Description
Use the modem command to enable the switch-side modem to accept incoming calls, initiate outgoing
calls, or both.
Use the undo modem command to remove the modem dial-up configuration.
By default, modem calls are not allowed.
29
Examples
# Enable the modem to accept both incoming and outgoing calls.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] modem both
modem auto-answer
Syntax
modem auto-answer
undo modem auto-answer
View
AUX interface view
Default level
2: System level
Parameters
None
Description
Use the modem auto-answer command to configure the switch-side modem to operate in the
auto-answer mode.
Use the undo modem auto-answer command to restore the default.
By default, the switch-side modem operates in the manual answer mode.
Examples
# Configure the switch-side modem to operate in the auto-answer mode.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] modem auto-answer
modem timer answer
Syntax
modem timer answer seconds
undo modem timer answer
View
AUX interface view
Default level
2: System level
Parameters
seconds: Timeout time in seconds, in the range of 1 to 60. The default value is 30 seconds.
30
g
Description
Use the modem timer answer command to set the maximum amount of time that the modem waits for the
carrier signal after the off-hook action during incoming call connection setup.
Use the undo modem timer answer command to restore the default.
Examples
# Set the maximum amount of time that the switch-side modem waits for the carrier signal after the
off-hook action to 45 seconds.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname] user-interface aux 0
[Sysname-ui-aux0] modem timer answer 45
parity
Syntax
parity { even | mark | none | odd | space }
undo parity
View
User interface view
Default level
2: System level
Parameters
even: Performs an even parity check.
mark: Performs a mark parity check.
none: Performs no parity check.
odd: Performs an odd parity check.
space: Performs a space parity check.
Description
Use the parity command to set a parity check method.
Use the undo parity command to restore the default.
By default, no parity check is performed.
NOTE:
• The command is only applicable to the asynchronous serial port (console port).
• The parity check setting must be the same for the user interfaces of the connectin
Examples
ports on the device
and the target terminal device for communication.
# Configure the Console port to perform odd parity check.
<Sysname> system-view
[Sysname] user-interface aux 0
31
[Sysname-ui-aux0] parity odd
protocol inbound
Syntax
protocol inbound { all | ssh | telnet }
undo protocol inbound
View
VTY interface view
Default level
3: Manage level
Parameters
all: Supports both protocols: Telnet and SSH.
ssh: Supports SSH only.
telnet: Supports Telnet only.
Description
Use the protocol inbound command to enable the current user interface to support either Telnet, SSH, or
all of them. The configuration takes effect next time you log in.
Use the undo protocol inbound command to restore the default.
By default, both protocols are supported.
NOTE:
• Before configuring a user interface to support SSH, set the authentication mode to scheme for the user
interface; otherwise, the protocol inbound ssh command fails. For more information, see
authentication-mode.
• By default, the authentication mode of the Telnet protocol is password.
Examples
# Enable the VTYs 0 through 4 to support SSH only.
screen-length: Number of lines to be displayed on the screen, in the range of 0 to 512. The value of 0
disables pausing between screens of output.
Description
Use the screen-length command to set the number of lines to be displayed on the screen.
Use the undo screen-length command to restore the default.
By default, the screen displays 24 lines.
When screen output pauses, press the Space key to display the next screen. Not all terminals support this
command setting. For example, assume that you set screen-length to 40, but the terminal can display 24
lines in one screen at most. When you press Space, the device sends 40 lines to the terminal, but the next
screen displays only lines 18 through 40. To view the first 17 lines, you must press the page up or page
down key.
To disable multiple-screen output of the current user interface, use the screen-length disable command.
For more information about the screen-length disable command, see the chapter “CLI commands.”
Examples
# Set the next screen of the AUX user interface 0 to display 30 lines.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] screen-length 30
send
Syntax
send { all | num1 | { aux | vty } num2 }
View
User view
Default level
1: Monitor level
Parameters
all: Sends messages to all user interfaces.
aux: Specifies the AUX user interface.
vty: Specifies the VTY user interface.
num1: Absolute number of a user interface. The value range varies with devices, and typically starts from
0.
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.
Description
Use the send command to send messages to the specified user interfaces.
To end message input, press Ctrl+Z. To cancel message input and return to user view, press Ctrl+C.
33
Examples
# Send message hello abc to the AUX user interface 0.
<Sysname> send aux 0
Enter message, end with CTRL+Z or Enter; abort with CTRL+C:
hello abc^Z
Send message? [Y/N]:y
<Sysname>
***
***
***Message from aux0 to aux0
***
hello abc
<Sysname>
# Assume you are using VTY 0. Before you restart the device, to inform users that are accessing the
device through other user interfaces, perform the following steps.
• Display information about all users
<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:00:03 TEL 3
Following are more details.
VTY 0 :
Location: 192.168.1.26
VTY 1 :
Location: 192.168.1.20
+ : Current operation user.
F : Current operation user work in async mode.
// The output shows that a user is using VTY 0.
<Sysname> send vty 1
Enter message, end with CTRL+Z or Enter; abort with CTRL+C:
Note please, I will reboot the system in 3 minutes!^Z
Send message? [Y/N]:y
// A message is sent to VTY 1, telling that the system will reboot in 3 minutes.
• If a user is trying to log in through VTY 1, the message appears. (VTY 1 receives the message from
VTY 0 when the interface GigabitEthernet command is input.)
[Sysname] interface gigabiteth
***
***
***Message from vty0 to vty1
***
34
Note please, I will reboot the system in 3 minutes!
set authentication password
Syntax
set authentication password { cipher | simple } password
undo set authentication password
View
User interface view
Default level
3: Manage level
Parameters
cipher: Cipher text password.
simple: Plain text password.
password: A case sensitive string. If the password format is simple, the password argument must be in
plain text, and the configuration file saves the password in plain text. If the format is cipher, password
can be either in cipher text or in plain text, and the configuration file always saves the password in cipher
text. A plain text password can be a string of no more than 16 characters, 1234567 for example. A
cipher text password or the encrypted version of the plain text password comprises 24 characters, such
as _(TT8F]Y\5SQ=^Q`MAF4<1!!.
Description
Use the set authentication password command to set an authentication password.
Use the undo set authentication password command to remove the local authentication password.
By default, no local authentication password is set.
No matter whether the password format is plain text or cipher text, you must type the password in plain
text during authentication.
A plain text password easily gets cracked. Therefore, a cipher text password is recommended.
Related commands: authentication-mode.
Examples
# Set the local authentication password for the AUX 0 user interface to hello.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] authentication-mode password
[Sysname-ui-aux0] set authentication password cipher hello
Next time you enter the system, the password is required.
shell
Syntax
shell
undo shell
35
View
User interface view
Default level
3: Manage level
Parameters
None
Description
Use the shell command to enable terminal services on the current user interface.
Use the undo shell command to disable terminal services on the current user interface.
• The console port does not support the undo shell command.
• You cannot disable the terminal services on the user interface through which you are logged in.
By default, terminal services are enabled on all user interfaces.
Examples
# Disable terminal services on VTYs 0 through 15, which means you cannot log in to the device through
VTYs 0 through 15.
<Sysname> system-view
[Sysname] user-interface vty 0 15
[Sysname-ui-vty0-15] undo shell
% Disable ui-vty0-15 , are you sure? [Y/N]:y
[Sysname-ui-vty0-15]
The following message appears when a terminal tries to Telnet to the device:
The connection was closed by the remote host!
speed (user interface view)
Syntax
speed speed-value
undo speed
View
User interface view
Default level
2: System level
Parameters
speed-value: Transmission rate in bps.
The transmission rates available with asynchronous serial interfaces include:
• 300 bps
• 600 bps
• 1200 bps
• 2400 bps
• 4800 bps
36
• 9600 bps
• 19200 bps
• 38400 bps
• 57600 bps
• 115200 bps
The transmission rate varies with devices and configuration environment.
Description
Use the speed command to set the transmission rate on the user interface.
Use the undo speed command to restore the default transmission rate.
By default, the transmission rate is 9600 bps.
NOTE:
• The command is only applicable to the asynchronous serial port (console port).
• The transmission rate setting must be identical for the user interfaces of the connecting ports on the
Examples
device and the target terminal device for communication.
# Set the transmission rate on the AUX 0 user interface to 19200 bps.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] speed 19200
stopbits
Syntax
stopbits { 1 | 1.5 | 2 }
undo stopbits
View
User interface view
Default level
2: System level
Parameters
1: One stop bit.
1.5: One and a half stop bits.
2: Two stop bits.
Description
Use the stopbits command to set the number of stop bits transmitted per byte.
Use the undo stopbits command to restore the default.
By default, the stop bit is one.
37
g
NOTE:
• The command is only applicable to the asynchronous serial port ( console port).
• The stop bits setting must be the identical for the user interfaces of the connectin
Examples
# Set the stop bits on the user interface AUX 0 to 1.5.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0] stopbits 1.5
remote-host: IPv4 address or host name of a remote host, a case-insensitive string of 1 to 20 characters.
service-port: TCP port number of the Telnet service on the remote host. It is in the range of 0 to 65535 and
defaults to 23.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN that the remote system belongs to, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters.
source: Specifies the source interface or source IPv4 address of Telnet packets.
interface interface-type interface-number: Specifies the source interface. The source IPv4 address of the
Telnet packets sent is the IPv4 address of the specified interface. interface-type interface-number
represents the interface type and number.
ip ip-address: Specifies the source IPv4 address of Telnet packets.
Description
Use the telnet command to Telnet to a remote host.
To terminate the current Telnet connection, press Ctrl+K or use the quit command.
The source IPv4 address or source interface specified by this command is applicable to the current Telnet
connection only.
Examples
# Telnet to the remote host 1.1.1.2, specifying the source IP address of Telnet packets as 1.1.1.1.
interface interface-type interface-number: Specifies the source interface. The source IPv4 address of the
Telnet packets sent is the IPv4 address of the specified interface. interface-type interface-number
represents the interface type and number.
ip ip-address: Specifies the source IPv4 address of Telnet packets.
Description
Use the telnet client source command to specify the source IPv4 address or source interface for sending
Telnet packets when the device serves as a Telnet client.
Use the undo telnet client source command to remove the source IPv4 address or source interface for
sending Telnet packets.
By default, no source IPv4 address or source interface for sending Telnet packets is specified. The source
IPv4 address is selected by routing.
The source IPv4 address or source interface specified by this command is applicable all Telnet
connections.
If you use both this command and the telnet command to specify the source IPv4 address or source
interface, the source IPv4 address or interface specified by the telnet command takes effect.
Related commands: display telnet client configuration.
Examples
# Specify the source IPv4 address for sending Telnet packets when the device serves as a Telnet client as
1.1.1.1.
<Sysname> system-view
[Sysname] telnet client source ip 1.1.1.1
remote-host: IP address or host name of a remote host, a case-insensitive string of 1 to 46 characters.
-i interface-type interface-number: Specifies the outbound interface for sending Telnet packets, where
interface-type interface-number represents the interface type and number. If the destination address is a link-local address, provide the –i interface-type interface-number argument.
port-number: TCP port number for the remote host to provide the Telnet service. It is in the range of 0 to
65535 and defaults to 23.
vpn-instance vpn-instance-name: Specifies the MPLS L3VPN that the remote system belongs to, where
vpn-instance-name is a case-sensitive string of 1 to 31 characters.
Description
Use the telnet ipv6 command to Telnet to a remote h ost i n an IP v6 net work. To terminate the cu rrent Telnet
connection, press Ctrl+K or use the quit command.
Examples
# Telnet to the remote host with the IPv6 address 5000::1.
<Sysname> telnet ipv6 5000::1
telnet server enable
Syntax
telnet server enable
undo telnet server enable
View
System view
Default level
3: Manage level
Parameters
None
Description
Use the telnet server enable command to enable the Telnet server.
Use the undo telnet server enable command to disable the Telnet server.
The Telnet server is disabled by default.
Examples
# Enable the Telnet server.
<Sysname> system-view
[Sysname] telnet server enable
terminal type
Syntax
terminal type { ansi | vt100 }
undo terminal type
40
View
User interface view
Default level
2: System level
Parameters
ansi: Specifies the terminal display type as ANSI.
vt100: Specifies the terminal display type as VT100.
Description
Use the terminal type command to configure the type of terminal display of the current user interface.
Use the undo terminal type command to restore the default.
By default, the terminal display type is ANSI.
The device supports two types of terminal display: ANSI and VT100. HP recommends you to set the
display type of both the device and the client to VT100. If the device and the client use different display
types (for example, hyper terminal or Telnet terminal) or both are set to ANSI, when the total number of
characters of the currently edited command line exceeds 80, an anomaly such as cursor corruption or
abnormal display of the terminal display may occur on the client.
Examples
# Set the terminal display type to VT100.
<Sysname> system-view
[Sysname] user-interface vty 0
[Sysname-ui-vty0] terminal type vt100
user privilege level
Syntax
user privilege level level
undo user privilege level
View
User interface view
Default level
3: Manage level
Parameters
level: Specifies a user privilege level, in the range of 0 to 3.
NOTE:
User privilege levels include visit, monitor, system, and manage, represented by the number 0, 1, 2 and
3 respectively. The administrator can change the user privilege level when necessary.
Description
Use the user privilege level command to configure the user privilege level. Users logging into the user
interface are assigned a user privilege level.
41
Examples
Use the undo user privilege level command to restore the default.
By default, the default command level is 3 for the console user interface and 0 for other user interfaces.
# Set the command level for users logging in through VTY 0 to 0.
After you Telnet to the device through VTY 0, the terminal only displays commands of level 0 in the help
information:
<Sysname> ?
cfd Connectivity fault detection (IEEE 802.1ag)
display Display current system information
ping Ping function
quit Exit from current command view
ssh2 Establish a secure shell client connection
super Set the current user priority level
telnet Establish one TELNET connection
tracert Trace route function
first-num1: Absolute number of the first user interface. The value range varies with devices, and typically
starts from 0.
last-num1: Absolute number of the last user interface. The value range varies with devices, and typically
starts from 0, but cannot be smaller than the first-num1.
aux: Specifies the AUX user interface.
vty: Specifies the VTY user interface.
first-num2: Relative number of the first 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.
last-num2: Relative number of the last 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, but cannot be smaller than
first-num 2.
Description
Use the user-interface command to enter a single or multiple user interface views.
In a single user interface view, the configuration takes effect in the user view only.
42
Examples
In multiple user interface views, the configuration takes effect in these user views.
# Enter the user interface view of AUX 0.
<Sysname> system-view
[Sysname] user-interface aux 0
[Sysname-ui-aux0]
display ftp-server [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
3: Manage 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 ftp-server command to display the FTP server configuration.
After configuring FTP server parameters, you may verify them with this command.
Related commands: ftp server enable, ftp timeout, and ftp update.
Examples
# Display the FTP server configuration.
<Sysname> display ftp-server
FTP server is running
Max user number: 1
User count: 1
Timeout value(in minute): 30
Put Method: fast
Table 4 Output description
Field Description
Max user number Maximum number of concurrent login users
User count Number of the current login users
44
Field Description
Timeout value (in minute)
Put Method
display ftp-user
Syntax
display ftp-user [ | { begin | exclude | include } regular-expression ]
View
Any view
Default level
3: Manage level
Parameters
Allowed idle time of an FTP connection. If there is no packet exchange
between the FTP server and client during the time frame, the FTP
connection will be disconnected.
File update method of the FTP server:
• fast
• normal
|: 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 ftp-user command to display the detailed information of current FTP users.
# If the name of the logged-in user exceeds 10 characters, the exceeded characters will be displayed in
the next line and right justified, for example, if the logged-in user name is administrator, the following
information will appear:
<Sysname> display ftp-user
UserName HostIP Port Idle HomeDir
administra
tor 192.168.0.152 1031 0 flash:
Table 5 Output description
Field Description
UserName Name of the currently logged-in user
45
Field Description
HostIP IP address of the currently logged-in user
Port Port which the currently logged-in user is using
Idle Duration time of the FTP connection, in minutes
HomeDir Authorized path of the logged-in user
free ftp user
Syntax
free ftp user username
View
User view
Default level
3: Manage level
Parameters
username: Username. You can use the display ftp-user command to view FTP login user information.
Description
Use the free ftp user command to manually release the FTP connection established by the specified user.
This command releases the FTP connection established by the specified user no matter whether the user
is transmitting a file.
Examples
# Manually release the FTP connection established with username ftpuser.
<Sysname> free ftp user ftpuser
Are you sure to free FTP user ftpuser? [Y/N]:y
<Sysname>
ftp server acl
Syntax
ftp server acl acl-number
undo ftp server acl
View
System view
Default level
3: Manage level
Parameters
acl-number: Basic access control list (ACL) number, in the range of 2000 to 2999.
Description
Use the ftp server acl command to use an ACL to control FTP clients’ access to the FTP server.
46
Use the undo ftp server acl command to restore the default.
By default, no ACL is used to control FTP clients’ access to the FTP server.
An ACL enables the FTP server to permit the FTP requests from specific FTP clients. This configuration only
filters the FTP connections to be established, and has no effect on existing FTP connections and
operations. If you execute the command multiple times, the last specified ACL takes effect.
Examples
# Associate the FTP service with ACL 2001 to allow only the client 1.1.1.1 to access the FTP server through
FTP.
<Sysname> system-view
[Sysname] acl number 2001
[Sysname-acl-basic-2001] rule 0 permit source 1.1.1.1 0
[Sysname-acl-basic-2001] rule 1 deny source any
[Sysname-acl-basic-2001] quit
[Sysname] ftp server acl 2001
ftp server enable
Syntax
ftp server enable
undo ftp server
View
System view
Default level
3: Manage level
Parameters
None
Description
Use the ftp server enable command to enable the FTP server and allow the login of FTP users.
Use the undo ftp server command to disable the FTP server.
By default, the FTP server is disabled.
Examples
# Enable the FTP server.
<Sysname> system-view
[Sysname] ftp server enable
ftp timeout
Syntax
ftp timeout minute
undo ftp timeout
47
View
System view
Default level
3: Manage level
Parameters
minute: Idle-timeout timer in minutes, in the range of 1 to 35791.
Description
Use the ftp timeout command to set the idle-timeout timer.
Use the undo ftp timeout command to restore the default.
By default, the FTP idle time is 30 minutes.
If the idle time of an FTP connection exceeds the FTP timeout value, the FTP server breaks the connection
to save resources.
Examples
# Set the idle-timeout timer to 36 minutes.
<Sysname> system-view
[Sysname] ftp timeout 36
ftp update
Syntax
ftp update { fast | normal }
undo ftp update
View
System view
Default level
3: Manage level
Parameters
fast: Fast update. In this mode, the FTP server writes the complete file to the memory before writing it to
the storage medium.
normal: Normal update. In this mode, the FTP server writes the data of a file from the memory to the
storage medium multiple times, with up to 4096 bytes per time.
Description
Use the ftp update command to set the file update mode that the FTP server uses while receiving data.
Use the undo ftp update command to restore the default.
Examples
By default, the file update mode is normal.
# Set the FTP update mode to normal.
<Sysname> system-view
[Sysname] ftp update normal
48
g
FTP client configuration commands
NOTE:
• You must use the ftp command to enter FTP client view before making client configurations. For more
information, see “ftp.”
• Before executing the FTP client configuration commands in this section, check that you have confi
• The prompt information for the examples varies with FTP server types.
ascii
Syntax
ascii
View
FTP client view
Default level
3: Manage level
Parameters
None
Description
Use the ascii command to set the file transfer mode to ASCII.
ured
the proper authority, including view the files under the current directory, read/download the specified
file, create directory/upload files, and rename/remove files) for users on the FTP server.
By default, the file transfer mode is ASCII.
The carriage return characters vary with operating systems. For example, HP and Windows use
characters /r/n, and Linux uses characters /n. To transfer files between two systems that use different
carriage return characters, determine FTP transfer mode according to the file type.
FTP transfers files in the following modes:
• Binary mode: for program file or picture transmission.
• ASCII mode: for text file transmission.
Related commands: binary.
Examples
# Set the file transfer mode to ASCII.
[ftp] ascii
200 Type set to A.
binary
Syntax
binary
49
View
FTP client view
Default level
3: Manage level
Parameters
None
Description
Use the binary command to set the file transfer mode to binary (flow) mode.
By default, the transfer mode is ASCII mode.
Related commands: ascii.
Examples
# Set the file transfer mode to binary.
[ftp] binary
200 Type set to I.
bye
Syntax
bye
View
FTP client view
Default level
3: Manage level
Parameters
None
Description
Use the bye command to disconnect from the remote FTP server and return to user view.
If no connection is established between the device and the remote FTP server, use this command to return
to user view directly.
Related commands: close, disconnect, and quit.
Examples
# Terminate the connection with the remote FTP server and return to user view.
[ftp] bye
221 Server closing.
cd
Syntax
cd { directory | .. | / }
50
View
FTP client view
Default level
3: Manage level
Parameters
directory: Name of the target directory, in the format of [drive:][/]path, where drive represents the
storage medium name, typically flash or cf. If no drive information is provided, the argument represents
a folder or subfolder in the current directory. For more information about the drive and path arguments,
see Fundamentals Configuration Guide.
..: Returns to an upper directory. The execution of the cd .. command equals the execution of the cdup
command. If the current working directory is the root directory, or no upper directory exists, the current
working directory does not change when the cd .. command is executed. This argument does not support
command line online help.
/: Returns to the root directory of the storage medium. The keyword does not support command line
online help.
Description
Use the cd command to change the current working directory on the remote FTP server to access another
authorized directory.
Related commands: pwd.
Examples
# Change the working directory to the sub-directory logfile of the current directory.
[ftp] cd logfile
250 CWD command successful.
# Change the working directory to the sub-directory folder of the authorized directory.
[ftp] cd /folder
250 CWD command successful.
cdup
Syntax
cdup
View
FTP client view
Default level
3: Manage level
Parameters
None
Description
Use the cdup command to exit the directory and enter the upper directory of the FTP server.
This command does not change the working directory if the directory is work-directory.
Related commands: cd and pwd.
51
Examples
# Change the working directory path to the upper directory.
[ftp] pwd
257 "/ftp/subdir" is current directory.
[ftp] cdup
200 CDUP command successful.
[ftp] pwd
257 "/ftp" is current directory.
close
Syntax
close
View
FTP client view
Default level
3: Manage level
Parameters
None
Description
Use the close command to terminate the connection to the FTP server, but remain in FTP client view.
This command is equal to the disconnect command.
Examples
# Terminate the connection to the FTP server and remain in FTP client view.
[ftp] close
221 Server closing.
[ftp]
debugging
Syntax
debugging
undo debugging
View
FTP client view
Default level
1: M o n it or lev e l
Parameters
None
Description
Use the debugging command to enable FTP client debugging.
52
Examples
Use the undo debugging command to disable FTP client debugging.
By default, FTP client debugging is disabled.
# The device serves as the FTP client. Enable FTP client debugging and use the active mode to download
file sample.file from the current directory of the FTP server.
<Sysname> terminal monitor
<Sysname> terminal debugging
<Sysname> ftp 192.168.1.46
Trying 192.168.1.46 ...
Press CTRL+K to abort
Connected to 192.168.1.46.
220 FTP service ready.
User(192.168.1.46:(none)):ftp
331 Password required for ftp.
Password:
230 User logged in.
[ftp]undo passive
FTP: passive is off
[ftp] debugging
FTP: debugging switch is on
[ftp] get sample.file
---> PORT 192,168,1,44,4,21
200 Port command okay.
The parsed reply is 200
---> RETR sample.file
150 Opening ASCII mode data connection for /sample.file.
The parsed reply is 150
FTPC: File transfer started with the signal light turned on.
FTPC: File transfer completed with the signal light turned off.
.226 Transfer complete.
FTP: 3304 byte(s) received in 4.889 second(s), 675.00 byte(s)/sec.
[ftp]
Table 6 Output description
Field Description
---> PORT Give an FTP order, with data port numbers being…
The parsed reply is The received reply code, defined in RFC 959.
---> RETR Download the file
FTPC: File transfer started with the signal light turned
on.
53
File transfer starts, and the signal light is turned on.
Field Description
FTPC: File transfer completed with the signal light
turned off.
delete
Syntax
delete remotefile
View
FTP client view
Default level
3: Manage level
Parameters
remotefile: File name.
Description
Use the delete command to permanently delete a specified file on the remote FTP server.
To perform this operation, you must have delete permissions on the FTP server.
Examples
File transfer is completed, and the signal light is turned
off.
# Delete file temp.c.
[ftp] delete temp.c
250 DELE command successful.
dir
Syntax
dir [ remotefile [ localfile ] ]
View
FTP client view
Default level
3: Manage level
Parameters
remotefile: Name of the file or directory on the remote FTP server.
localfile: Name of the local file to save the displayed information.
Description
Use the dir command to view the detailed information of the files and subdirectories under the current
directory on the remote FTP server.
Use the dir remotefile command to display the detailed information of the specified file or directory on
the remote FTP server.
54
NOTE:
Examples
Use the dir remotefile localfile command to display the detailed information of the specified file or
directory on the remote FTP server, and save the displayed information into a local file specified by the
localfile argument.
The Is command can only display the names of files and directories. The dir command can display other
related information of the files and directories, such as the size, and the date they were created.
# View the detailed information of the files and subdirectories under the current directory on the remote
FTP server.
[ftp] dir
227 Entering Passive Mode (192,168,1,46,5,68).
125 ASCII mode data connection already open, transfer starting for /*.
drwxrwxrwx 1 noone nogroup 0 Aug 08 2006 logfile
-rwxrwxrwx 1 noone nogroup 20471748 May 11 10:21 test.app
-rwxrwxrwx 1 noone nogroup 4001 Dec 08 2007 config.cfg
-rwxrwxrwx 1 noone nogroup 3608 Jun 13 2007 startup.cfg
drwxrwxrwx 1 noone nogroup 0 Dec 03 2007 test
-rwxrwxrwx 1 noone nogroup 299 Oct 15 2007 key.pub
226 Transfer complete.
FTP: 394 byte(s) received in 0.189 second(s), 2.00K byte(s)/sec.
[ftp]
# View the information of the file ar-router.cfg, and save the result to aa.txt.
[ftp] dir ar-router.cfg aa.txt
227 Entering Passive Mode (192,168,1,50,17,158).
125 ASCII mode data connection already open, transfer starting for /ar-router.cfg.
....226 Transfer complete.
FTP: 67 byte(s) received in 4.600 second(s), 14.00 byte(s)/sec.
# View the content of aa.txt.
[ftp] quit
<Sysname> more aa.txt
-rwxrwxrwx 1 noone nogroup 3077 Jun 20 15:34 ar-router.cfg
disconnect
Syntax
disconnect
View
FTP client view
Default level
3: Manage level
Parameters
None
55
Description
Use the disconnect command to disconnect from the remote FTP server but remain in FTP client view.
This command is equal to the close command.
Examples
# Disconnect from the remote FTP server but remain in FTP client view.
[ftp] disconnect
221 Server closing.
[ftp]
display ftp client configuration
Syntax
display ftp 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 ftp client configuration command to display the source IP address configuration of the
FTP client.
Related commands: ftp client source.
Examples
# Display the source IP address configuration of the FTP client.
<Sysname> display ftp client configuration
The source IP address is 192.168.0.123
NOTE:
The display ftp client configuration command displays the source IP address configuration of the FTP
client. If the specified source IP address is active, this command displays the source IP address. If the
specified source interface is active, this command displays the source interface.
server-address: IP address or host name (a string of 1 to 20 characters) of a remote FTP server.
service-port: TCP port number of the remote FTP server, in the range of 0 to 65535. The default value is
21.
vpn-instance vpn-instance-name: Specifies the MPLS L3 VPN that the FTP server belongs to. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters.
source { interfaceinterface-type interface-number | ipsource-ip-address } ]: Specifies the source address
used to establish an FTP connection.
• interface interface-type interface-number: Specifies the source interface by its type and number. The
• ip source-ip-address: Specifies the source IP address of the transmitted FTP packets. This source
Description
Use the ftp command to log in to the remote FTP server and enter FTP client view.
• This command applies to IPv4 networks only.
• If you use this command without specifying any parameters, you will simply enter the FTP client view
• If you specify the parameters, you will be prompted to enter the username and password for
Examples
# Log in the server 192.168.0.211. The source IP address of sent FTP packets is 192.168.0.212.
<Sysname1> ftp 192.168.0.211 source ip 192.168.0.212
Trying 192.168.0.211 ...
Press CTRL+K to abort
Connected to 192.168.0.211.
220 FTP Server ready.
User(192.168.0.211:(none)):abc
331 Password required for abc
Password:
230 User logged in.
[ftp]
primary IP address configured on this interface is the source address of the transmitted FTP packets.
If no primary IP address is configured on the source interface, the connection fails.
address must be the one that has been configured on the device.
interface interface-type interface-number: Specifies the source interface for establishing FTP connections.
The primary IP address of the source interface is used as the source IP address of packets sent to an FTP
server. If the source interface has no primary IP address specified, no FTP connection can be established.
ip source-ip-address: Specifies the source IP address of packets sent to an FTP server, which is one of the
IP addresses of the device.
Description
Examples
Use the ftp client source command to specify the source IP address of packets sent to an FTP server.
Use the undo ftp client source command to restore the default.
By default, the source IP address is the IP address of the output interface of the route to the server is used
as the source IP address.
If you use the ftp client source command to first configure a source interface and then a source IP address,
the source IP address overwrites the source interface, and vice versa.
If you first use the ftp client source command to specify a source IP address and then use the ftp command
to specify another source IP address, the latter is used.
The source IP address specified with the ftp client source command applies to all FTP connections while
the one specified with the ftp command applies to the current FTP connection only.
Related commands: display ftp client configuration.
# Specify the source IP address of packets sent to an FTP server as 2.2.2.2.
<Sysname> system-view
[Sysname] ftp client source ip 2.2.2.2
# Specify the IP address of interface VLAN-interface 1 as the source IP address of packets sent to an FTP
server.
server-address: IP address or host name of the remote FTP server.
service-port: TCP port number of the FTP server, in the range of 0 to 65535. The default value is 21.
source ipv6 source-ipv6-address: Specifies a source IPv6 address for transmitted FTP packets. This
address must be an IPv6 address that has been configured on the device.
-iinterface-type interface-number: Specifies an output interface by its type and number. This parameter
can be used only when the FTP server address is a link local address and the specified output interface
has a link local address. For the configuration of link local addresses, see Layer 3—IP Services Configuration Guide.
vpn-instance vpn-instance-name: Specifies the MPLS L3 VPN that the FTP server belongs to. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters.
Description
Examples
Use the ftp ipv6 command to log in to the FTP server and enter FTP client view.
• This command applies to IPv6 networks only.
• If you use this command without specifying any parameters, you will simply enter the FTP client view
without logging in to an FTP server.
• If you specify the parameters, enter the username and password for accessing the FTP server.
# Log in to the FTP server with IPv6 address 3000::200.
<Sysname> ftp ipv6 3000::200
Trying 3000::200 ...
Press CTRL+K to abort
Connected to 3000::200.
220 Welcome!
User(3000::200:(none)): MY_NAME
331 Please specify the password.
Password:
230 Login successful.
[ftp]
# Log in to the FTP server with IPv6 address 3000::200 in VPN 1.
<Sysname> ftp ipv6 3000::200 vpn-instance vpn1
Trying 3000::200 ...
Press CTRL+K to abort
Connected to 3000::200.
220 Welcome!
User(3000::200:(none)): MY_NAME
331 Please specify the password.
Password:
230 Login successful.
59
[ftp]
get
Syntax
get remotefile [ localfile ]
View
FTP client view
Default level
3: Manage level
Parameters
remotefile: Name of the file to be downloaded.
localfile: File name used after a file is downloaded and saved locally. If this argument is not specified, the
local file uses the name of the source file on the FTP server by default.
Description
Use the get command to download a file from a remote FTP server and save it.
Examples
1. In standalone mode
# Download file testcfg.cfg to the root directory of the storage medium of the active MPU, and save it as
newest.cfg.
[ftp] get testcfg.cfg newest.cfg
227 Entering Passive Mode (192,168,1,46,4,47).
125 ASCII mode data connection already open, transfer starting for /testcfg.cfg.
..226 Transfer complete.
FTP: 3608 byte(s) received in 2.050 second(s), 1.00K byte(s)/sec.
# Download file testcfg.cfg to the root directory of the storage medium of the standby MPU (in slot 1), and
save it as newest.cfg.
[ftp] get testcfg.cfg slot1#flash:/newest.cfg
227 Entering Passive Mode (192,168,1,46,4,48).
125 ASCII mode data connection already open, transfer starting for /testcfg.cfg.
226 Transfer complete.
FTP: 3608 byte(s) received in 2.322 second(s), 1.00K byte(s)/sec.
2. In IRF mode
# Download file testcfg.cfg to the root directory of the storage medium on the active MPU of the IRF fabric,
and save it as newest.cfg.
[ftp] get testcfg.cfg newest.cfg
227 Entering Passive Mode (192,168,1,46,4,47).
125 ASCII mode data connection already open, transfer starting for /testcfg.cfg.
..226 Transfer complete.
FTP: 3608 byte(s) received in 2.050 second(s), 1.00K byte(s)/sec.
60
# Download file testcfg.cfg to the root directory of the storage medium of a standby MPU (the ID of the
IRF member switch where the standby MPU resides is 2, and the slot number of the standby MPU is 1),
and save it as newest.cfg.
[ftp] get testcfg.cfg chassis2#slot1#flash:/newest.cfg
227 Entering Passive Mode (192,168,1,46,4,48).
125 ASCII mode data connection already open, transfer starting for / testcfg.cfg.
226 Transfer complete.
FTP: 3608 byte(s) received in 2.322 second(s), 1.00K byte(s)/sec.
lcd
Syntax
lcd
View
FTP client view
Default level
3: Manage level
Parameters
None
Description
Use the lcd command to display the local working directory of the FTP client.
Examples
# Display the local working directory.
[ftp] lcd
FTP: Local directory now flash:/clienttemp.
The output shows that the working directory of the FTP client before execution of the ftp command is
flash:/clienttemp.
ls
Syntax
ls [ remotefile [ localfile ] ]
View
FTP client view
Default level
3: Manage level
Parameters
remotefile: Filename or directory on the remote FTP server.
localfile: Name of a local file used to save the displayed information.
61
Description
Use the ls command to view the information of all the files and subdirectories in the current directory of
the remote FTP server. The file names and subdirectory names are displayed.
Use the ls remotefile command to view the information of a specified file or subdirectory.
Use the ls remotefilelocalfile command to view the information of a specified file or subdirectory, and
save the result to a local file specified by the localfile argument.
NOTE:
The ls command can only display the names of files and directories on the FTP server. The dir command
can display other related information of the files and directories, such as the size and the date they were
created.
Examples
# View the information of all files and subdirectories in the current directory of the FTP server.
[ftp] ls
227 Entering Passive Mode (192,168,1,50,17,165).
125 ASCII mode data connection already open, transfer starting for /*.
ar-router.cfg
logfile
mainar.app
arbasic.app
ftp
test
bb.cfg
testcfg.cfg
226 Transfer complete.
FTP: 87 byte(s) received in 0.132 second(s) 659.00 byte(s)/sec.
mkdir
Syntax
View
# View the information of directory logfile, and save the result to file aa.txt.
[ftp] ls logfile aa.txt
227 Entering Passive Mode (192,168,1,46,4,3).
125 ASCII mode data connection already open, transfer starting for /logfile/*.
....226 Transfer complete.
FTP: 20 byte(s) received in 3.962 second(s), 5.00 byte(s)/sec.
# View the content of file aa.txt.
[ftp] quit
<Sysname> more aa.txt
.
..
logfile.log
mkdirdirectory
FTP client view
62
Default level
3: Manage level
Parameters
directory: Name of the directory to be created.
Description
Use the mkdir command to create a subdirectory in the current directory on the remote FTP server.
You must have permissions on the FTP server.
Examples
# Create subdirectory mytest on the current directory of the remote FTP server.
[ftp] mkdir mytest
257 "/mytest" new directory created.
open
Syntax
open server-address [ service-port ]
View
FTP client view
Default level
3: Manage level
Parameters
server-address: IP address or host name of a remote FTP server.
service-port: Port number of the remote FTP server, in the range of 0 to 65535. The default value is 21.
Description
Use the open command to log in to the IPv4 FTP server under FTP client view.
At login, enter the username and password. If your input is correct, the login succeeds.
If you have logged in to the IPv4 FTP server, you cannot use the open command to log in to another server.
To do so, you must disconnect from the current server first.
Related commands: close.
Examples
# In FTP client view, log in to the FTP server with the IP address of 192.168.1.50.
<Sysname> ftp
[ftp] open 192.168.1.50
Trying 192.168.1.50 ...
Press CTRL+K to abort
Connected to 192.168.1.50.
220 FTP service ready.
User(192.168.1.50:(none)):aa
331 Password required for aa.
Password:
230 User logged in.
server-address: IP address or host name of the remote FTP server.
service-port: Port number of the remote FTP server, in the range of 0 to 65535. The default value is 21.
-i interface-type interface-number: Specifies an output interface by its type and number. This parameter
can be used only when the FTP server address is a link local address and the specified output interface
has a link local address. For the configuration of link local addresses, see Layer 3—IP Services Configuration Guide.
Description
Use the open ipv6 command to log in to the IPv6 FTP server in FTP client view.
At login, enter the username and password for accessing the FTP server. If your input is correct, the login
succeeds.
Related commands: close.
Examples
# Log in to the FTP server (with IPv6 address 3000::200) in FTP client view.
<Sysname> ftp
[ftp] open ipv6 3000::200
Trying 3000::200 ...
Press CTRL+K to abort
Connected to 3000::200.
220 Welcome!
User(3000::200:(none)): MY_NAME
331 Please specify the password.
Password:
230 Login successful.
passive
Syntax
View
passive
undo passive
FTP client view
64
Default level
3: Manage level
Parameters
None
Description
Use the passive command to set the data transmission mode to passive.
Use the undo passive command to set the data transmission mode to active.
The default transmission mode is passive.
Data transmission modes fall into the passive mode and the active mode. In active mode, the FTP server
initiates a data connection request. In passive mode, the FTP client initiates a data connection request.
This command is mainly used in conjunction with a firewall to restrict FTP session establishment between
private and public network users.
Examples
# Set the data transmission mode to passive.
[ftp] passive
FTP: passive is on
put
Syntax
put localfile [ remotefile ]
View
FTP client view
Default level
3: Manage level
Parameters
localfile: Name of the local file to be uploaded.
remotefile: File name used after a file is uploaded and saved on the FTP server.
Description
Use the put command to upload a file on the client to the remote FTP server.
By default, if no name is assigned to the file to be saved on the FTP server, the name of the source file is
used.
When a file is uploaded, it is saved in the user’s authorized directory, which can be set with the
authorization-attribute command on the remote server.
Examples
1. In standalone mode
# Upload source file vrpcfg.cfg on the active MPU to the remote FTP server and save it as ftpclient.cfg.
[ftp] put vrpcfg.cfg ftpclient.cfg
227 Entering Passive Mode (192,168,1,46,4,50).
125 ASCII mode data connection already open, transfer starting for /ftpclient.cfg.
65
226 Transfer complete.
FTP: 1366 byte(s) sent in 0.064 second(s), 21.00Kbyte(s)/sec.
# Upload source file a.cfg on the standby MPU (in slot 1) to the remote FTP server and save it as
ftpclienta.cfg.
[ftp] put slot1#flash:/a.cfg ftpclienta.cfg
227 Entering Passive Mode (192,168,1,46,4,52).
125 ASCII mode data connection already open, transfer starting for /ftpclienta.cfg.
226 Transfer complete.
FTP: 1226 byte(s) sent in 0.065 second(s), 18.00Kbyte(s)/sec.
2. In IRF mode
# Upload source file a.cfg on a standby MPU of the IRF fabric (the ID of the IRF member switch where the
standby MPU resides is 2, and the slot number of the standby MPU is 1) to the remote FTP server and save
it as ftpclienta.cfg.
[ftp] put chassis2#slot1#flash:/a.cfg ftpclienta.cfg
227 Entering Passive Mode (192,168,1,46,4,52).
125 ASCII mode data connection already open, transfer starting for /ftpclienta.cfg.
226 Transfer complete.
FTP: 1226 byte(s) sent in 0.065 second(s), 18.00Kbyte(s)/sec.
pwd
Syntax
pwd
View
FTP client view
Default level
3: Manage level
Parameters
None
Description
Use the pwd command to display the working directory on the remote FTP server.
Examples
# Display the working directory on the remote FTP server.
[ftp] cd servertemp
[ftp] pwd
257 "/servertemp" is current directory.
The output shows that the servertemp folder under the root directory of the remote FTP server is being
accessed by the user.
quit
Syntax
quit
66
View
FTP client view
Default level
3: Manage level
Parameters
None
Description
Use the quit command to disconnect the FTP client from the remote FTP server and exit to user view.
Examples
# Disconnect from the remote FTP server and exit to user view.
[ftp] quit
221 Server closing.
<Sysname>
remotehelp
Syntax
remotehelp [ protocol-command ]
View
FTP client view
Default level
3: Manage level
Parameters
protocol-command: FTP command.
Description
Use the remotehelp command to display the help information of FTP-related commands supported by the
remote FTP server.
If no argument is specified, FTP-related commands supported by the remote FTP server are displayed.
Examples
# Display FTP commands supported by the remote FTP server.
[ftp] remotehelp
214-Here is a list of available ftp commands
Those with '*' are not yet implemented.
USER PASS ACCT* CWD CDUP SMNT* QUIT REIN*
PORT PASV TYPE STRU* MODE* RETR STOR STOU*
APPE* ALLO* REST* RNFR* RNTO* ABOR* DELE RMD
MKD PWD LIST NLST SITE* SYST STAT* HELP
NOOP* XCUP XCWD XMKD XPWD XRMD
214 Direct comments to HP company.
# Display the help information for the user command.
67
[ftp] remotehelp user
214 Syntax: USER <sp> <username>.
[ftp]
Table 7 Output description
Field Description
USER Username
PASS Password
CWD Change the current working directory
CDUP Change to parent directory
SMNT* File structure setting
QUIT Quit
REIN* Re-initialization
PORT Port number
PASV Passive mode
TYPE Request type
STRU* File structure
MODE* Transmission mode
RETR Download a file
STOR Upload a file
STOU* Store unique
APPE* Appended file
ALLO* Allocation space
REST* Restart
RNFR* Rename the source
RNTO* Rename the destination
ABOR* Abort the transmission
DELE Delete a file
RMD Delete a folder
MKD Create a folder
PWD Print working directory
LIST List files
NLST List file description
SITE* Locate a parameter
SYST Display system parameters
STAT* State
HELP Help
68
Field Description
NOOP* No operation
XCUP Extension command, the same meaning as CUP
XCWD Extension command, the same meaning as CWD
XMKD Extension command, the same meaning as MKD
XPWD Extension command, the same meaning as PWD
XRMD Extension command, the same meaning as RMD
Syntax: USER <sp> <username>.
rmdir
Syntax
rmdir directory
View
FTP client view
Default level
3: Manage level
Parameters
directory: Directory name on the remote FTP server.
Description
Use the rmdir command to remove a specified directory from the FTP server.
NOTE:
• Only authorized users are allowed to use this command.
Syntax of the user command: user (keyword) + space + username
Examples
user
Syntax
View
• Delete all files and subdirectories under a directory before you delete the directory. For how to delete
files, see the delete command.
• When you execute the rmdir command, the files in the remote recycle bin in the directory will be
automatically deleted.
# Delete the temp1 directory from the authorized directory on the FTP server.
[ftp] rmdir /temp1
200 RMD command successful.
userusername [ password ]
FTP client view
69
Default level
3: Manage level
Parameters
username: Login username.
password: Login password. You can input this argument a space after the username argument; or you
can input this argument when the “Password:” prompt appears after you input the username and then
press Enter.
Description
Use the user command to relog in again to the FTP server with another username.
NOTE:
Before using this command, you must configure the corresponding username and password on the FTP
server or the login will fail and the FTP connection will close.
Examples
# User ftp1 has logged in to the FTP server. Use username ftp2 to log in to the current FTP server.
(Suppose username ftp2 and password 12 312 312 312 3 have been configured on the FTP server).
• Method 1
[ftp] user ftp2
331 Password required for ftp2.
Password:
230 User logged in.
[ftp]
• Method 2
[ftp] user ftp2 123123123123
331 Password required for ftp.
230 User logged in.
[ftp]
verbose
Syntax
verbose
undo verbose
View
FTP client view
Default level
3: Manage level
Parameters
None
70
Description
Use the verbose command to enable display of detailed prompt information received from the server.
Use the undo verbose command to disable display of detailed prompt information.
By default, the display of detailed prompt information is enabled.
Examples
# Enable display of detailed prompt information.
[ftp] verbose
FTP: verbose is on
# Disable display of detailed prompt information and perform a Get operation.
[ftp] undo verbose
FTP: verbose is off
[ftp] get startup.cfg bb.cfg
FTP: 3608 byte(s) received in 0.052 second(s), 69.00K byte(s)/sec.
[ftp]
# Enable display of detailed prompt information. and perform a Get operation.
[ftp] verbose
FTP: verbose is on
[ftp] get startup.cfg aa.cfg
227 Entering Passive Mode (192,168,1,46,5,85).
125 ASCII mode data connection already open, transfer starting for /startup.cfg.
226 Transfer complete.
FTP: 3608 byte(s) received in 0.193 second(s), 18.00K byte(s)/sec.
71
TFTP client configuration commands
display tftp client configuration
Syntax
display tftp 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 tftp client configuration command to display source IP address configuration of the TFTP
client.
Related commands: tftp client source.
Examples
# Display the source IP address configuration of the TFTP client.
<Sysname> display tftp client configuration
The source IP address is 192.168.0.123
NOTE:
The display tftp client configuration command displays the source IP address configuration of the TFTP
client. If the specified source IP address is active, this command displays the source IP address. If the
specified source interface is active, this command displays the source interface.
tftp-server acl
Syntax
View
tftp-server [ ipv6 ] acl acl-number
undo tftp-server [ ipv6 ] acl
System view
72
Default level
3: Manage level
Parameters
ipv6: References an IPv6 ACL. If it is not specified, an IPv4 ACL is referenced.
acl-number: Number of a basic ACL, in the range of 2000 to 2999.
Description
Use the tftp-server acl command to control the device’s access to a specific TFTP server using an ACL.
Use the undo tftp-server acl command to restore the default.
By default, no ACL is used to control the device’s access to TFTP servers.
You can use an ACL to deny or permit the device’s access to a specific TFTP server.
For more information about ACL, see ACL and QoS Configuration Guide.
Examples
# Allow the device to access the TFTP server with the IP address of 1.1.1.1 only (in the IPv4 networking
environment).
tftp server-address { get | put | sget } source-filename [ destination-filename ] [ vpn-instance
vpn-instance-name ] [ source { interfaceinterface-type interface-number | ip source-ip-address } ]
View
User view
Default level
3: Manage level
Parameters
server-address: IP address or host name of a TFTP server.
get: Downloads a file in normal mode.
put: Uploads a file.
sget: Downloads a file in secure mode.
73
source-filename: Source file name.
destination-filename: Destination file name.
vpn-instance vpn-instance-name: Specifies the MPLS L3 VPN where the TFTP server belongs. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters.
source: Configures parameters for source address binding.
• interface interface-type interface-number: Specifies the source interface by its type and number. The
• ip source-ip-address: Specifies the source IP address for the current TFTP client to transmit packets.
Description
Use the tftp command to download a specified file from the TFTP server to the local device or upload a
specified local file to the TFTP server in an IPv4 network.
Examples
1. In standalone mode
# To upgrade the device, download the newest.app file from the TFTP server with the IP address of
192.168.1.26 and save it to both the root directory on the flash of the active MPU and the root directory
on the flash of the standby MPU.
<Sysname> tftp 192.168.1.26 get newest.app startup.app
.
File will be transferred in binary mode
Downloading file from remote TFTP server, please wait..................
TFTP: 2737556 bytes received in 13 second(s)
File downloaded successfully.
primary IP address configured on the source interface is the source IP address of the packets sent by
TFTP. If no primary IP address is configured on the source interface, the transmission fails.
This source address must be an IP address that has been configured on the device.
// Download the file from the TFTP server to the root directory on the flash of the active MPU.
<Sysname> tftp 192.168.1.26 get newest.app slot1#flash:/startup.app
File will be transferred in binary mode
Downloading file from remote TFTP server, please wait...|
TFTP: 2737556 bytes received in 14 second(s)
File downloaded successfully.
// Download the file from the TFTP server to the root directory on the flash of the standby MPU.
2. In IRF mode
# To upgrade the device, download the newest.app file from the TFTP server with the IP address of
192.168.1.26 and save it to both the root directory on the flash of the active MPU and a standby MPU (the
ID of the IRF member switch where the standby MPU resides is 2, and the slot number of the standby MPU
is 1) of the IRF fabric.
<Sysname> tftp 192.168.1.26 get newest.app startup.app
.
File will be transferred in binary mode
Downloading file from remote TFTP server, please wait..................
TFTP: 2737556 bytes received in 13 second(s)
File downloaded successfully.
74
// Download the file from the TFTP server to the root directory on the flash of the active MPU of the IRF
fabric.
<Sysname> tftp 192.168.1.26 get newest.app slot1#flash:/startup.app
File will be transferred in binary mode
Downloading file from remote TFTP server, please wait...|
TFTP: 2737556 bytes received in 14 second(s)
File downloaded successfully.
// Download the file from the TFTP server to the root directory on the flash of the standby MPU of the IRF
fabric.
interface interface-type interface-number: Specifies the source interface for establishing TFTP
connections. The primary IP address of the source interface is used as the source IP address of packets
sent to a TFTP server. If the source interface has no primary IP address specified, no TFTP connection can
be established.
ip source-ip-address: Specifies the source IP address of packets sent to a TFTP server, which is one of the
IP addresses configured on the device.
Description
Use the tftp client source command to specify the source IP address of packets sent to a TFTP server.
Use the undo tftp client source command to restore the default.
By default, the source IP address is the IP address of the output interface of the route to the server is used
as the source IP address..
If you use the tftp client source command to first configure a source interface and then a source IP address,
the source IP address overwrites the source interface, and vice versa.
If you first use the tftp client source command to specify a source IP address and then use the tftp
command to specify another source IP address, the latter is used.
Examples
The source IP address specified with the tftp client source command applies to all TFTP connections while
the one specified with the tftp command applies to the current TFTP connection only.
Related commands: display tftp client configuration.
# Specify the source IP address of packets sent to a TFTP server as 2.2.2.2.
<Sysname> system-view
75
[Sysname] tftp client source ip 2.2.2.2
# Specify the IP address of interface VLAN-interface 1 as the source IP address of packets sent to a TFTP
server.
tftp-ipv6-server: IPv6 address or host name (a string of 1 to 46 characters) of a TFTP server.
-iinterface-type interface-number: Specifies an output interface by its type and number. This parameter
can be used only when the TFTP server address is a link local address and the specified output interface
has a link local address. For the configuration of a link local address, see IPv6 basics configuration in the
Layer 3—IP Services Configuration Guide.
get: Downloads a file.
put: Uploads a file.
source-file: Source filename.
destination-file: Destination filename. If it is not specified, this filename is the same as the source
filename.
vpn-instance vpn-instance-name: Specifies the MPLS L3 VPN that the TFTP server belongs to. The
vpn-instance-name argument is a case-sensitive string of 1 to 31 characters.
Description
Use the tftp ipv6 command to download a specified file from a TFTP server or upload a specified local
file to a TFTP server in an IPv6 network.
Examples
# Download filetoget.txt from the TFTP server.
<Sysname> tftp ipv6 fe80::250:daff:fe91:e058 -i Vlan-interface 1 get filetoget.txt
...
File will be transferred in binary mode
Downloading file from remote TFTP server, please wait....
TFTP: 411100 bytes received in 2 second(s)
File downloaded successfully.
76
File management commands
NOTE:
In the following examples, the current working directory
For the qualified filename formats, see
cd
Syntax
cd { directory |.. | / }
View
User view
Default level
3: Manage level
Parameters
directory: Name of the target directory, in the format of [drive:/]path. For the detailed introduction to the
drive and path arguments, see Fundamentals Configuration Guide. If no drive information is provided,
the argument represents a folder or subfolder in the current directory.
..: Returns to an upper directory. If the current working directory is the root directory, or if no upper
directory exists, the current working directory does not change when the cd .. command is executed. This
argument does not support command online help.
the device.
is the root directory of the storage medium on
Fundamentals Configuration Guide
.
/: Returns to the root directory of the storage medium. This keyword does not support command line
online help.
Description
Use the cd command to change the current working directory.
Examples
# Enter the test folder after logging in to the device.
<Sysname> cd test
# Return to the upper directory (Remember to enter a space after the keyword cd).
<Sysname> cd ..
# Return to the root directory.
<Sysname> cd /
After you change the current directory using the cd command, you can use the pwd command to view the
path of the current working directory.
1. In standalone mode
# Enter the root directory of the flash on the standby MPU.
• Display the slot number where the standby MPU resides.
77
<Sysname> display device
Slot No. Brd Type Brd Status Subslot Num Sft Ver Patch Ver
0 LSQ1SRP1CB Master 0 A7500-6626 None
1 LSQ1SRP1CB Slave 0 A7500-6626 None
2 LSQ1GP48EB Normal 0 A7500-6626 None
3 LSQ1GV48SC Normal 0 A7500-6626 None
4 NONE Absent 0 NONE None
// The output shows that the slot number of the standby MPU is 1.
• Enter the root directory of the flash on the standby MPU.
<Sysname> cd slot1#flash:/
# Change the current directory from the standby MPU to the test folder in the root directory of the active
MPU.
<Sysname> cd flash:/test
2. In IRF mode
Display the member IDs and slot numbers of the member switches where the active MPU of the IRF fabric
(the active MPU on the master) and the standby MPUs of the IRF fabric (including all the MPUs except the
active MPU on the master) reside.
------------------------------------------------- * indicates the device is the master.
+ indicates the device through which the user logs in.
The Bridge MAC of the IRF is: 00e0-fc00-0a00
Auto upgrade : yes
Mac persistent : 6 min
copy
Syntax
View
// The output shows that MPU 0 on member switch 2 is the active MPU of the IRF fabric, and MPUs 0 and
1 on member switch 1 and MPU 1 on member switch 2 are the standby MPUs of the IRF fabric.
# Enter the test folder of the root directory of the flash on the active MPU of the IRF fabric.
<Sysname> cd flash:/test
# Enter the root directory of the flash on a standby MPU (the member ID and slot number of the member
switch where the standby MPU resides are both 1) of the IRF fabric.
<Sysname> cd chassis1#slot1#flash:/
# Change the current directory to the test folder in the root directory of the active MPU of the IRF fabric.
<Sysname> cd flash:/
copyfileurl-source fileurl-dest
User view
78
Default level
3: Manage level
Parameters
fileurl-source: Name of the source file.
fileurl-dest: Name of the target file or folder.
Description
Use the copy command to copy a file.
If you specify a target folder, the system will copy the file to the specified folder and use the name of the
source file as the file name.
Examples
# Copy file testcfg.cfg in the current folder and save it as testbackup.cfg.
<Sysname> copy testcfg.cfg testbackup.cfg
Copy flash:/test.cfg to flash:/testbackup.cfg?[Y/N]:y
....
%Copy file flash:/test.cfg to flash:/testbackup.cfg...Done.
1. In standalone mode
# Copy the configuration file of the active MPU to the root directory of the standby MPU.
<Sysname> copy vrcfg.cfg slot1#flash:/
Copy flash:/vrcfg.cfg to slot1#flash:/vrcfg.cfg?[Y/N]:y
%Copy file flash:/vrcfg.cfg to slot1#flash:/vrcfg.cfg...Done.
2. In IRF mode
# Copy the configuration file of the active MPU of the IRF fabric to the root directory of a standby MPU
(the member ID and the slot number of the member switch where the standby MPU resides are both 1) of
the IRF fabric.
<Sysname> copy vrcfg.cfg chassis1#slot1#flash:/
Copy flash:/vrcfg.cfg to chassis1#slot1#flash:/vrcfg.cfg?[Y/N]:y
%Copy file flash:/vrcfg.cfg to chassis1#slot1#flash:/vrcfg.cfg...Done.
# Copy the configuration file of a standby MPU (the member ID and the slot number of the member
switch where the standby MPU resides are both 1) of the IRF fabric to the root directory of another
standby MPU (the member ID and the slot number of the member switch where the standby MPU resides
are 2 and 1 respectively).
<Sysname> copy chassis1#slot1#flash:/vrcfg.cfg chassis2#slot1#flash:/
Copy flash:/vrcfg.cfg to chassis1#slot1#flash:/vrcfg.cfg?[Y/N]:y
%Copy file chassis1#slot1#flash:/vrcfg.cfg to chassis2#slot1#flash:/vrcfg.cfg...Done.
delete
Syntax
delete [ /unreserved ] file-url
79
View
User view
Default level
3: Manage level
Parameters
/unreserved: Permanently deletes the specified file, and the deleted file can never be restored.
file-url: Name of the file to be deleted. Asterisks (*) are acceptable as wildcards. For example, to remove
files with the extension of .txt in the current directory, you may use the delete *.txt command.
Description
Use the delete file-url command to temporarily delete a file. The deleted file is saved in the recycle bin.
To restore it, use the undelete command.
Use the dir /all command to display the files deleted from the directory and moved to the recycle bin.
These files are enclosed in pairs of brackets [ ].
Use the reset recycle-bin command to remove the files from the recycle bin.
Use the delete /unreserved file-url command to permanently delete a file, and the deleted file cannot be
restored. Use it with caution.
Examples
CAUTION:
If you delete two files with the same filename in different directories, only the last one is retained in the
recycle bin.
1. In standalone mode
# Remove file tt.cfg from the root directory of the storage medium on the active MPU.
# Remove file tt.cfg from the root directory of the storage medium on a standby MPU of the IRF fabric (the
member ID and slot number of the member switch where the standby MPU resides are both 1).
/all: Displays all files and folders in the current directory, including hidden files, hidden folders, files
moved from the current directory to the recycle bin. Files in the recycle bin are enclosed in square
brackets [ ].
file-url: Displays the specified file. Asterisks (*) are acceptable as wildcards. For example, to display files
with the .txt extension in the current directory, you may use the dir *.txt command.
/all-filesystems: Displays files and folders in the root directory of all storage media on the device.
Description
Use the dir command to display files or folders.
If no parameter is specified, the command displays all visible files and folders in the current directory.
Examples
1. In standalone mode
# Display information about all files and folders in the storage medium of the active MPU. (The output
depends on your switch model.)
<Sysname> dir /all
Directory of flash:/
0 -rwh 716 Nov 19 2010 11:06:43 hostkey
1 -rwh 4744 Mar 31 2011 11:19:16 private-data.txt
2 -rw- 8198 Nov 19 2010 11:37:13 startup.cfg
# Display information about all files and folders in the storage medium of the active MPU of the IRF fabric.
(The output depends on your switch model.)
# Display files and folders in the root directory of all storage media on the IRF fabric. (The output
depends on your switch model.)
<Sysname> dir /all-filesystems
Directory of flash:/
0 -rw- 1520300 Dec 01 2010 11:37:47 cmdtree.txt
1 drw- - Dec 01 2010 11:37:41 logfile
2 drw- - Dec 01 2010 15:07:15 diaglog
3 drw- - Dec 01 2010 15:07:15 seclog
4 drw- - Dec 03 2010 09:48:05 secl
5 -rw- 909 Dec 03 2010 09:48:38 secl.log
6 -rw- 302515 Dec 09 2010 15:18:09 default.diag
64389 KB total (12103 KB free)
83
Directory of chassis1#slot1#flash:/
0 -rw- 1520300 Dec 01 2010 11:37:47 cmdtree.txt
1 drw- - Dec 01 2010 11:37:41 logfile
2 drw- - Dec 01 2010 15:07:15 diaglog
3 drw- - Dec 01 2010 15:07:15 seclog
4 drw- - Dec 03 2010 09:48:05 secl
5 -rw- 909 Dec 03 2010 09:48:38 secl.log
6 -rw- 302515 Dec 09 2010 15:18:09 default.diag
64389 KB total (11963 KB free)
# Display information about all files and folders in the storage medium of a standby MPU of the IRF fabric
(the member ID and the slot number of the member switch where the standby MPU resides are both 1).
• Method 1
<Sysname> dir chassis1#slot1#flash:/
Directory of chassis1#slot1#flash:/
d Indicates a directory. If this field does not exist, it indicates a file.
r Indicates that the file or directory is readable.
w Indicates that the file or directory is writable.
h Indicates that the file or directory is hidden.
[ ] Indicates that the file is in the recycle bin.
execute
Syntax
execute filename
View
System view
Default level
2: System level
Parameters
filename: Name of a batch file with a .bat extension. You can use the rename command to change the
suffix of the configuration file to .bat to use it as a batch file.
Description
Examples
Use the execute command to execute the specified batch file.
Batch files are command line files. Executing a batch file is to execute a set of command lines in the file.
Do not include invisible characters in a batch file. If an invisible character is found during the execution,
the batch process will abort and the commands that have been executed cannot be cancelled.
Not every command in a batch file is sure to be executed. For example, if a certain command is not
correctly configured, the command will fail to be executed, and the system omits this command and goes
to the next one.
The configuration generated after a batch file is executed will not be backed up to the standby MPU
automatically.
Each configuration command in a batch file must be a standard configuration command, meaning that
the valid configuration information can be displayed with the display current-configuration command.
# Execute the batch file test.bat in the root directory.
<Sysname> system-view
[Sysname] execute test.bat
85
file prompt
Syntax
file prompt { alert | quiet }
View
System view
Default level
3: Manage level
Parameters
alert: Enables the system to warn you about operations that may bring undesirable results, including file
corruption or data loss.
quiet: Disables the system from warning you about any operation.
Description
Use the file prompt command to set a prompt mode for file operations.
By default, the prompt mode is alert, which is recommended to avoid mis-operations.
When the prompt mode is set to quiet, the system does not warn for any file operation.
Examples
# Set the file operation prompt mode to alert.
<Sysname> system-view
[Sysname] file prompt alert
fixdisk
Syntax
fixdisk device
View
User view
Default level
3: Manage level
Parameters
device: Storage medium name.
Description
Use the fixdisk command to restore the space of a storage medium when it becomes unavailable
because of an abnormal operation.
Examples
# Restore the space of the flash.
<Sysname> fixdisk flash:
Fixdisk flash: may take some time to complete...
%Fixdisk flash: completed.
86
format
Syntax
format device [ FAT16 | FAT32 ]
View
User view
Default level
3: Manage level
Parameters
device: Name of a storage medium (for example Flash).
FAT16: Formats a storage medium using the FAT16 format. FAT16 does not support Tab matching but
needs to be input completely if used, and is not applicable to Flash.
FAT32: Formats a storage medium using the FAT32 format. FAT32 does not support Tab matching but
needs to be input completely if used, and is not applicable to Flash.
Description
Use the format command to format a storage medium.
CAUTION:
Formatting a storage medium results in loss of all the files on the storage medium and these files cannot be
restored. In particular, if a startup configuration file exists on a storage medium, formatting the storage
medium results in loss of the startup configuration file.
Examples
# Format the flash.
<Sysname> format flash:
All data on flash: will be lost, proceed with format? [Y/N]:y
./
%Format flash: completed.
mkdir
Syntax
mkdir directory
View
User view
Default level
3: Manage level
Parameters
directory: Name of a folder.
Description
Use the mkdir command to create a folder under a specified directory on the storage medium.
87
Examples
The name of the folder to be created must be unique in the specified directory. Otherwise, you will fail
to create the folder in the directory.
To use this command to create a folder, the specified directory must exist. For example, to create folder
flash:/test/mytest, the test folder must exist. Otherwise, you will fail to create the mytest folder.
# Create a folder named test in the current directory.
<Sysname> mkdir test
....
%Created dir flash:/test
# Create folder test/subtest in the current directory.
<Sysname> mkdir test/subtest
....
%Created dir flash:/test/subtest
1. In standalone mode
# Create folder test on the standby MPU (in slot 1).
<Sysname> mkdir slot1#flash:/test
....
%Created dir slot1#flash:/test.
2. In IRF mode
# Create folder test on the active MPU of the IRF fabric.
<Sysname> mkdir test
....
%Created dir flash:/test1.
# Create folder test on a standby MPU (the member ID and slot number of the member switch where the
standby MPU resides are 2 and 1 respectively) of the IRF fabric.
<Sysname> mkdir chassis2#slot1#flash:/test
....
%Created dir chassis2#slot1#flash:/test.
more
Syntax
more file-url
View
User view
Default level
3: Manage level
Parameters
file-url: File name.
Description
Use the more command to display the contents of the specified file. It indicates that there are more lines
than the screen can display.
• Pressing Enter displays the next line.
88
Examples
• Pressing Space displays the next screen.
• Pressing Ctrl+C or any other key exits the display.
This command is valid only for text files.
# Display the contents of file test.txt.
<Sysname> more test.txt
Welcome to HP.
# Display the contents of file testcfg.cfg.
<Sysname> more testcfg.cfg
#
version 5.20, Beta 1201, Standard
#
sysname Sysname
#
vlan 2
#
return
<Sysname>
1. In standalone mode
# Display the contents of file testcfg.cfg on the standby MPU.
<Sysname> more slot1#flash:/testcfg.cfg
#
version 5.20, Release 0000
#
sysname Test
#
---- More ----
2. In IRF mode
# Display the contents of file testcfg.cfg on the active MPU of the IRF fabric.
<Sysname> more testcfg.cfg
#
version 5.20, Release 0000
#
sysname Sysname
#
---- More ----
# Display the contents of file testcfg.cfg on a standby MPU (the member ID and slot number of the
member switch where the standby MPU resides are 2 and 1 respectively) of the IRF fabric.
<Sysname> more chassis2#slot1#flash:/testcfg.cfg
#
version 5.20, Release 0000
89
#
sysname Sysname
#
---- More ----
mount
Syntax
mount device
View
User view
Default level
3: Manage level
Parameters
device: Name of a storage medium (for example flash or cf).
Description
Use the mount command to mount a hot swappable storage medium, such as a CF card (excluding flash).
This command is effective only when the device is in unmounted state.
Examples
By default, a storage medium is automatically mounted and in the mounted state after connected to the
device, which means you can use it without mounting it.
Do not remove the storage medium or swap a card when mounting or unmounting the device, or when
you are processing files on the storage medium. Otherwise, the file system could be damaged.
When a storage medium is connected to a lower version system, the system may not be able to recognize
the device automatically, and you need to use the mount command for the storage medium to function
normally.
Before removing a mounted storage medium from the system, you should first unmount it to avoid
damaging the device.
Related commands: umount.
1. In standalone mode
# Mount a CF card of the active MPU.
<Sysname> mount cf:
% Mount cf: successfully.
%Apr 23 01:50:00:628 2011 Sysname VFS/4/LOG:
cf: mounted into slot 4.
# Mount a CF card of the standby MPU (in slot 1).
<Sysname> mount slot1#cf:
% Mount slot1#cf: successfully.
%Apr 23 01:50:00:628 2011 Sysname VFS/5/LOG:
cf: mounted into slot 1.
2. In IRF mode
# Mount a CF card of the master.
90
<Sysname> mount cf:
% Mount cf: successfully.
%Apr 23 01:50:00:628 2011 Sysname VFS/4/LOG:
cf: mounted into chassis 1 slot 4.
# Mount a CF card of a slave (with the member ID 2 and the local active MPU slot number 1).
<Sysname> mount chassis2#slot1#cf:
% Mount chassis2#slot1#cf: successfully.
%Apr 23 01:50:00:628 2011 Sysname VFS/5/LOG:
cf: mounted into chassis 2 slot 1.
move
Syntax
move fileurl-source fileurl-dest
View
User view
Default level
3: Manage level
Parameters
fileurl-source: Name of the source file.
fileurl-dest: Name of the target file or folder.
Description
Use the move command to move a file.
If you specify a target folder, the system will move the source file to the specified folder, with the file name
unchanged.
You cannot move files between storage media of different types.
Examples
# Move file flash:/test/sample.txt to flash:/, and save it as 1.txt.
<Sysname> move test/sample.txt 1.txt
Move flash:/test/sample.txt to flash:/1.txt?[Y/N]:y
...
% Moved file flash:/test/sample.txt to flash:/1.txt
# Move file b.cfg to the subfolder test2.
<Sysname> move b.cfg test2
Move flash:/b.cfg to flash:/test2/b.cfg?[Y/N]:y
.
%Moved file flash:/b.cfg to flash:/test2/b.cfg.
pwd
Syntax
pwd
91
View
User view
Default level
3: Manage level
Parameters
None
Description
Use the pwd command to display the current path.
Examples
# Display the current path.
<Sysname> pwd
flash:
rename
Syntax
rename fileurl-source fileurl-dest
View
User view
Default level
3: Manage level
Parameters
fileurl-source: Name of the source file or folder.
fileurl-dest: Name of the target file or folder.
Description
Use the rename command to rename a file or folder. The target file name must be unique in the current
path.
Examples
# Rename file sample.txt as sample.bat.
<Sysname> rename sample.txt sample.bat
Rename flash:/sample.txt to flash:/sample.bat? [Y/N]:y
% Renamed file flash:/sample.txt to flash:/sample.bat
reset recycle-bin
Syntax
View
reset recycle-bin [ /force ]
User view
92
Default level
3: Manage level
Parameters
/force: Deletes all files in the recycle bin, including files that cannot be deleted by the command without the /force keyword.
Description
Use the reset recycle-bin command to permanently delete the files in the recycle bin in the current
directory.
If a file is corrupted, you may not be able to delete the file using the reset recycle-bin command. Use the
reset recycle-bin /force command to delete the corrupted file in the recycle bin forcibly.
The deletefile-url command only moves a file to the recycle bin. To permanently delete the file in the
recycle bin, use the reset recycle-bin command in the original directory of the file.
The reset recycle-bin command deletes files in the current directory and in the recycle bin. If the original
path of the file to be deleted is not the current directory, use the cd command to enter the original
directory of the file, and then execute the reset recycle-bin command.
Examples
# Delete file b.cfg in the current directory and in the recycle bin.
• Display all the files in the recycle bin and in the current directory.