01-02 Basic Configurations Commands
01-02 Basic Configurations Commands
2.1.1 cls
Function
The cls command clears the current screen.
Format
cls
Parameters
None
Views
User view
Default Level
1: Monitoring level
Usage Guidelines
This command only clears the screen and does not clear the screen buffer.
Example
# Clear screen.
<Huawei> cls
Info: Current terminal monitor is off.
Info: Current terminal debugging is off.
2.1.2 diagnose
Function
The diagnose command enters the diagnostic view from the system view.
Format
diagnose
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Diagnostic commands are mainly used for fault diagnosis. However, running some
commands may cause device faults or service interruptions. Therefore, use these
commands under the instruction of technical support personnel.
Example
# Enter the diagnostic view.
<Huawei> system-view
[Huawei] diagnose
[Huawei-diagnose]
Format
display history-command
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
You can run this command to check historical commands the user has executed
recently. This command facilitates information search. Historical commands are
stored in the circular mode and a maximum of 200 historical commands can be
displayed.
Precautions
All the historical commands entered by a user are automatically saved on the
terminal, that is, any input that ends with Enter is saved as a historical command.
NOTE
● Historical commands are saved in the same format as that used in the input. If a
command that is entered by a user is in an incomplete format, the saved historical
command is also in the incomplete format.
● If a user runs a command several times, only the latest command is saved on the device.
If the command is entered in different formats, they are considered as different
commands.
NOTE
Access to historical commands using the Up arrow key does not apply to Windows 9X. The
Up arrow key has different functions in Windows 9X and needs to be replaced by shortcut
keys Ctrl+P.
Example
# Display the historical commands that have been executed on the current
terminal.
<Huawei> display history-command
quit
user privilege level 15
user-interface vty 0 4
system-view
Related Topics
2.2.11 history-command max-size
Format
display this
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
After the configurations are complete in a certain view, run the display this
command to check the current configurations.
Precautions
If you run the display this command in an interface view, configuration of the
interface view is displayed. If you run this command in a protocol view,
configuration of the protocol view is displayed.
Example
# Display the running configuration in the current view.
<Huawei> system-view
[Huawei] user-interface vty 0
[Huawei-ui-vty0] display this
#
user-interface con 0
user-interface vty 0 4
idle-timeout 30 0
user-interface vty 16 20
#
return
2.1.5 header
Function
The header command configures the header information displayed on a terminal
when users log in to a connected device.
Format
header { login | shell } { information text | file file-name }
Parameters
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To provide some prompts or alarms to users, you can use the header command to
configure a title on the device. If a user logs in to the device, the title is displayed.
Procedure
If information is specified, the header text starts and ends with the same
character. You can set the header text in either of the following modes:
● Non-interactive: enter the header text behind the start character.
Use the same character at the beginning and end of the header and press
Enter. If the start and end characters are inconsistent, the system prompts an
error message.
● Interactive: enter the start character and press Enter.
The system displays a message prompting the correct header information.
Then enter the required information and enter the same character at the
beginning and end of the header, and press Enter. The system quits the
interactive process.
During interaction, you can press Enter at any time to enter information in
the next line.
Precautions
● Before setting the login parameter, you must set login authentication
parameters; otherwise, no header information about authentication is
displayed.
● Before setting the file parameter, ensure that the file containing the header
exists; otherwise, the file name cannot be obtained.
● If the file parameter is set, save the file containing the header in the root
directory of the default storage media. To save the file to another directory,
you must use a full path.
● If you use SSH1.X to log in to the device, the shell header rather than the
login header is displayed.
● If you use SSH2.0 to log in to the device, both login and shell headers are
displayed in the login process.
● If the header command is configured several times, only the latest
configuration takes effect.
● After the login title is configured, any user that logs in to the system can view
the title.
● The start and end characters in the header text can be double quotation
marks (""). However, the header text content cannot contain double
quotation marks ("").
Example
# Configure a shell header. (non-interactive process)
<Huawei> system-view
[Huawei] header shell information &Hello! Welcome to system!& # Enter the header text behind the
start character '&' and enter '&' at the end of the header text, and press Enter.
# Press Enter. The shell header is displayed when the user logs in again.
Hello!
Welcome to system!
<Huawei>
Format
display hotkey
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
After you understand the defined, undefined, and system hotkeys in the system,
you can use hotkeys to quickly enter commands. To redefine hotkeys for a
command, run the hotkey command.
The system allows hotkeys in places where commands can be entered, and
displays the commands corresponding to hotkeys. You can run the display hotkey
command to view the commands corresponding to hotkeys.
Example
# Display defined, undefined, and system hotkeys.
<Huawei> display hotkey
----------------- HOTKEY -----------------
=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L undo idle-timeout
CTRL_O undo debugging all
=Undefined hotkeys=
Hotkeys Command
CTRL_U NULL
=System hotkeys=
Hotkeys Function
CTRL_A Move the cursor to the beginning of the first 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 Last line
CTRL_F Move the cursor one character right
Item Description
Related Topics
2.1.7 hotkey
2.1.7 hotkey
Function
The hotkey command sets a shortcut key for a command.
The undo hotkey restores the system shortcut keys to the default values.
By default, the system sets the default values for three shortcut keys CTRL+G,
CTRL+L, and CTRL+O, while does not set default value for CTRL+U.
Format
hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_U } command-text
undo hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_U }
Parameters
Parameter Description Value
CTRL_G Specifies the shortcut key Ctrl+G for a -
command.
CTRL_L Specifies the shortcut key Ctrl+L for a -
command.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
You can set a shortcut key for a command that is often used; you can also change
the default value of the shortcut key that is defined by the system according to
your requirements.
Precautions
Four shortcut keys are customized by users: CTRL+G, CTRL+L, CTRL+O, and CTRL
+U.
● By default, the shortcut key CTRL+G corresponds to the display current-
configuration command which displays current configuration.
● By default, the shortcut key CTRL+L corresponds to the undo idle-timeout
command which restores the default timeout period.
● By default, the shortcut key CTRL+O corresponds to the undo debugging all
command which stops the output of all debugging information.
After you use the hotkey command to set a shortcut key for a command, you can
run the command by pressing the shortcut key or entering a command.
NOTE
One shortcut key can be set for only one command. If you set a shortcut key for multiple
commands, only the latest configuration takes effect.
When assigning a command for a shortcut key, you need to mark the command with
double quotation marks if the command consists of several words, that is, the command
includes spaces. You do not need to mark the command with double quotation marks if the
command consists of only one word.
Example
# Assign the display tcp status command for the shortcut key CTRL+L.
<Huawei> system-view
[Huawei] hotkey ctrl_l "display tcp status"
[Huawei] display hotkey
----------------- HOTKEY -----------------
=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L display tcp status
CTRL_O undo debugging all
=Undefined hotkeys=
Hotkeys Command
CTRL_U NULL
=System hotkeys=
Hotkeys Function
CTRL_A Move the cursor to the beginning of the first 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 Last line
CTRL_F Move the cursor one character right
CTRL_H Erase the character left of the cursor
CTRL_I Perform the same fucntion as the "Tab" key
CTRL_J Perform the same fucntion as the "Enter" key
CTRL_K Kill outgoing connection when connecting
CTRL_M Perform the same fucntion as the "Enter" key
CTRL_N Display the next command from the history buffer
CTRL_T Function as a question mark
CTRL_P Display the previous command from the history buffer
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
Related Topics
2.1.6 display hotkey
2.1.8 quit
Function
The quit command returns from the current view to a lower-level view. If the
current view is the user view, this command exits from the system.
Format
quit
Parameters
None
Views
All views
Default Level
0: Visit level
Usage Guidelines
Usage Scenario
Three types of views are available and they are listed as follows from a lower level
to a higher level:
● User view
● System view
● Service view, such as route protocol view or interface view
Run the quit command to return to a lower-level command view from the current
view. If you are in the user view currently, after you run the quit command, you
quit from the system.
Example
# Return to the system view from the AAA view, and then return to the user view.
After this, quit the system.
<Huawei> system-view
[Huawei] aaa
[Huawei-aaa] quit
[Huawei] quit
<Huawei> quit
Related Topics
2.1.10 system-view
2.1.9 return
2.1.9 return
Function
The return command returns to the user view from other views except the user
view.
Format
return
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
In other views, you can use the return command to return to the user view.
● Run this command to return to the user view if the current view is another
view except the user view.
● If the current view is the user view, no change occurs after running this
command.
● The shortcut keys<Ctrl+Z> have the same function as the return command.
Example
# Return to the user view from the user interface view.
<Huawei> system-view
[Huawei] user-interface vty 0
[Huawei-ui-vty0] return
<Huawei>
Related Topics
2.1.10 system-view
2.1.10 system-view
Function
The system-view command enables you to enter the system view from the user
view.
Format
system-view
Parameters
None
Views
User view
Default Level
2: Configuration level
Usage Guidelines
You must configure the device in the system view. Run this command in the user
view to enter the system view.
Example
# Enter the system view.
<Huawei> system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]
Related Topics
2.1.8 quit
2.1.9 return
Function
The acl command uses an ACL to restrict login rights of users on a terminal.
Format
acl [ ipv6 ] acl-number { inbound | outbound }
Parameters
Parameter Description Value
ipv6 Indicates an ACL6 number. -
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
This command restricts the login rights of a user interface based on the source IP
address, destination IP address, source port, or destination port. You can use this
command to permit or deny access to a destination or from a source.
Precautions
After the configurations of the ACL take effect, all users on the user interface are
restricted by the ACL.
You can configure all of the following ACL types: IPv4 inbound, IPv4 outbound,
IPv6 inbound, and IPv6 outbound on a user interface. Only one ACL of each type
can be configured on a user interface, and only the latest configuration of an ACL
takes effect.
Example
# Restrict the Telnet login rights on user interface VTY 0.
<Huawei> system-view
[Huawei] user-interface vty 0
[Huawei-ui-vty0] acl 3001 outbound
# Remove the restriction on the Telnet login rights on user interface VTY 0.
<Huawei> system-view
[Huawei] user-interface vty 0
[Huawei-ui-vty0] undo acl outbound
Related Topics
2.2.20 user-interface
Format
auto-execute command command
undo auto-execute command
Parameters
Parameter Description Value
command Specifies an auto-run command. -
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the auto-execute command command to make the device run a
command automatically on the corresponding interface.
You can run the auto-execute command command to enable automatic
execution for the Telnet command.
Precautions
● The auto-execute command command is applicable to the VTY user
interface.
● When you log in to the device, the device automatically runs the commands
that are configured by the auto-execute command command. The user's
terminal disconnects from the device.
● Before saving the configuration of the auto-execute command command,
ensure that you can log in to the device in other ways so that you can cancel
the command configuration.
● If you use the auto-execute command command, you cannot configure the
device in the user interface view. Therefore, use this command with caution.
Example
# Configure the telnet 10.110.100.1 command to automatically run after a user
logs in to the device using the VTY0 interface.
<Huawei> system-view
[Huawei] user-interface vty 0
2.2.3 databits
Function
The databits command sets the number of data bits of the user interface.
The undo databits command restores the default number of data bits.
By default, the number of data bits of the user interface is 8.
Format
databits { 5 | 6 | 7 | 8 }
undo databits
Parameters
Parameter Description Value
5 Indicates that the number of data bits is 5. -
6 Indicates that the number of data bits is 6. -
7 Indicates that the number of data bits is 7. -
8 Indicates that the number of data bits is 8. -
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Use this command only when necessary. If the number of data bits of a device's
user interface is changed, ensure that the same number of data bits is set on the
HyperTerminal used for login.
This function takes effect for only serial interfaces.
NOTE
The data bit of the console user interface does not support 5 and 6.
Example
# Set the number of data bits to 7.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] databits 7
Format
display mib-index interface [ interface-type [ interface-number ] ]
Parameters
Parameter Description Value
interface-type Specifies the interface for which the index value is -
interface- displayed.
number
● interface-type: specifies the interface type, for
example, Ethernet.
If the interface type is not specified, the index values
of all interfaces are displayed.
● interface-number: specifies the number of an
interface. It is used with interface-type to specify an
interface.
If the interface number is not specified, the index
values of all interfaces of the type are displayed.
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run the display mib-index interface command as an NMS user to view
the index values of interfaces.
Example
# Display indexes of all interfaces.
<Huawei> display mib-index interface
IfName IfIndex PortIndex
--------------------------------------------------
GigabitEthernet0/0/0 8 0
NULL0 2 --
Vlanif1 6 --
Wlan-Capwap0 7 1
Wlan-Radio0/0/0 9 --
Wlan-Radio0/0/1 4 --
Item Description
Function
The display user-interface command displays information about a user interface.
Format
display user-interface [ ui-type ui-number1 | ui-number ] [ summary ]
Parameters
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Using the display user-interface command, you can view detailed configuration
information about all user interfaces or a specified user interface.
NOTE
Lower-level users cannot gain access to a user interface information about users of higher
levels.
Example
# Display detailed information about the user interface with the absolute number
0.
<Huawei> display user-interface 0
Idx Type Tx/Rx Modem Privi ActualPrivi Auth Int
+ 0 CON 0 9600 - 15 15 P -
+ : Current UI is active.
Idx : Absolute index of UIs.
Type : Type and relative index of UIs.
Privi: The privilege of UIs.
ActualPrivi: The actual privilege of user-interface.
Auth : The authentication mode of UIs.
A: Authenticate use AAA.
N: Current UI need not authentication.
P: Authenticate use current UI's password.
Int : The physical location of UIs.
Parameter Description
UI(s) not in async mode - Interfaces numbered from 1 to 128 are UI interfaces
or- with no hardware that are working in synchronous mode or are not
support: 1-128 supported by the hardware. Currently, the WLAN
supports only the asynchronous mode.
Function
The display user-interface maximum-vty command displays the maximum
number of VTY users.
Format
display user-interface maximum-vty
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run the display user-interface maximum-vty command to view the
maximum number of users who connect to the device using Telnet or SSH. By
default, the total number of Telnet users and SSH users is five maximum.
Example
# Display the maximum number of VTY users.
<Huawei> display user-interface maximum-vty
Maximum of VTY user : 5
Parameter Description
Related Topics
2.2.22 user-interface maximum-vty
Function
The display users command displays login information for each user interface.
Format
display users [ all ]
Parameters
Views
All views
Default Level
3: Management level
Usage Guidelines
You can run this command to view information about users who are connected to
the device. The information includes the user name, IP address, and authentication
and authorization information.
NOTE
Lower-level users cannot gain access to information about users of higher levels.
Example
# Run the display users command to view information about users who log in to
the device through the user interface.
<Huawei> display users
User-Intf Delay Type Network Address AuthenStatus AuthorcmdFlag
+ 5 VTY 0 00:00:00 TEL 192.168.40.1 pass
Username : admin
Network Address : 172.16.1.1
Item Description
Delay Interval from the user's latest input to the current time, in
seconds.
Item Description
Username User name for logging in to the device. If the user name is
not specified, Unspecified is displayed.
Format
display vty lines
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
None
Example
# List the number of lines displayed on the VTY screen.
<Huawei> display vty lines
Current VTY lines is 24
Related Topics
2.2.15 screen-length
Function
The display vty mode command displays the current VTY mode.
Format
display vty mode
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
VTY modes are classified into the man-to-machine mode and machine-to-machine
mode. You can run this command to check the current VTY mode.
Example
# Display the VTY mode.
<Huawei> display vty mode
Current user-interface mode is Human-Machine interface.
Function
The free user-interface command disconnects the device from a specified user
interface.
Format
free user-interface { ui-number | ui-type ui-number1 }
Parameters
ui-type Specifies the type of a user The value can be Console, or VTY.
interface.
ui-number1 Specifies the relative The minimum value is 0. The
number of a user interface. maximum value is smaller by 1 than
the number of user interfaces the
system supports.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If a user logs in to the device and does not perform an operation or you want to
forbid a user from performing operations on the device, you can run the free
user-interface command to disconnect a specified user's terminal from the device.
After the command is executed, the device logs out the user.
Precautions
Example
# Disconnect the device from user-interface 0.
<Huawei> free user-interface 0
Warning: User interface Console0 will be freed. Continue? [Y/N]:y
Related Topics
2.1.8 quit
2.2.12 idle-timeout
Function
The history-command max-size command sets the size of the historical
command buffer.
The undo history-command max-size command restores the default size of the
historical command buffer.
Format
history-command max-size size-value
Parameters
Views
User interface view
Default Level
3: Management level
Usage Guidelines
The CLI can automatically save the historical commands that you enter. This
function is similar to that of Doskey. You can invoke and run the historical
commands at any time.
Example
# Set the size of the historical command buffer to 20.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] history-command max-size 20
Related Topics
2.1.3 display history-command
2.2.12 idle-timeout
Function
The idle-timeout command sets the timeout duration for disconnection from a
user interface.
Format
idle-timeout minutes [ seconds ]
undo idle-timeout
Parameters
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If a user logs in to the device and does not perform an operation, the user
interface is occupied unnecessarily. You can run the idle-timeout command to
disconnect the user's terminal from the device.
Precautions
Example
# Set the timeout duration to 1 minute and 30 seconds.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] idle-timeout 1 30
Related Topics
2.2.10 free user-interface
Format
mmi-mode enable
undo mmi-mode enable
Parameters
None
Views
User view, system view
Default Level
0: Visit level
Usage Guidelines
Usage Scenario
For example, to execute a series of commands that have been commissioned, you
can switch the VTY mode to the machine-to-machine mode.
Precautions
After you enter the machine-to-machine mode using the mmi-mode enable
command, commands that you need to use with caution can be used directly.
Therefore, in man-to-machine mode, do not use this command unless necessary.
Example
# Enter the machine-to-machine mode.
<Huawei> system-view
[Huawei] mmi-mode enable
Related Topics
2.2.9 display vty mode
2.2.14 parity
Function
The parity command sets the parity bit of a user interface.
Format
parity { even | none | odd }
undo parity
Parameters
Views
User interface view
Default Level
3: Management level
Usage Guidelines
This function takes effect for only serial interfaces.
Example
# Set the transmission parity bit on the console interface to odd parity.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] parity odd
2.2.15 screen-length
Function
The screen-length command sets the number of lines on each terminal screen
after you run a command.
Format
screen-length screen-length [ temporary ]
Parameters
Parameter Description Value
screen-length Specifies the number of lines The value is an integer that
displayed on a terminal screen. ranges from 0 to 512. The
value 0 indicates that all
command output is
displayed on one screen.
temporary Specifies the number of lines -
temporarily displayed on a terminal
screen.
In the user view, the temporary
parameter is mandatory.
Views
User interface view, User view
Default Level
3: Management level (user interface view)
Usage Guidelines
If you run a command and its output is displayed in more lines than you can see
on one screen, you can reduce the number of lines displayed on each screen.
In general, you do not need to change the number of lines displayed on each
screen. Setting the number of lines to 0 is not recommended. The configuration
takes effect after you log in to the system again.
Example
# Set the number of lines on each screen of the terminal to 30.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] screen-length 30
2.2.16 screen-width
Function
The screen-width command sets the number of columns displayed on a terminal
screen.
The undo screen-width command restores the default configuration.
By default, 132 columns are displayed on a terminal screen.
Format
screen-width screen-width [ temporary ]
undo screen-width [ temporary ]
Parameters
Parameter Description Value
screen-width Specifies the width of a terminal The value is an integer
screen. ranging from 60 to 512.
temporary Specifies the temporary width of a -
terminal screen.
Views
Console user interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When logging in to a device using the terminal tool, you can run this command to
adjust the screen width on the device to the same as that specified by the
terminal tool to prevent garbled lines.
Precautions
The configured number of columns displayed on a terminal screen takes effect
only on users logging in through the console port but does not affect those
logging in through VTY or other interfaces.
If you run the screen-width command multiple times, only the latest configuration
takes effect.
Example
# Set the screen width to 100.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] screen-width 100
2.2.17 shell
Function
The shell command enables terminal services on a user interface.
Format
shell
undo shell
Parameters
None
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To log in to a device through a console, or Virtual Type Terminal (VTY), you can
use the shell command to enable terminal services on the user interface.
Otherwise, you will fail in logging in to the device through the user interface.
Implementation Procedure
Example
# Disable terminal services on VTY 0 to VTY 4.
<Huawei> system-view
[Huawei] user-interface vty 0 4
[Huawei-ui-vty0-4] undo shell
Warning: ui-vty0-4 will be disabled. Continue? [Y/N]:y
Format
speed speed-value
undo speed
Parameters
Parameter Description Value
speed-value Specifies the data The value is expressed in bit/s.
transfer rate of a
user interface. The asynchronous serial interface supports the
following data transfer rates:
● 600 bit/s
● 1200 bit/s
● 4800 bit/s
● 9600 bit/s
● 19200 bit/s
● 38400 bit/s
● 57600 bit/s
● 115200 bit/s
NOTE
The console user interface does not support 600 bit/s
and 1200 bit/s.
Views
User interface view
Default Level
3: Management level
Usage Guidelines
This function takes effect for only serial interfaces.
Example
# Set the data transfer rate of a user interface to 115200 bit/s.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] speed 115200
2.2.19 stopbits
Function
The stopbits command sets the stop bit of a user interface.
The undo stopbits command restores the default stop bit of a user interface.
Format
stopbits { 1.5 | 1 | 2 }
undo stopbits
Parameters
Parameter Description Value
1.5 Sets the stop bit to 1.5. -
1 Sets the stop bit to 1. -
2 Sets the stop bit to 2. -
Views
User interface view
Default Level
3: Management level
Usage Guidelines
If the stop bit is 1, the corresponding data bit is 7 or 8.
NOTE
On the console user interface, the stop bit 1.5 is not supported.
Example
# Set the stop bit of a user interface to 2.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] stopbits 2
2.2.20 user-interface
Function
The user-interface command displays one or multiple user interface views.
Format
user-interface [ ui-type ] first-ui-number [ last-ui-number ]
Parameters
Parameter Description Value
ui-type Specifies the type of a user interface. The value can be console
or vty.
● If the user interface is specified,
the relative number is used.
● If the user interface is not
specified, the absolute number is
used.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When the network administrator logs in to the device using the console interface,
Telnet, or SSH, the system manages and monitors the session between the user
and the device on the corresponding user interface. Each user interface
corresponds a user interface view. The network administrator can set parameters
such as authentication and user level to manage sessions in a unified manner.
Precautions
The user interface varies according to the login mode. The user interface views can
be numbered using absolute numbers or relative numbers. Table 2-6 describes
absolute and relative numbers of user interfaces.
NOTE
● The relative numbering uniquely specifies a user interface or a group of user interfaces
of the same type.
● The absolute numbering specifies a user interface or a group of user interfaces.
After you log in to the device, you can run the display user-interface command
to view the supported user interfaces and the corresponding relative and absolute
numbers.
Example
# Enter the Console 0 user interface.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0]
Related Topics
2.2.5 display user-interface
Function
The user-interface current command displays the current user interface view.
Format
user-interface current
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
To enter the current user interface view, run the display user-interface command
without the user interface number.
Example
# Enter the current user view.
<Huawei> system-view
[Huawei] user-interface current
[Huawei-ui-vty1]
Related Topics
2.2.20 user-interface
2.2.5 display user-interface
Function
The user-interface maximum-vty command configures the maximum number of
login users.
Format
user-interface maximum-vty number
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
● If the maximum number that you set is smaller than the number of current
online users, the system displays a configuration failure message.
● The maximum number of login users set by the user-interface maximum-vty
command is the total number of Telnet and SSH users.
● If the maximum number of login users is set to 0, no user is allowed to log in
to the device using Telnet or SSH.
Example
# Set the maximum number of Telnet users to 7.
<Huawei> system-view
[Huawei] user-interface maximum-vty 7
Related Topics
2.2.6 display user-interface maximum-vty
Format
display rsa local-key-pair public
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run this command on the client and configure the client public key in the
command output to the SSH server, which ensures that the SSH client validity
check by the SSH server is successful and enables the secure data exchange
between the SSH server and client.
Example
# Display the public key in the local key pair.
<Huawei> display rsa local-key-pair public
=====================================================
Key code:
3047
0240
D538B7FC 3AFE1F5B F6C921F9 3D8C5322
905F623A
F0123161 3DA61EEB F5E897CF DC126060
546CC84E
B2AB7424 3EFF5D71 D84C5FE2 3E2BF5B3
D82DD979
A22E4AA1
0203
010001
=====================================================
Key code:
3067
0260
C51C2C01 56B06E6C EBF9055C F7AD9781
46B41A31
5FC87282 E53CFE30 8E6321D3 AC74E948
0A010339
E67C290E 2E0E8E40 BF5E1C97 F9C856EF
568DC159
1A6D28ED AFFB474B 43EFB632 CFB0875F
85420EEA
1919095B A5BC38D0 5FFF169E
0BDB3DC3
0203
010001
Table 2-7 Description of the display rsa local-key-pair public command output
Item Description
Time of Key pair created Time and date when the public key is
created.
Related Topics
2.3.17 rsa local-key-pair create
Function
The display rsa peer-public-key command displays the peer public key saved on
the local host. If no parameter is specified, the command displays detailed
information about all peer public keys.
Format
display rsa peer-public-key [ brief | name key-name ]
Parameters
Parameter Description Value
brief Displays the brief information -
about all peer public keys.
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
You can run this command to check detailed information about the RSA public key
and whether the local and peer public keys are the same.
Precautions
You must complete the RSA public key configuration before running this
command.
Example
# Display the brief information about all RSA public keys.
<Huawei> display rsa peer-public-key brief
Name Bits
-------------------------------------
rsakey001 780
Table 2-8 Description of the display rsa peer-public-key brief command output
Item Description
# Display the detailed information about the RSA public key named rsakey001.
<Huawei> display rsa peer-public-key name rsakey001
=====================================
Key name: rsakey001
=====================================
Key Code:
3067
0260
A3158E6C F252C039 135FFC45 F1E4BA9B 4AED2D88 D99B2463 3E42E13A 92A95A37
45CDF037 1AF1A910 AAE3601C 2EB70589 91AF1BB5 BD66E31A A9150911 859CAB0E
1E10548C D70D000C 55A1A217 F4EA2F06 E44BD438 DA472F14 3FB7087B 45E77C05
0203
010001
Table 2-9 Description of the display rsa peer-public-key name command output
Item Description
Related Topics
2.3.19 rsa peer-public-key
Format
display ssh server { status | session }
Parameters
Parameter Description Value
status Displays the global configuration on the SSH server. -
session Displays the current session connection information on the -
SSH server.
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
After configuring the SSH attributes, you can run this command to view the
configuration or session connection information on the SSH server to verify that
the SSH connection has been established.
Example
# Display the global configuration on the SSH server.
<Huawei> display ssh server status
SSH version :2.0
Table 2-10 Description of the display ssh server status command output
Item Description
SSH version SSH protocol version. The value can be 1.99 or 2.0.
SSH connection timeout SSH connection timeout interval. The value ranges
from 60 to 120. The default value is 60. The unit is
second.
Run the ssh server timeout command to set this
item.
SSH server key generating Key updating period of the SSH server. The default
interval value is 0. The unit is hour.
Run the ssh server rekey-interval command to
set this item.
Table 2-11 Description of the display ssh server session command output
Item Description
Item Description
Related Topics
2.3.30 ssh server port
Function
The display ssh user-information command displays the configuration of all SSH
users.
Format
display ssh user-information [ username ]
Parameters
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
This command displays the SSH user name, bound RSA public key name, and
service type.
Example
# Display the configuration of all SSH users.
<Huawei> display ssh user-information
-------------------------------------------------------------------------------
Username Auth-type User-public-key-name
-------------------------------------------------------------------------------
a password null
-------------------------------------------------------------------------------
Item Description
Related Topics
2.3.19 rsa peer-public-key
2.3.36 ssh user authentication-type
Function
The display telnet server status command displays the status and configuration
of the Telnet server.
Format
display telnet server status
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
● You can run this command to check whether the device functions as a Telnet
server.
Example
# Display the status and configuration of the Telnet server.
<Huawei> display telnet server status
TELNET IPV4 server :Enable
TELNET IPV6 server :Enable
TELNET server port :23
Table 2-13 Description of the display telnet server status command output
Item Description
Function
The display telnet-client command displays the source parameters when the
device works as a Telnet client.
Format
display telnet-client
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
After setting source parameters of the Telnet client, you can run this command to
check the setting result. If you have not set telnet client-source, the default
source IP address is 0.0.0.0.
Example
# Display the source parameters for the device that works as a Telnet client.
<Huawei> display telnet-client
The source address of telnet client is 1.1.1.1
Item Description
The source address of telnet client is The source IP address of the Telnet
1.1.1.1 client is 1.1.1.1.
Function
The display ecc local-key-pair public command displays information about the
public key in the local Elliptic Curves Cryptography (ECC) key pair.
Format
display ecc local-key-pair public
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the display ecc local-key-pair public command to check information
about the public key in the local ECC key pair on a client and then copy the public
key to the server. The public key enables a server to authenticate users and
ensures the login of authorized users.
Pre-configuration Tasks
You must run the ecc local-key-pair create command to generate a local ECC
host key pair before using the command.
Example
# Display information about the public key in the local ECC key pair on a client.
<Huawei> display ecc local-key-pair public
=====================================================
Time of Key pair created:2016-10-19 11:50:20+00:00
Key name : Huawei_Host_ECC
Key modulus : 521
Key type : ECC encryption Key
Key fingerprint:
=====================================================
Key code:
0401CE1E 5EF3B843 CD917648 1D70EF8F CECE8518 5B32ED5F 529E9DC4 D16EDF1A
5F6E6389 10AAE2D4 74FD9DA7 F05AB123 9AF3EE64 9F0BAF99 A0CBF55B E319B2D1
8EDEBB01 7C63469B C62A2256 3EAEA0BD 486F9524 8559C7EF 24D969D1 11093BBF
27F770E7 03E28ABA BB357E5B 28EF04CC EA931C81 C7D7EBD8 5797B1CD 05D9B497
56D91126 E9
Table 2-15 Description of the display ecc local-key-pair public command output
Item Description
Time of Key pair created Time when the public key in the local ECC
key pair is generated, in the format of
YYYY-MM-DD HH:MM:SS.
Item Description
Host public key for PEM format PEM code of the public key in the local
code ECC key pair on a client.
Public key code for pasting into Public key in the local ECC key pair on a
OpenSSH authorized_keys file client that is used for OpenSSH
authorization. This information can be
used after being copied to the OpenSSH
authorized_keys file.
Related Topics
2.3.9 ecc local-key-pair create
Function
The display ecc peer-public-key command displays information about the Elliptic
Curves Cryptography (ECC) public key configured on the remote end.
Format
display ecc peer-public-key [ brief | name key-name ]
Parameters
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the display ecc peer-public-key command on a client to check
information about the public key configured on the remote end. The public key
enables a server to authenticate users and ensures the login of authorized users.
Example
# Display the information about the ECC public keys of 127.0.0.1.
<Huawei> display ecc peer-public-key
=====================================
Key name: 127.0.0.1
Encoding type: DER
=====================================
Key Code:
04013184 A3311697 89DF558B 7F67BF9D BD95DBD5 280D659F 0E29852C AEC2FFBA
1913AC2A 88247ADA 46BEBEBE 1829C0DA 3BABC8FC 8F6EAD28 2AE2C6A8 116BAA3A
540E6B00 34E033D8 9D84841B 0D33DAD8 DEDD1C09 2B70B3DB 5AF0FCB2 37DF1C82
C4C622A6 85B23698 195DA60F 06858ADB DD743937 B4A29C4C FB28B40B BCEEE036
1DE61BD2 24
# Display the brief information about all the ECC public keys.
<Huawei> display ecc peer-public-key brief
Bits Name
----------------------
521 127.0.0.1
384 10.54.131.203
Item Description
Related Topics
2.3.11 ecc peer-public-key
Function
The ecc local-key-pair create command generates a local Elliptic Curves
Cryptography (ECC) host key pair.
Format
ecc local-key-pair create
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
A local key pair is a prerequisite to a successful SSH login. Compared with the RSA
algorithm used by the rsa local-key-pair create command, the ECC algorithm
shortens the key length, accelerates the encryption, and improves the security. The
length of the server key pair and the host key pair can be 256 bits, 384 bits and
521 bits. By default, the length of the key pair is 521 bits.
Follow-up Procedure
Precautions
● The generated ECC host key pair is named in the format of wireless access
point name_Host_ECC, such as Huawei_Host_ECC.
● The ecc local-key-pair create and ecc local-key-pair destroy commands are
not saved in the configuration file. They only need to be run once and take
effect even after the wireless access point restarts.
● Do not delete the ECC key file from the wireless access point. If the ECC key
file is deleted, the ECC key pair cannot be restored after the wireless access
point is restarted.
Example
# Generate a local ECC host key pair.
<Huawei> system-view
[Huawei] ecc local-key-pair create
Info: The key name will be: Huawei_Host_ECC.
Info: The ECC host key named Huawei_Host_ECC already exists.
Warning: Do you want to replace it ? [Y/N]: Y
Info: The key modulus can be any one of the following : 256, 384, 521.
Info: If the key modulus is greater than 512, it may take a few minutes.
Please input the modulus [default=521]:521
Info: Generating keys...
Info: Succeeded in creating the ECC host keys.
# Enter an incorrect key length and re-enters the key length for a maximum
number of retry attempts.
<Huawei> system-view
[Huawei] ecc local-key-pair create
Info: The key name will be: Huawei_Host_ECC.
Info: The ECC host key named Huawei_Host_ECC already exists.
Warning: Do you want to replace it ?[Y/N]: Y
Info: The key modulus can be any one of the following : 256, 384, 521.
Info: If the key modulus is greater than 512, it may take a few minutes.
Please input the modulus [default=521]:123
Error: Invalid ECC key modulus.
Please input the modulus [default=521]:1024
Error: Invalid ECC key modulus.
Please input the modulus [default=521]:512
Error: Invalid ECC key modulus.
Please input the modulus [default=521]:2048
Error: Invalid ECC key modulus.
Please input the modulus [default=521]:4096
Error: Invalid ECC key modulus.
Error: The maximum number of retries has reached, and the command has already been canceled.
Related Topics
2.3.10 ecc local-key-pair destroy
2.3.7 display ecc local-key-pair public
Format
ecc local-key-pair destroy
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If you no longer need the local ECC key pairs, run the ecc local-key-pair destroy
command to delete them.
Configuration Impact
After the ecc local-key-pair destroy command is run, the ECC key files on the
master and slave main control boards are cleared. Exercise caution when running
the command.
Precautions
● The ecc local-key-pair create and ecc local-key-pair destroy commands are
not saved in the configuration file. They only need to be run once and take
effect even after the wireless access point restarts.
● Do not delete the ECC key file from the wireless access point. If the ECC key
file is deleted, the ECC key pair cannot be restored after the wireless access
point is restarted.
Example
# Delete the local ECC host key pair and server key pair.
<Huawei> system-view
[Huawei] ecc local-key-pair destroy
Related Topics
2.3.9 ecc local-key-pair create
Format
ecc peer-public-key key-name encoding-type { der | openssh | pem }
undo ecc peer-public-key key-name
Parameters
Parameter Description Value
key-name Specifies an ECC public key name. The value is a
string of 1 to 64
case-sensitive
characters, spaces
not supported.
encoding- Indicates the encoding type of an ECC -
type public key.
der Specifies DER as the encoding type of an -
ECC public key.
If DER is specified, data is encoded in
hexadecimal notation.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When ECC public key authentication is used, a client's public key must be specified
on the server for an SSH user. When the client logs in to the server, the server
performs authentication on the client based on the public key of the SSH user.
After an ECC public key is created and the ECC public key view is displayed, run
the public-key-code begin command, then you can manually copy the client's
public key to the server.
The client's public key is randomly generated by the client software.
If an ECC public key has been assigned to an SSH client, delete the binding
between the public key and the SSH client before deleting the ECC public key.
Otherwise, the undo dsa peer-public-key command will fail to delete the ECC
public key.
Follow-up Procedure
After copying the client's ECC public key to the server, run the following
commands to quit the ECC public key view:
1. Run the public-key-code end command to return to the ECC public key view.
2. Run the peer-public-key end command to quit the ECC public key view and
return to the system view.
Precautions
A maximum of 20 ECC public keys can be created.
Example
# Create an ECC public key and enter the ECC public key view.
<Huawei> system-view
[Huawei] ecc peer-public-key ecc-peer-key encoding-type pem
Info: Enter (ECC public key) view, return system view with (peer-public-key end).
[Huawei-ecc-public-key] public-key-code begin
Info: Enter (ECC key code) view, return the last view with (public-key-code end).
[Huawei-ecc-key-code] ---- BEGIN SSH2 PUBLIC KEY ----
[Huawei-ecc-key-code] AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACDBL5J4v3pqi5S
[Huawei-ecc-key-code] ALI9lvLw4cdvtpD2AC6sEJXg9GDCD5vGBnkXlKmnOy6d1TyrXx57ZPNnrSdqVkHC
[Huawei-ecc-key-code] sMBa63vSwg1XsVW2qZgx8H57+FJiTPY61b1Vfst9GUif1ymfpB7XrbdYZDownoh0
[Huawei-ecc-key-code] FZNadZtIf2CRc0OeiKXbCSPP25dfoT/DTcc=
[Huawei-ecc-key-code] ---- END SSH2 PUBLIC KEY ----
[Huawei-ecc-key-code] public-key-code end
[Huawei-ecc-public-key] peer-public-key end
Related Topics
2.3.15 public-key-code begin
2.3.16 public-key-code end
2.3.14 peer-public-key end
2.3.12 lock
Function
The lock command locks the current user interface to prevent unauthorized users
from operating the interface.
By default, the system does not automatically lock the current user interface.
Format
lock
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Lock the current user interface using this command to prevent other users from
operating the interface. The user interfaces consist of console ports, and Virtual
Type Terminals (VTYs).
After using the lock command, you are prompted to input the password twice. If
you input the correct password for twice, the user interface is locked.
Precautions
Example
# Lock the current user interface after logging in through the console port.
<Huawei> lock
Info: A plain text password is a string of 8 to 128 case-sensitive characters and must be a combination of at
least two of the follow
ing: uppercase letters A to Z, lowercase letters a to z, digits, and special characters (including spaces and
the following :`~!@#$%
^&*()-_=+|[{}];:'",<.>/?).
Enter Password:
Confirm Password:
Info: The terminal is locked.
# To log in to the system after the system is locked, you must press Enter. The
following information is displayed:
Enter Password:
Format
matched upper-view
undo matched upper-view
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
When you run the undo command in a view, which is not registered in the current
view, the system searches for the command in the upper view if the system is
allowed to search for the undo command in the upper view. If the system finds
the same undo command, the system executes this command in the upper view. If
the system does not find the same undo command in the upper view, the system
continues to search for this command in other upper views till the system view.
Running this command brings security risks. For example, if you run the undo
ospf command in the interface view, while this command is not registered in the
interface view, the system automatically searches for it in the upper view, that is,
the system view. In this manner, the system disables the OSPF feature globally.
The matched upper-view command is valid only for current login users who run
this command.
Example
# Allow the undo command to be searched for in the upper view.
<Huawei> system-view
[Huawei] matched upper-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] undo ftp client-source
Info: The source address of FTP client is 0.0.0.0.
[Huawei]
# Prohibit the undo command from being searched for in the upper view.
<Huawei> system-view
[Huawei] undo matched upper-view
[Huawei] interface gigabitethernet 0/0/1
[Huawei-GigabitEthernet0/0/1] undo ftp client-source
^
Error: Unrecognized command found at '^' position.
[Huawei-GigabitEthernet0/0/1]
Related Topics
2.1.8 quit
Function
The peer-public-key end command returns to the system view from the public
key view and saves the configured public keys.
Format
peer-public-key end
Parameters
None
Views
Public key view
Default Level
3: Management level
Usage Guidelines
You must save the public key generated on the remote host to the local host,
which ensures that the validity check on the remote end is successful. After editing
a public key in the public key view, you can run this command to return to the
system view.
Example
# Return to the system view from the public key view.
<Huawei> system-view
[Huawei] rsa peer-public-key rsakey001
[Huawei-rsa-public-key] public-key-code begin
[Huawei-rsa-key-code] 308188
[Huawei-rsa-key-code] 028180
[Huawei-rsa-key-code] B21315DD 859AD7E4 A6D0D9B8 121F23F0 006BB1BB
[Huawei-rsa-key-code] A443130F 7CDB95D8 4A4AE2F3 D94A73D7 36FDFD5F
[Huawei-rsa-key-code] 411B8B73 3CDD494A 236F35AB 9BBFE19A 7336150B
[Huawei-rsa-key-code] 40A35DE6 2C6A82D7 5C5F2C36 67FBC275 2DF7E4C5
[Huawei-rsa-key-code] 1987178B 8C364D57 DD0AA24A A0C2F87F 474C7931
[Huawei-rsa-key-code] A9F7E8FE E0D5A1B5 092F7112 660BD153 7FB7D5B2
[Huawei-rsa-key-code] 171896FB 1FFC38CD
[Huawei-rsa-key-code] 0203
[Huawei-rsa-key-code] 010001
[Huawei-rsa-key-code] public-key-code end
[Huawei-rsa-public-key] peer-public-key end
[Huawei]
Related Topics
2.3.15 public-key-code begin
2.3.16 public-key-code end
2.3.19 rsa peer-public-key
Format
public-key-code begin
Parameters
None
Views
Public key view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You must save the public key generated on the remote host to the local host,
which ensures that the validity check on the remote end is successful. Run the
public-key-code begin command to display the public key editing view, and enter
the key data. The key characters can contain spaces. You can press Enter to enter
data in another line.
Prerequisite
A key name has been specified by running the rsa peer-public-key command.
Precautions
● The public key must be a hexadecimal character string in the public key
encoding format, and generated by the client or server that supports SSH.
● The public keys displayed by running the display rsa local-key-pair public
command can be used as the key data to enter.
● You can successfully edit the public key in a public key pair by entering the
public key in the server key pair or client key pair. In SSH application, only the
public key in the client key pair can be entered as key data. If you enter the
public key in the server key pair, authentication fails during SSH login.
Example
# Display the public key editing view and enter the key data.
<Huawei> system-view
[Huawei] rsa peer-public-key rsakey001
[Huawei-rsa-public-key] public-key-code begin
[Huawei-rsa-key-code] 308188
[Huawei-rsa-key-code] 028180
[Huawei-rsa-key-code] B21315DD 859AD7E4 A6D0D9B8 121F23F0 006BB1BB
[Huawei-rsa-key-code] A443130F 7CDB95D8 4A4AE2F3 D94A73D7 36FDFD5F
[Huawei-rsa-key-code] 411B8B73 3CDD494A 236F35AB 9BBFE19A 7336150B
[Huawei-rsa-key-code] 40A35DE6 2C6A82D7 5C5F2C36 67FBC275 2DF7E4C5
[Huawei-rsa-key-code] 1987178B 8C364D57 DD0AA24A A0C2F87F 474C7931
[Huawei-rsa-key-code] A9F7E8FE E0D5A1B5 092F7112 660BD153 7FB7D5B2
[Huawei-rsa-key-code] 171896FB 1FFC38CD
[Huawei-rsa-key-code] 0203
[Huawei-rsa-key-code] 010001
[Huawei-rsa-key-code] public-key-code end
[Huawei-rsa-public-key] peer-public-key end
[Huawei]
Related Topics
2.3.1 display rsa local-key-pair public
2.3.14 peer-public-key end
2.3.16 public-key-code end
2.3.19 rsa peer-public-key
Format
public-key-code end
Parameters
None
Views
Public key editing view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
After this command is run, the process of editing the public key ends. Before
saving the public key, the system will check the validity of the key.
● If there are illegal characters in the public key character string configured by
the user, the system will display a relevant error prompt. The public key
previously configured by the user is discarded, thus the configuration fails.
● If the public key configured is valid, it is saved in the public key chain table of
the client.
Precautions
● Generally, in the public key view, only the public-key-code end command can
be used to exit. Thus, in this instance the quit command cannot be used.
● If the legal key coding is not input, the key cannot be generated after the
public-key-code end command is used. The system prompts that generating
the incorrect key fails.
● If the key is deleted in another window, the system prompts that the key does
not exist and returns to the system view directly after you run the public-key-
code end command.
Example
# Exit from the RSA public key editing view and saves the RSA key configuration.
<Huawei> system-view
[Huawei] rsa peer-public-key rsakey001
[Huawei-rsa-public-key] public-key-code begin
[Huawei-rsa-key-code] 308188
[Huawei-rsa-key-code] 028180
[Huawei-rsa-key-code] B21315DD 859AD7E4 A6D0D9B8 121F23F0 006BB1BB
[Huawei-rsa-key-code] A443130F 7CDB95D8 4A4AE2F3 D94A73D7 36FDFD5F
[Huawei-rsa-key-code] 411B8B73 3CDD494A 236F35AB 9BBFE19A 7336150B
[Huawei-rsa-key-code] 40A35DE6 2C6A82D7 5C5F2C36 67FBC275 2DF7E4C5
[Huawei-rsa-key-code] 1987178B 8C364D57 DD0AA24A A0C2F87F 474C7931
[Huawei-rsa-key-code] A9F7E8FE E0D5A1B5 092F7112 660BD153 7FB7D5B2
[Huawei-rsa-key-code] 171896FB 1FFC38CD
[Huawei-rsa-key-code] 0203
[Huawei-rsa-key-code] 010001
[Huawei-rsa-key-code] public-key-code end
[Huawei-rsa-public-key] peer-public-key end
[Huawei]
Related Topics
2.3.15 public-key-code begin
2.3.19 rsa peer-public-key
2.3.14 peer-public-key end
Function
The rsa local-key-pair create command generates the local RSA host and server
key pairs.
By default, the local RSA host and server key pairs are not configured.
Format
rsa local-key-pair create
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To implement secure data exchange between the server and client, run this
command to generate a local key pair.
Precautions
If the RSA key pair exists, the system prompts you to confirm whether to replace
the original key pair.
After you run this command, the system prompts you to enter the number of bits
in the host key. The difference between the bits in the server and host key pairs
must be at least 128 bits. For a server or host key pair, the minimum length is 512
bits, the maximum length is 2048 bits, and the default length is 2048 bits.
NOTE
The RSA key pair whose length is less than 1024 digits is insecure and therefore not
recommended to use.
To successfully log in to the SSH server, a local RSA key pair must be configured
and generated. Before performing other SSH configurations, you must use the rsa
local-key-pair create command to generate a local key pair.
After you run this command, the generated key pair is saved in the device and will
not be lost after the device restarts.
Example
# Generate the local RSA host and server key pairs.
<Huawei> system-view
[Huawei] rsa local-key-pair create
The key name will be: Host
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Input the bits in the modulus[default = 2048]:2048
Generating keys...
......................++++++++
........................................................++++++++
........+++++++++
.....+++++++++
Related Topics
2.3.18 rsa local-key-pair destroy
Format
rsa local-key-pair destroy
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To delete the local key pair, run rsa local-key-pair destroy command. If the host
key pair and the service key pair of an SSH server are deleted, run the rsa local-
key-pair create command to create the new host key pair and service key pair for
the SSH server.
After you run this command, verify that all local RSA keys are deleted. This
command is not saved in a configuration file.
Prerequisite
The local RSA keys that can be deleted exist.
Example
# Delete all RSA server keys.
<Huawei> system-view
[Huawei] rsa local-key-pair destroy
The name for the keys which will be destroyed is Host.
Confirm to destroy these keys? (y/n)[n]:y
Related Topics
2.3.17 rsa local-key-pair create
Format
rsa peer-public-key key-name [ encoding-type { der | openssh | pem } ]
undo rsa peer-public-key key-name
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When you use an RSA public key for authentication, you must specify the public
key of the corresponding client for an SSH user on the server. When the client logs
in to the server, the server uses the specified public key to authenticate the client.
You can also save the public key generated on the server to the client. Then the
client can be successfully authenticated by the server when it logs in to the server
for the first time.
Huawei data communications devices support only the DER format for RSA keys. If
you use an RSA key in non-DER format, use a third-party tool to convert the key
into a key in DER format.
Because a third-party tool is not released with Huawei system software, RSA
usability is unsatisfactory. In addition to DER, RSA keys need to support the
privacy-enhanced mail (PEM) and OpenSSH formats to improve RSA usability.
Third-party software, such as PuTTY, OpenSSH, and OpenSSL, can be used to
generate RSA keys in different formats. The details are as follows:
● The PuTTY generates RSA keys in PEM format.
● The OpenSSH generates RSA keys in OpenSSH format.
● The OpenSSL generates RSA keys in DER format.
OpenSSL is an open source software. You can download related documents at
http://www.openssl.org/.
After you configure an encoding format for an RSA public key, Huawei data
communications device automatically generates an RSA public key in the
configured encoding format and enters the RSA public key view. Then you can run
the public-key-code begin command and manually copy the RSA public key
generated on the peer device to the local device.
Prerequisite
The rsa public key in hexadecimal notation on the remote host has been obtained
and recorded.
Follow-up Procedure
After you copy the RSA public key generated on the peer device to the local
device, perform the following operations to exit the RSA public key view:
1. Run the public-key-code end command to return to the RSA public key view.
2. Run the peer-public-key end command to exit the RSA public key view and
return to the system view.
Precautions
If an RSA public key has assigned to an SSH client, release the binding relationship
between the public key and the SSH client. If you do not release the binding
relationship between them, the undo rsa peer-public-key command will fail to
delete the RSA public key.
Example
# Display the rsa public key view.
<Huawei> system-view
[Huawei] rsa peer-public-key rsakey001
[Huawei-rsa-public-key]
# Configure an encoding format for an RSA public key and enter the RSA public
key view.
<Huawei> system-view
[Huawei] rsa peer-public-key RsaKey001 encoding-type openssh
[Huawei-rsa-public-key]
Related Topics
2.3.2 display rsa peer-public-key
2.3.15 public-key-code begin
2.3.20 send
Function
The send command sends messages to all user interfaces.
Format
send { all | ui-number | ui-type ui-number1 }
Parameters
Parameter Description Value
all Specifies that the system sends -
messages to all user interfaces.
ui-number Specifies the absolute number of the The minimum value is 0. The
user interface. maximum value is smaller by
1 than the number of the
user interfaces that the
system supports.
ui-type Specifies the type of the user -
interface.
ui-number1 Specifies the relative number of the -
user interface.
Views
User view
Default Level
1: Monitoring level
Usage Guidelines
After you run the send command, the system prompts you to enter the message
to send. After you confirm to send this message, the user who logs in to the
system from the specified user interface can receive this message.
Example
# Send a message to the user interface VTY 0.
<Huawei> send vty 0
Enter message, end with CTRL+Z or Enter; abort with CTRL+C:Hello, good morning!^Z
Warning: Send the message? [Y/N]: y
# After you confirm to send the message, the user who logs in to the Huawei
from VTY 0 can receive this message.
<Huawei>
Info: Receive a message from vty2:Hello, good morning!
Format
ssh client servername assign { rsa-key | ecc-key } keyname
undo ssh client servername assign { rsa-key | ecc-key }
Parameters
Parameter Description Value
servername Specifies the host name or IP The value is a string of 1 to
address of the SSH server. 64 characters without spaces.
rsa-key Specifies the RSA public key. -
ecc-key Specifies the ECC public key. -
keyname Specifies the SSH server public key The value is a string of 1 to
name that has been configured on 64 case-insensitive characters
the SSH client. without spaces.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the SSH client connects to the SSH server for the first time and the first
authentication is not enabled on the SSH client using the ssh client first-time
enable command, the SSH client rejects the access from unauthorized SSH
servers. You need to specify the host public key of the SSH server and the
mapping between the key and SSH server on the SSH client. After that, the client
will determine whether the server is reliable using the correct public key based on
the mapping.
Precautions
The name of the RSA or ECC public key to be assigned to the SSH server must be
the same as that configured on the SSH client. This public key must have been
configured on the SSH server using the rsa peer-public-key or ecc peer-public-
key command. If either of the preceding conditions is not met, RSA or ECC public
key authentication of the SSH server fails on the SSH client.
Example
# Assign the RSA public key to the SSH server.
<Huawei> system-view
[Huawei] ssh client 10.164.39.120 assign rsa-key sshrsakey01
Related Topics
2.3.22 ssh client first-time enable
Format
ssh client first-time enable
undo ssh client first-time enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When the SSH client accesses the SSH server for the first time and the public key
of the SSH server is not configured on the SSH client, you can enable the first
authentication for the SSH client to access the SSH server and save the public key
on the SSH client. When the SSH client accesses the SSH server next time, the
saved public key is used to authenticate the SSH server.
Precautions
You can run the ssh client assign command to pre-assign the RSA public key to
the SSH server. In this manner, you can log in to the SSH server successfully at the
first time.
Example
# Enable the first authentication on the SSH client.
<Huawei> system-view
[Huawei] ssh client first-time enable
Related Topics
2.3.21 ssh client assign
Function
The ssh client key-exchange command configures a key exchange algorithm list
on an SSH client.
The undo ssh client key-exchange command restores the default configuration.
Format
ssh client key-exchange { dh_group_exchange_sha1 | dh_group14_sha1 |
dh_group1_sha1 } *
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The client and server negotiate the key exchange algorithm used for packet
transmission. You can run the ssh client key-exchange command to configure a
key exchange algorithm list on the SSH client. The SSH server compares the
configured key exchange algorithm list with the counterpart sent by the client and
then selects the first matched key exchange algorithm for packet transmission. If
the key exchange algorithm list sent by the client does not match any algorithm in
the key exchange algorithm list configured on the server, the negotiation fails.
Precautions
The security levels of key exchange algorithms are as follows, from high to low:
dh_group_exchange_sha1, dh_group14_sha1, and dh_group1_sha1. The
dh_group_exchange_sha1 algorithm is recommended.
Example
# Configure key exchange algorithm lists dh_group_exchange_sha1 and
dh_group14_sha1 on the SSH client.
<Huawei> system-view
[Huawei] ssh client key-exchange dh_group_exchange_sha1 dh_group14_sha1
Related Topics
2.3.28 ssh server key-exchange
The undo ssh client secure-algorithms hmac command restores the default
HMAC algorithm list of an SSH client.
Format
ssh client secure-algorithms hmac { md5 | md5_96 | sha1 | sha1_96 | sha2_256 |
sha2_256_96 } *
Parameters
Parameter Description Value
md5 Specifies the HMAC MD5 algorithm. -
md5_96 Specifies the HMAC MD5_96 algorithm. -
sha1 Specifies the HMAC SHA1 algorithm. -
sha1_96 Specifies the HMAC SHA1_96 algorithm. -
sha2_256 Specifies the HMAC SHA2_256 algorithm. -
sha2_256_96 Specifies the HMAC SHA2_256_96 algorithm. -
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
An SSH server and a client need to negotiate an HMAC algorithm for the packets
exchanged between them. You can run the ssh client secure-algorithms hmac
command to configure an HMAC algorithm list for the SSH client. After the list is
configured, the server matches the list of a client against the local list after
receiving a packet from the client and selects the first HMAC algorithm that
matches the local list. If no HMAC algorithms in the list of the client match the
local list, the negotiation fails.
Precautions
sha2_256_96, sha1, sha1_96, md5, and md5_96 provide weak security. Therefore,
they are not recommended in the HMAC algorithm list.
Example
# Configure the HMAC SHA2_256 algorithm for an SSH client.
<Huawei> system-view
[Huawei] ssh client secure-algorithms hmac sha2_256
Related Topics
2.3.32 ssh server secure-algorithms hmac
Format
ssh client secure-algorithms cipher { 3des | aes128 | aes256_cbc | aes128_ctr |
aes256_ctr } *
undo ssh client secure-algorithms cipher
Parameters
Parameter Description Value
3des Specifies the CBC 3DES encryption algorithm. -
aes128 Specifies the CBC AES128 encryption algorithm. -
aes256_cbc Specifies the CBC AES256 encryption algorithm. -
aes128_ctr Specifies the CTR AES128 encryption algorithm. -
aes256_ctr Specifies the CTR AES256 encryption algorithm. -
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
An SSH server and a client need to negotiate an encryption algorithm for the
packets exchanged between them. You can run the ssh client secure-algorithms
cipher command to configure an encryption algorithm list for the SSH client. After
the list is configured, the server matches the encryption algorithm list of a client
against the local list after receiving a packet from the client and selects the first
encryption algorithm that matches the local list. If no encryption algorithms in the
list of the client match the local list, the negotiation fails.
Precautions
Example
# Configure CTR encryption algorithms for an SSH client.
<Huawei> system-view
[Huawei] ssh client secure-algorithms cipher aes128_ctr aes256_ctr
Related Topics
2.3.33 ssh server secure-algorithms cipher
Function
The ssh server authentication-retries command sets the maximum number of
authentication retries for an SSH connection.
Format
ssh server authentication-retries times
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run this command to configure the maximum number of authentication
retries for an SSH connection, which prevents server overload due to malicious
access.
Precautions
The configured number of retries takes effect upon the next login.
The total number of RSA and password authentication retries on the SSH client
cannot exceed the maximum number that is set using this command.
Example
# Set the maximum number of times for retrying login authentication to 4.
<Huawei> system-view
[Huawei] ssh server authentication-retries 4
Related Topics
2.3.3 display ssh server
Function
The ssh server compatible-ssh1x enable command enables the SSH server's
compatibility with earlier versions.
The undo ssh server compatible-ssh1x enable command disables the SSH
server's compatibility with earlier versions.
Format
ssh server compatible-ssh1x enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
An SSH server needs to be configured with backward compatibility for the version
negotiation between the client and the server. When a TCP connection is set up
between the client and server, the client negotiates with the server on the version
of which the client and the server can work together.
The server compares the version of its own with that sent by the client, and
determines whether it can work with the client.
● If the protocol version on the client is earlier than 1.3 or later than 2.0,
version negotiation fails and the server disconnects from the client.
● If the protocol version on the client is equal to or later than 1.3 and earlier
than 1.99, the SSH1.5 server module is invoked and the SSH1.X process is
performed when the SSH1.X-compatible mode is configured. When the
SSH1.X-incompatible mode is configured, version negotiation fails and the
server disconnects from the client.
● If the protocol version on the client is 1.99 or 2.0, the SSH2.0 server module is
invoked and the SSH2.0 process is performed.
Precautions
The configuration takes effect upon the next login.
NOTE
SSH2.0 has an extended structure and supports more authentication modes and key
exchange methods than SSH1.X. SSH 2.0 can eliminate the security risks that SSH 1.X has.
SSH 2.0 is more secure and therefore is recommended.
Example
# Enable the SSH server's compatibility with earlier versions.
<Huawei> system-view
[Huawei] ssh server compatible-ssh1x enable
Related Topics
2.3.3 display ssh server
Format
ssh server key-exchange { dh_group_exchange_sha1 | dh_group14_sha1 |
dh_group1_sha1 } *
undo ssh server key-exchange
Parameters
Parameter Description Value
dh_group_exchange_sha1 Specifies that the Diffie-hellman-group- -
exchange-sha1 algorithm is contained in the
key exchange algorithm list configured on
the SSH server.
dh_group14_sha1 Specifies that the Diffie-hellman-group14- -
sha1 algorithm is contained in the key
exchange algorithm list configured on the
SSH server.
dh_group1_sha1 Specifies that the Diffie-hellman-group1-sha1 -
algorithm is contained in the key exchange
algorithm list configured on the SSH server.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
An SSH server and a client need to negotiate a key exchange algorithm for the
packets exchanged between them. You can run the ssh server key-exchange
command to configure a key exchange algorithm list for the SSH server. After the
list is configured, the server matches the key exchange algorithm list of a client
against the local list after receiving a packet from the client and selects the first
key exchange algorithm that matches the local list. If no key exchange algorithms
in the list of the client match the local list, the negotiation fails.
Precautions
The security levels of key exchange algorithms are as follows, from high to low:
dh_group_exchange_sha1, dh_group14_sha1, and dh_group1_sha1. The
dh_group_exchange_sha1 algorithm is recommended.
Example
# Configure key exchange algorithm lists dh_group_exchange_sha1 and
dh_group14_sha1 on the SSH server.
<Huawei> system-view
[Huawei] ssh server key-exchange dh_group_exchange_sha1 dh_group14_sha1
Related Topics
2.3.23 ssh client key-exchange
Function
The ssh server permit interface command specifies physical interfaces on the
SSH server to which clients can connect.
The undo ssh server permit interface command restores the default physical
interfaces on the SSH server to which clients can connect.
By default, clients can connect to all the physical interfaces on the SSH server.
Format
ssh server permit interface { interface-type interface-number } &<1-5>
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
● By default, clients can connect to all the physical interfaces on the SSH server.
Once a physical interface is specified using the ssh server permit interface
command, a client cannot connect to the SSH server using other physical
interfaces (excluding the MEth interface).
● This command can be used only on a Layer 2 physical interface but not on a
Layer 3 physical interface, logical interface, or a non-Ethernet interface.
Example
# Specify physical interfaces on the SSH server to which clients can connect.
<Huawei> system-view
[Huawei] ssh server permit interface gigabitethernet 0/0/1
Info: Succeeded in setting ssh permit interface.
# Restore the default physical interfaces on the SSH server to which clients can
connect.
<Huawei> system-view
[Huawei] undo ssh server permit interface
Function
The ssh server port command changes the listening port number of the SSH
server.
The undo ssh server port command restores the default listening port number of
the SSH server.
Format
ssh server port port-number
Parameters
Parameter Description Value
port-number Specifies the listening port The value is 22 or an integer
number of the SSH server. ranging from 1025 to 55535.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Configure the listening port number of the SSH server to prevent from malicious
access to the SSH service standard port and ensure security.
Precautions
The SSH client can log in successfully with no port specified only when the server
is listening on port 22. If the server is listening on another port, the port number
must be specified upon login.
Before changing the current port number, disconnect all devices from the port.
After the port number is changed, the server starts to listen on the new port.
Example
# Set the listening port number of the SSH server is 1025.
<Huawei> system-view
[Huawei] ssh server port 1025
Related Topics
2.3.3 display ssh server
2.4.50 sftp
2.3.37 stelnet
Function
The ssh server rekey-interval command sets the interval for updating the SSH
server key pair.
The undo ssh server rekey-interval command restores the default interval for
updating the SSH server key pair.
The default interval for updating the SSH server key pair is 0, indicating that the
key pair is never updated.
Format
ssh server rekey-interval hours
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the server key pair is not updated for a long time, the key is easy to decrypt and
the server is insecure. After the interval for updating the SSH server key pair is set
using this command, the system will automatically update the key pair at
intervals.
Precautions
If the client is connected to the server, the server public key on the client is not
updated immediately. This key is updated only when the client is reconnected to
the server.
Example
# Set the interval for updating the SSH server key pair to 2 hours.
<Huawei> system-view
[Huawei] ssh server rekey-interval 2
Related Topics
2.3.3 display ssh server
Format
ssh server secure-algorithms hmac { md5 | md5_96 | sha1 | sha1_96 | sha2_256
| sha2_256_96 } *
undo ssh server secure-algorithms hmac
Parameters
Parameter Description Value
md5 Specifies the HMAC MD5 algorithm. -
md5_96 Specifies the HMAC MD5_96 algorithm. -
sha1 Specifies the HMAC SHA1 algorithm. -
sha1_96 Specifies the HMAC SHA1_96 algorithm. -
sha2_256 Specifies the HMAC SHA2_256 algorithm. -
sha2_256_96 Specifies the HMAC SHA2_256_96 algorithm. -
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
An SSH server and a client need to negotiate an HMAC algorithm for the packets
exchanged between them. You can run the ssh server secure-algorithms hmac
command to configure an HMAC algorithm list for the SSH server. After the list is
configured, the server matches the list of a client against the local list after
receiving a packet from the client and selects the first HMAC algorithm that
matches the local list. If no HMAC algorithms in the list of the client match the
local list, the negotiation fails.
Precautions
sha2_256_96, sha1, sha1_96, md5, and md5_96 provide weak security. Therefore,
they are not recommended in the HMAC algorithm list.
Example
# Configure the HMAC SHA2_256 algorithm for an SSH server.
<Huawei> system-view
[Huawei] ssh server secure-algorithms hmac sha2_256
Related Topics
2.3.24 ssh client secure-algorithms hmac
Function
The ssh server cipher command configures an encryption algorithm list for an
SSH server.
The undo ssh server cipher command restores the default encryption algorithm
list of an SSH server.
Format
ssh server secure-algorithms cipher { 3des | aes128 | aes256_cbc | aes128_ctr |
aes256_ctr } *
Parameters
Parameter Description Value
3des Specifies the CBC 3DES encryption algorithm. -
aes128 Specifies the CBC AES128 encryption algorithm. -
aes256_cbc Specifies the CBC AES256 encryption algorithm. -
aes128_ctr Specifies the CTR AES128 encryption algorithm. -
aes256_ctr Specifies the CTR AES256 encryption algorithm. -
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
An SSH server and a client need to negotiate an encryption algorithm for the
packets exchanged between them. You can run the ssh server secure-algorithms
cipher command to configure an encryption algorithm list for the SSH server.
After the list is configured, the server matches the encryption algorithm list of a
client against the local list after receiving a packet from the client and selects the
first encryption algorithm that matches the local list. If no encryption algorithms
in the list of the client match the local list, the negotiation fails.
Precautions
Example
# Configure CTR encryption algorithms for an SSH server.
<Huawei> system-view
[Huawei] ssh server secure-algorithms cipher aes256_ctr aes128_ctr
Related Topics
2.3.25 ssh client secure-algorithms cipher
Function
The ssh server timeout command sets the timeout interval for SSH connection
authentication.
The undo ssh server timeout restores the default timeout interval for SSH
connection authentication.
Format
ssh server timeout seconds
Parameters
Parameter Description Value
seconds Specifies the timeout interval for The value is an integer ranging
SSH connection authentication. from 60 to 120, in seconds.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If you have not logged in successfully at the timeout interval for SSH connection
authentication, the current connection is terminated to ensure security. You can
run the display ssh server command to query the current timeout interval.
Precautions
The setting for the timeout interval takes effect upon next login.
If a very short timeout period is configured for SSH connection authentication,
user login may fail due to a connection timeout. Using the default timeout period
is recommended.
Example
# Set the SSH connection authentication timeout interval to 90 seconds.
<Huawei> system-view
[Huawei] ssh server timeout 90
Related Topics
2.3.3 display ssh server
Format
ssh user user-name assign { rsa-key | ecc-key } key-name
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When an SSH client needs to log in to the SSH server in RSA mode, run this
command to assign a public key to the client. If the client has been assigned keys,
the latest assigned key takes effect.
Precautions
The newly configured public key takes effect upon next login.
When an authentication mode is configured for an SSH user but user-name of the
user does not exist, run the display users command to check the user name and
set user-name to the displayed user name.
Example
# Assign key1 to a user named John.
<Huawei> system-view
[Huawei] ssh user john assign rsa-key key1
Related Topics
2.3.4 display ssh user-information
Format
ssh user user-name authentication-type { password | rsa | password-rsa | ecc |
password-ecc | all }
undo ssh user user-name authentication-type
Parameters
Parameter Description Value
user-name Specifies the SSH user name. The value is a string of
1 to 64 case-insensitive
characters without
spaces.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
A new SSH user cannot log in unless being configured with an authentication
mode. The newly configured authentication mode takes effect on the next login.
When an authentication mode is configured for an SSH user but user-name of the
user does not exist, run the display users command to check the user name and
set user-name to the displayed user name.
NOTE
To improve security, it is recommended that you use ECC as the authentication algorithm to
log in to the SSH server.
Precautions
A new SSH user cannot log in to the SSH server unless being configured with an
authentication mode. The newly configured authentication mode takes effect
upon next login.
Only one login user can be configured on the AP. Therefore, user-name specifies
only the current login user.
Example
# Configure the password authentication mode for an SSH user John.
<Huawei> system-view
[Huawei] ssh user john authentication-type password
Related Topics
2.3.4 display ssh user-information
2.3.37 stelnet
Function
The stelnet command enables you to use the STelnet protocol to log in to another
device from the current device.
Format
# IPv4 address
stelnet [ -a source-address ] host-ip [ port-number ] [ [ prefer_kex prefer_key-
exchange ] | [ prefer_ctos_cipher prefer_ctos_cipher ] | [ prefer_stoc_cipher
prefer_stoc_cipher ] | [ prefer_ctos_hmac prefer_ctos_hmac ] | [ prefer_stoc_hmac
prefer_stoc_hmac ] ] * [ -ki aliveinterval [ -kc alivecountmax ] ]
# IPv6 address
stelnet ipv6 [ -a source-address ] host-ipv6 [ -oi interface-type interface-
number ] [ port-number ] [ [ prefer_kex prefer_key-exchange ] |
[ prefer_ctos_cipher prefer_ctos_cipher ] | [ prefer_stoc_cipher
prefer_stoc_cipher ] | [ prefer_ctos_hmac prefer_ctos_hmac ] | [ prefer_stoc_hmac
prefer_stoc_hmac ] ] * [ -ki aliveinterval [ -kc alivecountmax ] ]
Parameters
Parameter Description Value
-a source-address Specifies the IPv4: The value is in dotted decimal
STelnet source IP notation.
address.
IPv6: The value is a 32-digit
hexadecimal number, in the
X:X:X:X:X:X:X:X format.
user-identity-key Specifies the public The public key algorithm includes rsa
key algorithm for and ecc.
the client
authentication. NOTE
To improve security, it is not
recommended that you use RSA as the
authentication algorithm.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Logins through Telnet bring security risks because Telnet does not provide any
authentication mechanism and data is transmitted using TCP in plain text.
Compared with Telnet, SSH guarantees secure file transfer on a traditional
insecure network by authenticating clients and encrypting data in bidirectional
mode. The SSH protocol supports STelnet. You can run this command to use
STelnet to log in to another device from the current device.
STelnet is a secure Telnet service. SSH users can use the STelnet service in the
same way as the Telnet service.
When a fault occurs in the connection between the client and server, the client
needs to detect the fault in real time and proactively release the connection. You
need to set the interval for sending keepalive packets and the maximum number
of times on the client that logs in to the server through STelnet.
● Interval for sending keepalive packets: If a client does not receive any packet
within the specified interval, the client sends a keepalive packet to the server.
● Maximum number of times the server has no response: If the number of
times that the server does not respond exceeds the specified value, the client
proactively releases the connection.
Precautions
● The SSH client can log in to the SSH server with no port specified only when
the server is listening on port 22. If the server is listening on another port, the
port number must be specified upon login.
● To improve data transmission security, AES128 or a more secure algorithm is
recommended.
Example
# Set keepalive parameters when the client logs in to the server through STelnet.
<Huawei> system-view
[Huawei] stelnet 10.164.39.209 -ki 10 -kc 4
Related Topics
2.3.30 ssh server port
2.3.38 telnet
Function
The telnet command enables you to use the Telnet protocol to log in to another
device from the current device.
Format
# Log in to another device through Telnet based on IPv4.
Parameters
Parameter Description Value
-a source-ip- By specifying a source IP address, The value is in dotted
address you can use this address to decimal notation.
communicate with the server for
high network security. If no source
address is specified, the system will
use the IP address of the local
outbound interface to initiate a
Telnet connection.
Views
User view
Default Level
0: Visit level
Usage Guidelines
Usage Scenario
If one or multiple devices on the network need to be configured and managed,
you do not need to connect each device to your terminal for local maintenance. If
you have learned the IP address of the device, you can run this command to log in
to the device from your terminal for remote device configuration. By doing this,
you can use one terminal to maintain multiple devices on the network.
You can press Ctrl_K to terminate an active connection between the local and
remote devices.
Precautions
● Before you run the telnet command to connect to the Telnet server, the
Telnet client and server must be able to communicate through Layer 3 and
the Telnet service must be enabled on the Telnet server.
● Logins through Telnet bring security risks because Telnet does not provide any
authentication mechanism and data is transmitted using TCP in plain text.
The STelnet mode is recommended for the network that has the high security
requirement.
Example
# Connect to a remote device through Telnet.
Function
The telnet client-source command specifies the source IP address and interface
for a Telnet client.
Format
telnet client-source { -a source-ip-address | -i interface-type interface-number }
Parameters
Parameter Description Value
-a source-ip-address Specifies the IPv4 address of the local -
wireless access point.
-i interface-type interface- Specifies the outbound interface of the -
number local wireless access point.
Views
System view
Default Level
3: Management level
Usage Guidelines
If the source IP address and interface are not specified in the telnet command,
use the default settings specified by telnet client-source. If the source IP address
and interface are specified in the telnet command, use the specified settings.
Check the current Telnet connection on the server. The IP address displayed is the
specified source IP address or the primary IP address of the specified interface.
Example
# Set the source IP address of the Telnet client to 1.1.1.1.
<Huawei> system-view
[Huawei] telnet client-source -a 1.1.1.1
Related Topics
2.3.38 telnet
Format
telnet server permit interface { interface-type interface-number } &<1-5>
undo telnet server permit interface
Parameters
Parameter Description Value
interface-type interface-type: specifies the interface type. -
interface-number
interface-number: specifies the interface number.
interface-number and interface-type specify an
interface.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent a client from connecting to the Telnet server through an unauthorized
physical interface or attacking the Telnet server by sending a large number of
Telnet packets, you can run the telnet server permit interface command to
specify physical interfaces on the Telnet server to which the client can connect.
Precautions
● By default, clients can connect to all the physical interfaces on the Telnet
server. Once a physical interface is specified using the telnet server permit
interface command, a client cannot connect to the Telnet server using other
physical interfaces.
● This command can be used only on a Layer 2 physical interface but not on a
Layer 3 physical interface, logical interface, or a non-Ethernet interface.
Example
# Specify physical interfaces on the Telnet server to which clients can connect.
<Huawei> system-view
[Huawei] telnet server permit interface gigabitethernet 0/0/0
Info: Succeeded in setting telnet permit interface.
# Restore the default physical interfaces on the Telnet server to which clients can
connect.
<Huawei> system-view
[Huawei] undo telnet server permit interface
2.4.1 ascii
Function
The ascii command sets the file transfer mode to ASCII on an FTP client.
Format
ascii
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Files can be transferred in ASCII or binary modes.
The ASCII mode is used to transfer plain text files, and the binary mode is used to
transfer application files such as system software (files with name
extension .cc, .bin, and .pat.), images, video files, compressed files, and database
files.
Example
# Set the file transfer mode to ASCII.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] ascii
200 Type set to A.
Related Topics
2.4.2 binary
2.4.2 binary
Function
The binary command sets the file transmission mode to binary on an FTP client.
The default file transfer mode is ASCII.
Format
binary
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Files can be transferred in ASCII or binary modes.
The ASCII mode is used to transfer plain text files, and the binary mode is used to
transfer application files such as system software (files with name
extension .cc, .bin, and .pat.), images, video files, compressed files, and database
files.
Example
# Set the file transmission mode to binary.
Related Topics
2.4.1 ascii
2.4.3 bye
Function
The bye command terminates the connection with the remote FTP server and
enters the user view.
Format
bye
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
This command is equivalent to the quit command.
You can use the close and disconnect commands to terminate the connection
with the remote FTP server and retain the FTP client view.
Example
# Terminate the connection with the remote FTP server and enter the user view.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] bye
221 server closing.
<Huawei>
Related Topics
2.4.9 close
2.4.17 disconnect
2.1.8 quit
Format
cd remote-directory
Parameters
Parameter Description Value
remote- Specifies the name of a The value is a string of 1 to 64
directory working directory on the FTP case-insensitive characters
server. without spaces.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
The FTP server authorizes users to access files in certain directories and their
subdirectories.
NOTE
If the new working directory of the FTP server is on the same file drive as the current
working directory, you do not need to specify the name of the file drive in the command
but only need to specify the differences between two working directories. For example:
● If the current working directory is flash:/ and you want to change it to flash:/temp/
subtemp, run the cd temp/subtemp command.
● If the current working directory is flash:/temp and you want to change it to flash:/temp/
subtemp, run the cd subtemp command.
● If the current working directory is flash:/temp/subtemp and you want to change it to
flash:/temp, run the cd /temp command.
● If the current working directory is flash:/temp and you want to change it to flash:/, run
the cd / command.
Example
# Change the working directory to d:/temp.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] cd d:/temp
250 "D:/temp" is current directory.
Related Topics
2.4.15 dir/ls (FTP client view)
2.4.39 pwd (FTP client view)
Function
The cd command changes the working directory of the SFTP server.
Format
cd [ remote-directory ]
Parameters
Parameter Description Value
remote- Specifies the name of a The value is a string of 1 to 64
directory directory on the SFTP server. case-insensitive characters
without spaces.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
● The SFTP server authorizes users to access files in certain directories and their
subdirectories.
● The specified working directory must exist on the SFTP server. If the remote-
directory parameter is not included in the cd command, only the current
working directory of an SSH user is displayed as the command output.
Example
# Change the current working directory of the SFTP server to /bill.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> cd bill
Current directory is:
/bill
Related Topics
2.4.16 dir/ls (SFTP client view)
Format
cd directory
Parameters
Parameter Description Value
directory Specifies the The value is a string of 1 to 64 case-sensitive
current working characters without spaces in the [ drive ] path
directory of a format.
user.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
You are advised to add : and / between the
storage device name and directory. Characters ~,
*, /, \, :, ', " cannot be used in the directory name.
For example, a directory name is flash:/selftest/
test/.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
● The directory specified in the cd command must exist; otherwise, the error
messages will be displayed.
You can perform the following operations to rectify faults:
a. Run the pwd command to view the current working directory.
b. Run the dir command to view the current working directory and verify
that the directory specified in the cd command exists.
Example
# Change the current working directory from flash:/temp to flash:.
<Huawei> pwd
flash:/temp
<Huawei> cd flash:
<Huawei> pwd
flash:
Related Topics
2.4.41 pwd (user view)
Function
The cdup command changes the current working directory of an SSH user to its
parent directory.
Format
cdup
Parameters
None
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the cdup command to change the current working directory to its
parent directory.
Precautions
If the current working directory is the SFTP authorization directory, the command
cannot change the current working directory.
Example
# Change the current working directory to its parent directory.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> cd dhcp
Current directory is:
/dhcp
sftp-client> cdup
Current directory is:
/
sftp-client> cdup
Error: Failed to change the current directory.
sftp-client>
Format
cdup
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To exit from the current directory and return to the upper-level directory, run the
cdup command.
Precautions
The accessible directories for an FTP user are restricted by the authorized directory
configured for the user.
Example
# Exit from the current directory and return to the upper-level directory.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] cd security
250 "D:\security" is current directory.
[Huawei-ftp] cdup
250 "D:\" is current directory.
Related Topics
2.4.15 dir/ls (FTP client view)
2.4.39 pwd (FTP client view)
2.4.9 close
Function
The close command terminates the connection with the remote FTP server and
retains the FTP client view.
Format
close
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the bye and quit commands to terminate the connection with the
remote FTP server and enter the user view.
Precautions
To enter the user view from the FTP client view, you can run the bye or quit
command.
Example
# Terminate the connection with the remote FTP server and enters the FTP client
view.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] close
221 Server closing.
[Huawei-ftp]
Related Topics
2.4.3 bye
2.4.10 copy
Function
The copy command copies a file.
Format
copy source-filename destination-filename
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
● If the destination file name is not specified, the designation file and the
source file have the same name. If the source file and the destination file are
in the same directory, you must specify the destination file name. If the
destination file name is not specified, you cannot copy the source file
successfully.
● If the destination file name is the same as that of an existing file, the system
prompts you whether to overwrite the existing file. The system prompt is
displayed only when file prompt is set to alert.
Example
# Copy the file config.cfg from the root directory of the flash card to flash:/temp.
The destination file name is temp.cfg.
<Huawei> copy flash:/config.cfg flash:/temp/temp.cfg
Copy flash:/config.cfg to flash:/temp/temp.cfg?(y/n)[n]:y
100% complete
Info: Copied file flash:/config.cfg to flash:/temp/temp.cfg...Done
# If the current directory is the root directory of the flash card, you can perform
the preceding configuration using the relative path.
<Huawei> pwd
flash:
<Huawei> dir
Directory of flash:/
# Copy the file config.cfg from the root directory of the flash card to flash:/temp.
The destination file name is config.cfg.
<Huawei> pwd
flash:
<Huawei> dir
Directory of flash:/
# Copy the file backup.zip to backup1.zip in the test directory from the current
working directory flash:/test/.
<Huawei> pwd
flash:/test
<Huawei> copy backup.zip backup1.zip
Copy flash:/test/backup.zip to flash:/test/backup1.zip?(y/n)[n]:y
100% complete
Info: Copied file flash:/test/backup.zip to flash:/test/backup1.zip...Done
Related Topics
2.4.34 move
2.4.11 debugging
Function
The debugging command enables the debugging function of the FTP client.
The undo debugging command disables the debugging function of the FTP client.
By default, the debugging function of the FTP client is disabled.
Format
debugging
undo debugging
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
You can run the debugging command to check the session information sent by
the FTP client to the FTP server.
Example
# Enable the debugging function of the FTP client.
<Huawei> ftp 10.1.1.1
Trying 10.1.1.1 ...
Press CTRL + K to abort
Connected to 10.1.1.1.
220 FTP service ready.
User(10.1.1.1:(none)):ftp
331 Password required for ftp.
Enter password:
230 User logged in.
[ftp] debugging
Format
delete [ /unreserved ] [ /force ] { filename | devicename }
Parameters
Parameter Description Value
/unreserved Deletes a specified file. -
The deleted file cannot be
restored.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The following describes the drive name.
● drive is the storage device and is named flash:.
The path can be an absolute path or relative path.
● flash:/my/test/ is an absolute path.
● selftest/ is related to the current working directory and indicates the selftest
directory in the current working directory.
Like devicename, drive specifies the storage device name.
Precautions
NOTICE
If you delete a file using the /unreserved parameter, the file cannot be
deleted.
● If you delete a specified storage device, all files are deleted from the root
directory of the storage device.
● If you delete two files with the same name from different directories, the last
file deleted is kept in the recycle bin.
● If you attempt to delete a protected file, such as a configuration file, patch
file, or patch status file, a system prompt is displayed.
● You cannot delete a directory by running the delete command. To delete a
directory, run the rmdir (user view) command.
Example
# Delete the file test.txt from the flash:/test/ directory.
<Huawei> delete flash:/test/test.txt
Delete flash:/test/test.txt?(y/n)[n]:y
Info: Deleting file flash:/test/test.txt...succeed.
# Delete the file test.txt from the current working directory flash:/selftest.
<Huawei> delete test.txt
Delete flash:/selftest/test.txt?(y/n)[n]:y
Info: Deleting file flash:/selftest/test.txt...succeed.
Related Topics
2.4.46 reset recycle-bin
2.4.56 undelete
Function
The dir command displays information about files and directories stored on the
storage device.
Format
dir [ /all ] [ filename | directory ]
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
The wildcard (*) can be used in the dir command. If no parameter is specified, this
command displays information about the files and directories in the current
directory.
The following describes the drive name:
● drive is the storage device and is named flash:.
The path can be an absolute path or relative path.
● flash:/my/test/ is an absolute path.
● selftest/ is related to the current working directory and indicates the selftest
directory in the current working directory.
You can use the dir /all command to view information about all files and
directories of the storage device, including those stored in the recycle bin. The
name of a file in the recycle bin is placed in square brackets ([]), for example,
[test.txt].
Example
# Display information about all files and directories stored in the current directory.
<Huawei> dir /all
Directory of flash:/
# Display information about all .txt files stored in the current directory.
<Huawei> dir *.txt
Directory of flash:/
Item Description
Format
delete remote-filename
Parameters
Parameter Description Value
remote- Specifies the name of a file The value is a string of 1 to 64
filename to be deleted. case-insensitive characters
without spaces.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
A file deleted in the FTP client view cannot be restored.
Example
Delete the file temp.c.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] delete temp.c
Warning: The contents of file temp.c cannot be recycled. Continue? (y/n)[n]:y
250 File deleted from remote host.
Related Topics
2.4.15 dir/ls (FTP client view)
Format
dir [ remote-filename [ local-filename ] ]
ls [ remote-filename [ local-filename ] ]
Parameters
Parameter Description Value
remote- Specifies the name and The value is a string of 1 to 64
filename directory of a file stored on the case-insensitive characters
FTP server. without spaces.
local-filename Specifies the name of the local The value is a string of 1 to 64
file that saves the FTP server case-insensitive characters
file information. without spaces.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
● After you run the dir command, detailed file information is displayed,
including the file size, date when the file is created, whether the file is a
directory, and whether the file is editable. After you run the ls command, only
the file name is displayed.
● The dir command is used to save detailed file information, while the ls
command is used to save only the file name even if the file is specified and
saved in a local directory.
Precautions
Example
# Display the name or detailed information about a file that is saved in the test
directory.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] cd test
250 CWD command successfully.
[Huawei-ftp] dir
200 Port command okay.
150 File Listing Follows in ASCII mode
drwxrwxrwx 1 noone nogroup 0 Mar 24 10:48 .
drwxrwxrwx 1 noone nogroup 0 Mar 26 15:52 ..
drwxrwxrwx 1 noone nogroup 0 Mar 23 16:04 yourtest
-rwxrwxrwx 1 noone nogroup 5736 Mar 24 10:38 backup.txt
-rwxrwxrwx 1 noone nogroup 5736 Mar 24 10:38 backup1.txt
226 Transfer finished successfully.
[Huawei-ftp] ls
200 Port command okay.
150 File Listing Follows in ASCII mode
yourtest
backup.txt
backup1.txt
226 Transfer finished successfully.
FTP: 10 byte(s) received in 0.110 second(s) 90.90byte(s)/sec.
# Display the detailed information in file temp.c, and save the displayed
information in file temp1.
[Huawei-ftp] dir temp.c temp1
200 PORT command okay
150 File Listing Follows in ASCII mode
\
226 Transfer finished successfully.
FTP: 62 byte(s) received in 0.050 second(s) 1.24Kbyte(s)/sec.
[Huawei-ftp] quit
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye
# Display the name of file test.bat, and save the displayed information in file test.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] ls test.bat test
200 Port command okay.
150 Opening ASCII mode data connection for test.bat.
[Huawei-ftp] quit
Parameter Description
Function
dir and ls commands display a list of specified files that are stored on the SFTP
server.
Format
dir [ -l | -a ] [ remote-directory ]
ls [ -l | -a ] [ remote-directory ]
Parameters
Parameter Description Value
-l Displays detailed information about -
all files and directories in a specified
directory.
-a Displays names of all files and -
directories in a specified directory.
remote-directory Specifies the name of a directory on The value is a string of
the SFTP server. 1 to 64 case-insensitive
characters without
spaces.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
The dir and ls commands are equivalent.
● If -l and -a parameters are not specified, detailed information about all files
and directories in a specified directory is displayed after you run the dir or ls
command. The effect is the same as the dir -l command output.
● By default, if the remote-directory parameter is not specified, the list of
current directory files is displayed after you run the dir or ls command.
Example
# Displays a list of files in the test directory of the SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> dir test
drwxrwxrwx 1 noone nogroup 0 Mar 24 18:48 .
drwxrwxrwx 1 noone nogroup 0 Mar 29 14:52 ..
-rwxrwxrwx 1 noone nogroup 0 Mar 24 00:04 yourtest
-rwxrwxrwx 1 noone nogroup 5736 Mar 24 18:38 backup.txt
-rwxrwxrwx 1 noone nogroup 5736 Mar 24 18:38 backup1.txt
sftp-client> dir -a test
.
..
yourtest
backup.txt
backup1.txt
sftp-client> ls test
drwxrwxrwx 1 noone nogroup 0 Mar 24 18:48 .
drwxrwxrwx 1 noone nogroup 0 Mar 29 14:52 ..
-rwxrwxrwx 1 noone nogroup 0 Mar 24 00:04 yourtest
2.4.17 disconnect
Function
The disconnect command terminates the connection with the remote FTP server
and displays the FTP client view.
Format
disconnect
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
This command is equivalent to the close command.
You can run the bye and quit commands to terminate the connection with the
remote FTP server and enter the user view.
To enter the user view from the FTP client view, you can run the bye or quit
command.
Example
# Terminate the connection with the remote FTP server and enter the FTP client
view.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] disconnect
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye
[Huawei-ftp]
Related Topics
2.4.3 bye
2.4.9 close
2.4.35 open
Format
display ftp-client
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
The default source IP address is 0.0.0.0 if ftp client-source is not configured.
Example
# Display the source IP address of the FTP client.
<Huawei> display ftp-client
Info: The source IP address of FTP client is 10.1.1.1.
Info: The source IP address of FTP client 10.1.1.1 is the source IP address of the
is 10.1.1.1. FTP client.
You can run the ftp client-source
command to configure the source IP
address.
If the IP address is configured for the
source port, the message "The source
interface of FTP client is LoopBack0"
is displayed.
Related Topics
2.4.23 ftp
2.4.24 ftp client-source
Format
display sftp-client
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run the display sftp client command to display the source IP address of
the SFTP client. By default, the source IP address is 0.0.0.0 if sftp client-source is
not configured.
Example
# Display the source IP address configured for the SFTP client.
Parameter Description
Info: The source address of SFTP client 1.1.1.1 is the source IP address of the
is 1.1.1.1 SFTP client.
You can run the sftp client-source
command to configure the source IP
address for the SFTP client.
If the IP address is configured for the
source port, the message "The source
interface of SFTP client is LoopBack0"
is displayed.
Related Topics
2.4.50 sftp
2.4.51 sftp client-source
Format
display tftp-client
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
You can run the display tftp client command to query source IP address of the
TFTP client. The default source IP address is 0.0.0.0 if tftp client-source is not
configured.
Example
# Display the source IP address configured for the TFTP client.
<Huawei> display tftp-client
Info: The source address of TFTP client is 1.1.1.1.
Info: The source address of TFTP client 1.1.1.1 is the source IP address of the
is 1.1.1.1. TFTP client.
You can run the tftp client-source
command to configure the source IP
address for the TFTP client.
If the IP address is configured for the
source port, the message "The source
interface of TFTP client is LoopBack0"
is displayed.
Related Topics
2.4.52 tftp
2.4.53 tftp client-source
Format
file prompt { alert | quiet }
Parameters
Parameter Description Value
alert Display a prompt message before users perform an -
operation.
quiet Display no prompt message before users perform an -
operation.
Views
System view
Default Level
3: Management level
Usage Guidelines
NOTICE
If the prompt mode is set to quiet, the system does not provide prompt messages
when data is lost because of misoperations such as the operation of deleting or
overwriting files. Therefore, this prompt mode should be used with caution.
Example
# Set the prompt mode to quiet. When you rename a copied file test.txt using an
existing file name test1.txt, no prompt message is displayed.
<Huawei> system-view
[Huawei] file prompt quiet
[Huawei] quit
<Huawei> copy test.txt test1.txt
Deleting file permanently from flash will take a long time if needed...Done.
100% complete
Info: Copied file flash:/test.txt to flash:/test1.txt...Done
2.4.22 format
Function
The format command formats a storage device.
Format
format drive
Parameters
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When the file system fault cannot be rectified or the data on the storage device is
unnecessary, the storage device can be formatted. When you run the format
command, all files and directories are cleared from the storage device.
Currently, only the USB flash drive and micro SD card of the device can be
formatted.
Precautions
NOTICE
After the format command is run, files and directories are cleared from the
specified storage device and cannot be restored. Therefore, this command should
be used with caution.
If the storage device is still unavailable after the format command is run, a
physical exception may have occurred.
Example
# Format the storage device.
<Huawei> format usb:
All data(include configuration and system startup file) on usb: will be lost , proceed with format? (y/n)[n]:y
%Format usb: completed.
2.4.23 ftp
Function
The ftp command connects the FTP client to the FTP server and enters the FTP
client view.
Format
# Connect the FTP client to the FTP server based on the IPv4 address.
Parameters
Parameter Description Value
-a source-ip- Specifies the source IP address for The value is in dotted
address connecting to the FTP client. You are decimal notation.
advised to use the loopback interface
IP address.
port-number Specifies the port number of the FTP The value is an integer
server. that ranges from 1 to
65535. The default
value is the standard
port number 21.
host-ipv6 Specifies the IP address or host name The value is a string of
of the remote IPv6 FTP server. 1 to 46 case-insensitive
characters without
spaces.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Before accessing the FTP server on the FTP client, you must first run the ftp
command to connect the FTP client to the FTP server.
Precautions
● You can set the source IP address to the source or destination IP address in
the ACL rule when the -a or -i parameter is specified on the IPv4 network.
This shields the IP address differences and interface status impact, and
incoming and filters outgoing packets, and implements security
authentication.
● If no parameter is set in the ftp command, only the FTP view is displayed, and
no connection is set up between the FTP server and client.
● If the port number that the FTP server uses is non-standard, you must specify
a standard port number; otherwise, the FTP server and client cannot be
connected.
● When you run the ftp command, the system prompts you to enter the user
name and password for logging in to the FTP server. You can log in to the FTP
server if the user name and password are correct.
● If the number of login users exceeds the maximum value that the FTP server
allows, other authorized users cannot log in to the FTP server. To allow news
authorized users to log in to the FTP server, users who have performed FTP
services must disconnect their clients from the FTP server. You can run the bye
or quit command to disconnect the FTP client from the FTP server and return
to the user view, or run the close or disconnect command to disconnect the
FTP client from the FTP server and retain in the FTP client view.
Example
# Connect to the FTP server whose IP address is 10.137.217.201.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp]
[Huawei-ftp]
Related Topics
2.4.3 bye
2.4.17 disconnect
Function
The ftp client-source command specifies the source IP address for the FTP client
to send packets.
The undo ftp client-source command restores the default source IP address for
the FTP client to send packets.
The default source IP address for the FTP client to send packets is 0.0.0.0.
Format
ftp client-source { -a source-ip-address | -i interface-type interface-number }
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the client uses the source IP address that the
router specifies to send packets. The source IP address must be configured for an
interface with stable performance. The loopback interface is recommended. Using
the loopback interface as the source interface simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, and incoming and filters outgoing packets, and implements security
authentication.
Precautions
● You can also run the ftp command to configure the source IP address whose
priority is higher than that of the source IP address specified by the ftp client-
source command. If you specify the source IP addresses by running the ftp
client-source and ftp commands, the source IP address specified by the ftp
command is used for data communication and is available only for the
current FTP connection, while the source IP address specified by the ftp
client-source command is available for all FTP connections.
● The IP address that a user displays on the FTP server is the specified source IP
address or source interface IP address.
Example
# Set the source IP address of the FTP client to 1.1.1.1.
<Huawei> system-view
[Huawei] ftp client-source -a 1.1.1.1
Info: Succeeded in setting the source address of the FTP client to 1.1.1.1.
Related Topics
2.4.23 ftp
2.4.18 display ftp-client
Function
The get command downloads a file from the FTP server and saves the file to the
local device.
Format
get remote-filename [ local-filename ]
Parameters
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the get command to download system software, backup
configuration files, and patch files from the FTP server to upgrade devices.
Precautions
● If the downloaded file name is not specified on the local device, the original
file name is used.
● If the name of the downloaded file is the same as that of an existing local
file, the system prompts you whether to overwrite the existing file.
Example
# Download the system software devicesoft.cc from the FTP server.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] get devicesoft.cc
Related Topics
2.4.37 put (FTP client view)
Format
get remote-filename [ local-filename ]
Parameters
Parameter Description Value
remote- Specifies the name of the file The value is a string of 1 to 64
filename to be downloaded from the case-sensitive characters
SFTP server. without spaces.
local-filename Specifies the name of a The value is a string of 1 to 64
downloaded file to be saved to case-sensitive characters
the local device. without spaces.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the get command to download files from the FTP server to upgrade
devices.
Precautions
● If the local-filename is not specified on the local device, the original file name
is used.
● If the name of the downloaded file is the same as that of an existing local
file, the system prompts you whether to overwrite the existing file.
Example
# Download a file from the SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
Related Topics
2.4.38 put (SFTP client view)
Function
The help command displays the help information in the SFTP client view.
Format
help [ all | command-name ]
Parameters
Parameter Description Value
all Displays all commands in the SFTP client view. -
command-name Displays the format and parameters of a specified -
command in the SFTP client view.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
In the SFTP view, you can only enter the question mark (?) to obtain all
commands in the SFTP client view. If you enter a command keyword and the
question mark (?) to query command parameters, an error message is displayed,
as shown in the following:
sftp-client> dir ?
Error: Failed to list files.
You can run the help command to obtain the help information and display all
commands or a command format in the SFTP client view.
Precautions
If you specify no parameter when running the help command, all commands in
the SFTP client view is displayed. This has the same effect as the help all
command or directly entering the question mark (?) in the SFTP client view.
Example
# Display the format of the command get.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> help get
get Remote file name STRING<1-64> [Local file name STRING<1-64>] Download file
Default local file name is the same with remote file.
Related Topics
2.4.50 sftp
Function
The mkdir command creates a directory on the remote FTP server.
Format
mkdir remote-directory
Parameters
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
● You can run the mkdir command to create a subdirectory in a specified
directory, and the subdirectory name must be unique.
● If no path is specified when you create a subdirectory, the subdirectory is
created in the current directory.
● The created directory is stored on the FTP server.
Example
# Create a directory test on the remote FTP server.
<Huawei> ftp 172.16.104.110
Trying 172.16.104.110 ...
Press CTRL+K to abort
Connected to 172.16.104.110.
220 FTP service ready.
User(172.16.104.110:(none)):huawei
331 Password required for huawei
Enter password:
230 User logged in.
[Huawei-ftp] mkdir test
257 "test" new directory created.
Related Topics
2.4.15 dir/ls (FTP client view)
2.4.47 rmdir (FTP client view)
Format
mkdir remote-directory
Parameters
Parameter Description Value
remote- Specifies the The value is a string of case-sensitive
directory directory to be characters without spaces. The absolute
created. path length ranges from 1 to 64, while the
directory name length ranges from 1 to 15.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
● You can run the mkdir command to create a subdirectory in a specified
directory, and the subdirectory name must be unique.
● If no path is specified when you create a subdirectory, the subdirectory is
created in the current directory.
● The created directory is stored on the SFTP server.
● After a directory is created, you can run the dir/ls (SFTP client view)
command to view the directory.
Example
# Create a directory on the SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> mkdir ssh
Info: Succeeded in creating a directory.
Related Topics
2.4.16 dir/ls (SFTP client view)
2.4.48 rmdir (SFTP client view)
Format
mkdir directory
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The following describes the drive name.
● drive is the storage device and is named flash:.
The path can be an absolute path or relative path.
● flash:/my/test/ is an absolute path.
● selftest/ is related to the current working directory and indicates the selftest
directory in the current working directory.
If you only the subdirectory name is specified, a subdirectory is created in the
current working directory. You can run the 2.4.41 pwd (user view) command to
query the current working directory. If the subdirectory name and directory path
are specified, the subdirectory is created in the specified directory.
Precautions
● The subdirectory name must be unique in a directory; otherwise, the message
"Error: Directory already exists" is displayed.
Example
# Create the subdirectory new in the flash card.
<Huawei> mkdir flash:/new
Info: Create directory flash:/new......Done
Related Topics
2.4.13 dir (user view)
2.4.31 lcd
Function
The lcd command displays and changes the local working directory of the FTP
client in the FTP client view.
Format
lcd [ local-directory ]
Parameters
Parameter Description Value
local-directory Specifies the local working The value is a string of 1 to 64
directory of the FTP client. case-sensitive characters without
spaces.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the lcd command to display the local working directory of the FTP
client when uploading or downloading files, and set the upload or download path
to the path of the local working directory.
Precautions
The lcd command displays the local working directory of the FTP client, while the
pwd command displays the working directory of the FTP server. If you specify the
parameter local-directory in the lcd command, you can directly change the local
working directory in the FTP client view.
Example
# Change the local working directory to flash:/test.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] lcd
The current local directory is flash:.
[Huawei-ftp] lcd flash:/test
The current local directory is flash:/test.
Related Topics
2.4.39 pwd (FTP client view)
2.4.32 more
Function
The more command displays the content of a specified file.
Format
more [ /binary ] filename [ offset ] [ all ]
Parameters
offset Specifies the file The value is an integer that ranges from 0 to
offset. 2147483647, in bytes.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the more command to display the file content directly on a device.
Precautions
● You are not advised to use this command to display non-text files; otherwise,
the terminal is shut down or displays garbled characters, which is harmless to
the system.
● Files are displayed in text format.
● You can display the file content flexibly by specifying parameters before
running the more command:
– You can run the more filename command to view a specified text file.
The content of the specified text file is displayed on multiple screens. You
can press the spacebar consecutively on the current session GUI to
display all content of the file.
To display the file content on multiple screens, you must ensure that:
▪ The total number of file lines is greater than the number of lines
that can be displayed on a terminal screen. (The number of lines that
can be displayed on a terminal screen is set by running the screen-
length command.)
– You can run the more filename offset command to view a specified file.
The content of the specified text file starting from offset is displayed on
multiple screens. You can press the spacebar consecutively on the current
session GUI to display all content of the file.
To display the file content on multiple screens, you must ensure that:
▪ The number of lines starting from offset in the file is greater than
the number of lines that can be displayed on a terminal screen. (The
number of lines that can be displayed on a terminal screen is set by
running the screen-length command.)
– You can run the more file-name all command to view a specified file.
The file content is displayed on one screen.
Example
# Display the content of the file test.bat.
<Huawei> more test.bat
rsa local-key-pair create
user-interface vty 12 14
authentication-mode aaa
protocol inbound ssh
user privilege level 5
quit
ssh user sftpuser authentication-type password
sftp server enable
# Display the content of the file log.txt and set the offset to 100.
<Huawei> more log.txt 100
: CHINA HUAWEI TECHNOLOGY LIMITTED CO.,LTD
# FILE NAME: Product Adapter File(PAF)
# PURPOSE: MAKE VRPV5 SUITABLE FOR DIFFERENT PRODUCT IN LIB
# SOFTWARE PLATFORM: V6R2C00
# DETAIL VERSION: B283
# DEVELOPING GROUP: 8090 SYSTEM MAINTAIN GROUP
# HARDWARE PLATFORM: 8090 (512M Memory)
# CREATED DATE: 2003/05/10
# AUTH: RAINBOW
# Updation History: Kelvin dengqiulin update for 8090(2004.08.18)
# lmg update for R3(2006.11.7)
# fsr update for R5 (2008.1.18)
# qj update for R6 (2008.08.08)
# COPYRIGHT: 2003---2008
#----------------------------------------------------------------------------------
2.4.33 mount
Function
The mount command uploads a storage device.
By default, after being installed on the device, the storage device is automatically
uploaded to the device.
NOTE
Format
mount driver
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
After being installed on the device, the storage device is automatically uploaded to
the device. Therefore, you do not need to run this command to upload the storage
device. If you run the 2.4.55 umount command to unload the storage device and
the storage device is not removed from the device, run the mount command to
upload the storage device again.
Example
# Upload a USB flash drive.
<Huawei> mount usb:
Info: Mount USB device success!
Related Topics
2.4.55 umount
2.4.34 move
Function
The move command moves the source file from a specified directory to a
destination directory.
Format
move source-filename destination-filename
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
● If the destination file has the same name as an existing file, the system
prompts you whether to overwrite the existing file. The system prompt is
displayed only when file prompt is set to alert.
● This command cannot be used to move files between storage devices.
● The move and copy commands have different effects:
– The move command moves the source file to the destination directory.
– The copy command copies the source file to the destination directory.
Example
# Move a file from flash:/test/sample.txt to flash:/sample.txt.
<Huawei> move flash:/test/sample.txt flash:/sample.txt
Move flash:/test/sample.txt to flash:/sample.txt ?(y/n)[n]: y
%Moved file flash:/test/sample.txt to flash:/sample.txt.
Related Topics
2.4.10 copy
2.4.35 open
Function
The open command connects the FTP client and server.
Format
# Connect the FTP client to the FTP server based on the IPv4 address.
# Connect the FTP client to the FTP server based on the IPv6 address.
Parameters
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the open command in the FTP client view to connect the FTP client to
the server to transmit files and manage files and directories of the FTP server.
Precautions
● You can run the ftp command in the user view to connect the FTP client and
server and enter the FTP client view.
● You can set the source IP address to the source or destination IP address in
the ACL rule when the -a or -i parameter is specified on the IPv4 network.
This shields the IP address differences and interface status impact, and
incoming and filters outgoing packets, and implements security
authentication.
● If the port number that the FTP server uses is non-standard, you must specify
a standard port number; otherwise, the FTP server and client cannot be
connected.
● When you run the open command, the system prompts you to enter the user
name and password for logging in to the FTP server. You can log in to the FTP
client and enter the FTP client view if the user name and password are
correct.
Example
# Connect the FTP client with the FTP server whose IP address is 10.137.217.204.
<Huawei> ftp
[Huawei-ftp] open 10.137.217.204
Trying 10.137.217.204 ...
Press CTRL+K to abort
Connected to 10.137.217.204.
220 FTP service ready.
User(10.137.217.204:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp]
# Connect the FTP client with the FTP server whose IP address is 1000::1.
<Huawei> ftp
[Huawei-ftp] open ipv6 1000::1
Trying 1000::1 ...
Press CTRL+K to abort
Connected to 1000::1
220 FTP service ready.
User(1000::1:(none)):huawei
331 Password required for huawei
Enter Password:
230 User logged in.
[Huawei-ftp]
Related Topics
2.4.23 ftp
2.4.17 disconnect
2.4.36 passive
Function
The passive command sets the data transmission mode to passive.
The undo passive command sets the data transmission mode to active.
Format
passive
undo passive
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
The device supports the active and passive data transmission modes. In active
mode, the server initiates a connection request, and the client and server need to
enable and monitor a port to establish a connection. In passive mode, the client
initiates a connection request, and only the server needs to monitor the
corresponding port. This command is used together with the firewall function.
When the client is configured with the firewall function, FTP connections are
restricted between internal clients and external FTP servers if the FTP transmission
mode is active. If the FTP transmission mode is passive, FTP connections between
internal clients and external FTP servers are not restricted.
Example
# Set the data transmission mode to passive.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] passive
Info: Succeeded in switching passive on.
Function
The put command uploads a local file to the remote FTP server.
Format
put local-filename [ remote-filename ]
Parameters
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the put command to upload a local file to the remote FTP server for
further check and backup. For example, you can upload the local log file to the
FTP server for other users to check, and upload the configuration file to the FTP
server as a backup before upgrading the device.
Precautions
● If the file name is not specified on the remote FTP server, the local file name
is used.
● If the name of the uploaded file is the same as that of an existing file on the
FTP server, the system overwrites the existing file.
Example
# Upload the configuration file vrpcfg.zip to the remote FTP server as a backup,
and save it as backup.zip.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] put vrpcfg.zip backup.zip
200 Port command successful.
150 Opening BINARY mode data connection for file transfer.
226 Transfer complete
FTP: 1098 byte(s) sent in 0.131 second(s) 8.38Kbyte(s)/sec.
Related Topics
2.4.25 get (FTP client view)
Format
put local-filename [ remote-filename ]
Parameters
Parameter Description Value
local-filename Specifies a local file The value is a case-sensitive character
name on the SFTP client. string without spaces. The file name
(including the absolute path) contains
1 to 64 characters.
remote- Specifies the name of the The value is a case-sensitive character
filename file uploaded to the string without spaces. The file name
remote SFTP server. (including the absolute path) contains
1 to 64 characters.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
This command enables you to upload files from the local device to a remote SFTP
server to view the file contents or back up the files. For example, you can upload
log files of a device to an SFTP server and view the logs in the server. During an
upgrade, you can upload the configuration file of the device to the SFTP server for
backup.
Precautions
Example
# Upload a file to the SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> put wm.cfg
local file: wm.cfg ---> Remote file: /wm.cfg
Info: Uploading file successfully ended.
Related Topics
2.4.26 get (SFTP client view)
Function
The pwd command displays the FTP client's working directory on the remote FTP
server.
Format
pwd
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
After logging in to the FTP server, you can run the pwd command to display the
FTP client's working directory on the remote FTP server.
If the displayed working directory is incorrect, you can run the cd command to
change the FTP client's working directory on the remote FTP server.
Example
# Display the FTP client's working directory on the remote FTP server.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] pwd
257 "/" is current directory.
Related Topics
2.4.23 ftp
Function
The pwd command displays the SFTP client's working directory on the remote FTP
server.
Format
pwd
Parameters
None
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
After logging in to the SFTP server, you can run the pwd command to display the
SFTP client's working directory on the remote SFTP server.
If the displayed working directory is incorrect, you can run the cd command to
change the SFTP client's working directory on the remote SFTP server.
Example
# Display the SFTP client's working directory on the remote SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> pwd
/
sftp-client> cd test
Current directory is:
/test
sftp-client> pwd
/test
Related Topics
2.4.5 cd (SFTP client view)
Function
The pwd command displays the current working directory.
Format
pwd
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
You can run the pwd command in any directory to display the current working
directory. To change the current working directory, you can run the cd command.
Example
# Display the current working directory.
<Huawei> pwd
flash:/test
Related Topics
2.4.13 dir (user view)
2.4.6 cd (user view)
2.4.42 remotehelp
Function
The remotehelp command displays the help information about an FTP command
when the FTP client and server are connected.
Format
remotehelp [ command ]
Parameters
Parameter Description Value
command Specifies the FTP The value is a string of 1 to 16
command. characters.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
You can run the remotehelp command to display the help information about an
FTP command.
Example
# Display the syntax of the command cdup.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] remotehelp
214-The following commands are recogized(*=>'s unimplemented).
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 Huawei Tech.
Function
The remove command deletes specified files from the remote SFTP server.
Format
remove remote-filename &<1-10>
Parameters
Parameter Description Value
remote- Specifies the name of the file The value is a string of 1 to 64
filename to be deleted from the remote case-insensitive characters
SFTP server. without spaces.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
● You can configure a maximum of 10 file names in the command and separate
them using spaces and delete them at one time.
● If the file to be deleted is not in the current directory, you must specify the file
path.
Example
# Delete the file 3.txt from the server and backup1.txt from the test directory.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> remove 3.txt test/backup1.txt
Warning: Make sure to remove these files? [y/n][n]:y
Info: Succeeded in removing the file /3.txt.
Info: Succeeded in removing the file /test/backup1.txt.
Related Topics
2.4.16 dir/ls (SFTP client view)
Format
rename old-name new-name
Parameters
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
You can run the rename command to rename a file or directory.
Example
# Rename the directory yourtest on the SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> rename test/yourtest test/test
Warning: Rename /test/yourtest to /test/test? [y/n][n]:y
Info: Succeeded in renaming file.
sftp-client> cd test
Current directory is:
/test
sftp-client> dir
drwxrwxrwx 1 noone nogroup 0 Mar 29 22:44 .
drwxrwxrwx 1 noone nogroup 0 Mar 29 22:39 ..
drwxrwxrwx 1 noone nogroup 0 Mar 24 00:04 test
-rwxrwxrwx 1 noone nogroup 5736 Mar 24 18:38 backup.txt
Related Topics
2.4.43 remove (SFTP client view)
Function
The rename command renames a file or folder.
Format
rename old-name new-name
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
Example
# Rename the directory mytest to yourtest in the directory flash:/test/.
<Huawei> pwd
flash:/test
<Huawei> rename mytest yourtest
Rename flash:/test/mytest to flash:/test/yourtest ?(y/n)[n]:y
Info: Rename file flash:/test/mytest to flash:/test/yourtest ......Done
Related Topics
2.4.41 pwd (user view)
Function
The reset recycle-bin command permanently deletes files from the recycle bin.
Format
reset recycle-bin [ filename | devicename ]
Parameters
Parameter Description Value
filename Specifies the name The value is a string of 1 to 64 case-sensitive
of a file to be characters without spaces in the [ drive ]
deleted. [ path ] file name format.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
You are advised to add : and / between the
storage device name and directory. Characters
~, *, /, \, :, ', " cannot be used in the directory
name.
The wildcard (*) is supported.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If you run the delete command without specifying the /unreserved parameter,
the file is moved to the recycle bin and still occupies the memory. To free up the
space, you can run the reset recycle-bin command to permanently delete the file
from the recycle bin.
The following describes the drive name.
● drive is the storage device and is named flash:.
The path can be an absolute path or relative path.
● flash:/my/test/ is an absolute path.
● selftest/ is related to the current working directory and indicates the selftest
directory in the current working directory.
Like devicename, drive specifies the storage device name.
Precautions
● You can run the dir /all command to display all files that are moved to the
recycle bin from the current directory, and file names are displayed in square
brackets ([ ]).
● If you delete a specified storage device, all files in the root directory of the
storage device are deleted.
● If you run the reset recycle-bin command directly, all files that are moved to
the recycle bin from the current directory are permanently deleted.
Example
# Delete the file test.txt that is moved to the recycle bin from the directory test.
<Huawei> reset recycle-bin flash:/test/test.txt
Squeeze flash:/test/test.txt?(y/n)[n]:y
Clear file from flash will take a long time if needed...Done.
%Cleared file flash:/test/test.txt.
# Delete files that are moved to the recycle bin from the current directory.
<Huawei> pwd
flash:/test
<Huawei> reset recycle-bin
Squeeze flash:/test/backup.zip?(y/n)[n]:y
Clear file from flash will take a long time if needed...Done.
%Cleared file flash:/test/backup.zip.
Squeeze flash:/test/backup1.zip?(y/n)[n]:y
Clear file from flash will take a long time if needed...Done.
%Cleared file flash:/test/backup1.zip.
Related Topics
2.4.12 delete (user view)
2.4.13 dir (user view)
Format
rmdir remote-directory
Parameters
Parameter Description Value
remote- Specifies a directory or The value is a string of 1 to 64
directory path on the FTP server. case-insensitive characters
without spaces.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the rmdir command to delete a specified directory from the remote
FTP server.
Precautions
● Before running the rmdir command to delete a directory, you must delete all
files and subdirectories from the directory.
● If no path is specified when you delete a subdirectory, the subdirectory is
deleted from the current directory.
● The directory is deleted from the FTP server rather than the FTP client.
Example
# Delete the directory d:/temp1 from the remote FTP server.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] rmdir d:/temp1
250 'D:\temp1': directory removed.
Related Topics
2.4.15 dir/ls (FTP client view)
2.4.28 mkdir (FTP client view)
Function
The rmdir command deletes a specified directory from the remote SFTP server.
Format
rmdir remote-directory &<1-10>
Parameters
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
● You can configure a maximum of 10 file names in the command and separate
them using spaces and delete them at one time.
● Before running the rmdir command to delete a directory, you must delete all
files and subdirectories from the directory.
● If the directory to be deleted is not in the current directory, you must specify
the file path.
Example
# Delete the directory 1 from the current directory, and the directory 2 from the
test directory.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Enter password:
sftp-client> rmdir 1 test/2
Warning: Make sure to remove these directories? [Y/N]:y
Info: Succeeded in removing the directory /test/1.
Info: Succeeded in removing the directory /test/test/2.
Related Topics
2.4.43 remove (SFTP client view)
Format
rmdir directory
Parameters
Parameter Description Value
directory Specifies a The value is a string of case-sensitive characters
directory or in the [ drive ] [ path ] directory format. The
directory and its absolute path length ranges from 1 to 64, while
path. the directory name length ranges from 1 to 15.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
Characters such as ~, *, /, \, :, ', " cannot be used
in the directory name.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
● Before running the rmdir command to delete a directory, you must delete all
files and subdirectories from the directory.
● A deleted directory and its files cannot be restored from the recycle bin.
Example
# Delete the directory test from the current directory.
<Huawei> rmdir test
Remove directory flash:/test?(y/n)[n]:y
%Removing directory flash:/test....Done!
Related Topics
2.4.30 mkdir (User view)
2.4.50 sftp
Function
The sftp command connects the device to the SSH server so that you can manage
files that are stored on the SFTP server.
Format
# Connect the SFTP client to the SFTP server based on IPv4.
sftp [ -a source-address | -i interface-type interface-number ] host-ip [ port ]
[ [ prefer_kex prefer_key-exchange ] | [ prefer_ctos_cipher prefer_ctos_cipher ] |
[ prefer_stoc_cipher prefer_stoc_cipher ] | [ prefer_ctos_hmac prefer_ctos_hmac ]
| [ prefer_stoc_hmac prefer_stoc_hmac ] ] * [ -ki aliveinterval [ -kc
alivecountmax ] ]
# Connect the SFTP client to the SFTP server based on IPv6.
sftp ipv6 [ -a source-address ] host-ipv6 [ -oi interface-type interface-number ]
[ port ] [ [ prefer_kex prefer_key-exchange ] | [ prefer_ctos_cipher
prefer_ctos_cipher ] | [ prefer_stoc_cipher prefer_stoc_cipher ] |
[ prefer_ctos_hmac prefer_ctos_hmac ] | [ prefer_stoc_hmac prefer_stoc_hmac ] ]
* [ -ki aliveinterval [ -kc alivecountmax ] ]
Parameters
Parameter Description Value
-a source-address Specifies the ● IPv4 address: dotted decimal
source IP address notation.
for connecting to
the SFTP client. ● IPv6 address: 32-digit hexadecimal
You are advised to number in X:X:X:X:X:X:X:X format.
use the loopback
interface IP
address.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
SFTP is short for SSH FTP that is a secure FTP protocol. SFTP is on the basis of
SSH. It ensures that users can log in to a remote device securely for file
management and transmission, and enhances the security in data transmission. In
addition, you can log in to a remote SSH server from the device that functions as
an SFTP client.
When the connection between the SFTP server and client fails, the SFTP client
must detect the fault in time and disconnect from the SFTP server. To ensure this,
before being connected to the server in SFTP mode, the client must be configured
with the interval and times for sending the keepalive packet when no packet is
received in reply. If the client receives no packet in reply within the specified
interval, the client sends the keepalive packet to the server again. If the maximum
number of times that the client sends keepalive packets exceeds the specified
value, the client releases the connection. By default, when no packet is received,
the function for sending keepalive packets is not enabled.
Precautions
● You can set the source IP address to the source or destination IP address in
the ACL rule when the -a or -i parameter is specified. This shields the IP
address differences and interface status impact, and incoming and filters
outgoing packets, and implements security authentication.
● If the current listening port number is not 22, you must specify a listening
port number for logging in to the SFTP client.
● If you cannot run the sftp command successfully when you configured the
ACL on the SFTP client, or when the TCP connection fails, an error message is
displayed indicating that the SFTP client cannot be connected to the server.
Example
# Set keepalive parameters when the client is connected to the server in SFTP
mode.
<Huawei> system-view
[Huawei] sftp 10.164.39.223 -ki 10 -kc 4
Please input the username: client001
Trying 10.164.39.223 ...
Press CTRL+K to abort
Enter password:
sftp-client>
Related Topics
2.3.30 ssh server port
Format
sftp client-source { -a source-ip-address | -i interface-type interface-number }
undo sftp client-source
Parameters
Parameter Description Value
-a source-ip- The value is
Specifies the source IP address. You are
address in dotted
advised to use the loopback interface IP
decimal
address.
notation.
-i interface-type Specifies the source interface. You are -
interface-number advised to use the loopback interface.
The IP address configured for the source
interface is the source IP address for sending
packets. If no IP address is configured for the
source interface, the FTP connection cannot
be set up.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the client uses the source IP address that the
router specifies to send packets. The source IP address must be configured for an
interface with stable performance. The loopback interface is recommended. Using
the loopback interface as the source interface simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, and incoming and filters outgoing packets, and implements security
authentication.
Precautions
● You can query the source IP address or primary IP address of the source
interface for the SFTP connection on the SFTP server.
● The sftp command also configures the source IP address whose priority is
higher than that of the source IP address specified in the sftp client-source
command. If you specify source addresses in the sftp client-source and sftp
commands, the source IP address specified in the sftp command is used for
data communication. The source address specified in the sftp client-source
command applies to all SFTP connections. The source address specified in the
sftp command applies only to the current SFTP connection.
Example
# Set the source IP address of the SFTP client to 1.1.1.1.
<Huawei> system-view
[Huawei] sftp client-source -a 1.1.1.1
Info: Succeeded in setting the source address of the SFTP client to 1.1.1.1
Related Topics
2.4.50 sftp
2.4.19 display sftp-client
2.4.52 tftp
Function
The tftp command uploads a file to the TFTP server or downloads a file to the
local device.
Format
# Upload a file to the TFTP server or download a file to the local device based on
the IPv4 address
tftp [ -a source-ip-address | -i interface-type interface-number ] tftp-server { get |
put } source-filename [ destination-filename ]
# Upload a file to the TFTP server or download a file to the local device based on
the IPv6 address
Parameters
Parameter Description Value
-a source-ip- Specifies the source IP address The value is in dotted
address for connecting to the TFTP client. decimal notation.
You are advised to use the
loopback interface IP address.
-a source-ipv6- Specifies the source IP address The value is a 32-digit
address for connecting to the TFTP client. hexadecimal number, in the
You are advised to use the X:X:X:X:X:X:X:X format.
loopback interface IP address.
-i interface-type Specifies the source interface -
interface- used by the TFTP client to set up
number connections. It consists of the
interface type and number. It is
recommended that you specify a
loopback interface.
The IP address configured for this
interface is the source IP address
for sending packets. If no IP
address is configured for the
source interface, the TFTP
connection cannot be set up.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When upgrading the system, you can run the tftp command to upload an
important file to the TFTP server or download a system software to the local
device.
Precautions
● When you run the tftp command to upload a file to the TFTP server in TFTP
mode, files are transferred in binary mode by default. The tftp does not
support the ASCII mode for file transfer.
● After specifying a source IP address, you can use this IP address to
communicate with the server and implement packet filtering to ensure data
security.
Example
# Download file vrpcfg.txt from the root directory of the TFTP server to the local
device. The IP address of the TFTP server is 10.1.1.1. Save the downloaded file to
the local device as file vrpcfg.bak.
<Huawei> tftp 10.1.1.1 get vrpcfg.txt flash:/vrpcfg.bak
# Upload file vrpcfg.txt from the root directory of the storage device to the
default directory of the TFTP server. The IP address of the TFTP server is 10.1.1.1.
Save file vrpcfg.txt on the TFTP server as file vrpcfg.bak.
<Huawei> tftp 10.1.1.1 put flash:/vrpcfg.txt vrpcfg.bak
# Obtain the link local IP address and interface name from the TFTP server.
<Huawei> tftp ipv6 fe80::250:daff:fe91:e058 -oi gigabitethernet 0/0/1 get file1 file2
Related Topics
2.4.54 tftp-server acl
Format
tftp client-source { -a source-ip-address | -i interface-type interface-number }
undo tftp client-source
Parameters
Parameter Description Value
-a source-ip- The value is
Specifies the source IP address of the TFTP
address in dotted
client. You are advised to use the loopback
decimal
interface IP address.
notation.
-i interface-type Source interface type and ID. You are advised -
interface-number to use the loopback interface.
The IP address configured for this interface is
the source IP address for sending packets. If
no IP address is configured for the source
interface, the TFTP connection cannot be set
up.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the client uses the source IP address that the
router specifies to send packets. The source IP address must be configured for an
interface with stable performance. The loopback interface is recommended. Using
the loopback interface as the source interface simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, and incoming and filters outgoing packets, and implements security
authentication.
Precautions
● The tftp command also configures the source IP address whose priority is
higher than that of the source IP address specified in the tftp client-source
command. If you specify source addresses in the tftp client-source and tftp
commands, the source IP address specified in the tftp command is used for
data communication. The source address specified in the tftp client-source
command applies to all TFTP connections. The source address specified in the
tftp command applies only to the current TFTP connection.
● You can query the source IP address or source interface IP address specified in
the TFTP connection on the TFTP server.
Example
# Set the source IP address of the TFTP client to 1.1.1.1.
<Huawei> system-view
[Huawei] tftp client-source -a 1.1.1.1
Info: Succeeded in setting the source address of the TFTP client to 1.1.1.1.
Related Topics
2.4.52 tftp
2.4.20 display tftp-client
Format
tftp-server acl acl-number
undo tftp-server acl
Parameters
Parameter Description Value
acl-number Specifies the number of the The value is an integer that ranges
basic ACL. from 2000 to 2999.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To ensure the security of the local device, you need to run the tftp-server acl
command to specify an ACL to specify TFTP servers that the local device can
access.
Precautions
The TFTP supports only the basic ACL whose number ranges from 2000 to 2999.
Example
# Allow the local device to the access the TFTP server whose ACL number is 2000.
Related Topics
2.4.52 tftp
2.4.55 umount
Function
The umount command unloads a storage device.
NOTE
Format
umount driver
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Run this command to unload the storage device before you remove the storage
device from the device. Otherwise, the storage device may be damaged.
Example
# Unload a USB flash drive.
<Huawei> umount usb:
Info: Umount USB device success!
Related Topics
2.4.33 mount
2.4.56 undelete
Function
The undelete command restores a file that has been temporally deleted and
moved to the recycle bin.
Format
undelete { filename | devicename }
Parameters
Parameter Description Value
filename Specifies the name The value is a string of 1 to 64 case-sensitive
of a file to be characters without spaces in the [ drive ]
restored. [ path ] file name format.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
You are advised to add : and / between the
storage device name and directory. Characters
~, *, /, \, :, ', " cannot be used in the directory
name.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the undelete command to restore a file that has been temporally
deleted and moved to the recycle bin. However, files that are permanently deleted
by running the delete or reset recycle-bin command with the /unreserved
parameter cannot be restored.
The following describes the drive name.
● drive is the storage device and is named flash:.
The path can be an absolute path or relative path.
● flash:/my/test/ is an absolute path.
● selftest/ is related to the current working directory and indicates the selftest
directory in the current working directory.
Like devicename, drive specifies the storage device name.
Precautions
● To display information about a temporally deleted file, run the dir /all
command. The file name is displayed in square brackets ([ ]).
● If the name of a file is the same as an existing directory, the file cannot be
restored. If the destination file has the same name as an existing file, the
system prompts you whether to overwrite the existing file. The system prompt
is displayed only when file prompt is set to alert.
Example
# Restore file sample.bak from the recycle bin.
<Huawei> undelete sample.bak
Undelete flash:/sample.bak ?(y/n)[n]:y
Undeleted file flash:/sample.bak.
# Restore a file that has been moved from the root directory to the recycle bin.
<Huawei> undelete flash:
Undelete flash:/test.txt?(y/n)[n]:y
Undeleted file flash:/test.txt.
Undelete flash:/rr.bak?(y/n)[n]:y
Undeleted file flash:/rr.bak.
Related Topics
2.4.12 delete (user view)
2.4.13 dir (user view)
2.4.21 file prompt
2.4.46 reset recycle-bin
2.4.57 unzip
Function
The unzip command decompresses a file.
Format
unzip source-filename destination-filename
Parameters
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can decompress files, especially log files that are stored on the storage device
and run the more command to query the file.
The following describes the drive name.
● drive is the storage device and is named flash:.
The path can be an absolute path or relative path.
● flash:/my/test/ is an absolute path.
● selftest/ is related to the current working directory and indicates the selftest
directory in the current working directory.
Precautions
● If the destination file path is specified while the file name is not specified, the
designation file name is the same as the source file name.
● The source file persists after being decompressed.
● The compressed file must be a .zip file. If a file to be decompressed is not a
zip file, the system displays an error message during decompression.
● The source file must be a single file. If you attempt to decompress a directory
or multiple files, the decompression cannot succeed.
Example
# Decompress log file syslogfile-2012-02-27-17-47-50.zip that are stored in the
syslogfile directory and save it to the root directory as file log.txt.
<Huawei> pwd
flash:/syslogfile
<Huawei> unzip syslogfile-2012-02-27-17-47-50.zip flash:/log.txt
Extract flash:/syslogfile/syslogfile-2012-02-27-17-47-50.zip to flash:/log.txt?(y/n)[n]:y
100% complete
Decompressed file flash:/syslogfile/syslogfile-2012-02-27-17-47-50.zip flash
:/log.txt.
Related Topics
2.4.13 dir (user view)
2.4.41 pwd (user view)
2.4.58 user
Function
The user command changes the current FTP user when the local device is
connected to the FTP server.
Format
user user-name [ password ]
Parameters
Parameter Description Value
user-name Specifies the login The value is a string of 1 to 64 case-
password. insensitive characters without space.
password Specifies the login The value is a string of 1 to 16 case-sensitive
password. characters without space, single quotation
mark, or question mark.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the user command to change the current user on the FTP server.
Precautions
After you run the user command to change the current user, a new FTP
connection is set up, which is the same as that you specify in the ftp command.
Example
# Log in to the FTP server using the user name tom.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] user tom
331 Password required for tom.
Enter password:
230 User logged in.
Related Topics
2.4.23 ftp
2.4.59 verbose
Function
The verbose command enables the verbose function on the FTP client.
The undo verbose command disables the verbose function.
By default, the verbose function is enabled.
Format
verbose
undo verbose
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
After the verbose function is enabled, all FTP response messages are displayed on
the FTP client.
Example
# Enable the verbose function.
Related Topics
2.4.25 get (FTP client view)
2.4.37 put (FTP client view)
2.4.60 zip
Function
The zip command compresses a file.
Format
zip source-filename destination-filename
Parameters
Parameter Description Value
source- Specifies the The value is a string of 1 to 64 case-sensitive
filename name of a source characters without spaces in the [ drive ]
file to be [ path ] file name format.
compressed.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
You are advised to add : and / between the
storage device name and directory. Characters
~, *, /, \, :, ', " cannot be used in the directory
name.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The following describes the drive name.
● drive is the storage device and is named flash:.
The path can be an absolute path or relative path.
● flash:/my/test/ is an absolute path.
● selftest/ is related to the current working directory and indicates the selftest
directory in the current working directory.
Precautions
● If the destination file path is specified while the file name is not specified, the
designation file name is the same as the source file name.
● The source file persists after being compressed.
● Directories cannot be compressed.
Example
# Compress file log.txt that is stored in the root directory and save it to the test
directory as file log.zip.
<Huawei> dir
Directory of flash:/
Related Topics
2.4.13 dir (user view)
Function
The display current-configuration command displays the currently running
configuration.
This command does not display parameters that use default settings.
Format
display current-configuration [ configuration [ configuration-type
[ configuration-instance ] ] | interface [ interface-name | interface-type
[ interface-number ] ] ] [ feature feature-name [ filter filter-expression ] | filter
filter-expression ]
Parameters
Views
All views
Default Level
3: Management level
Usage Guidelines
To check whether the configured parameters take effect, run the display current-
configuration command. The parameters that do not take effect are not
displayed.
The command output is relevant to user configuration. The command does not
display the default configuration.
If the configuration is in the offline state. The offline configuration is marked with
* in the display current-configuration all and display current-configuration
inactive command output.
Example
# Display all configurations that include vlan.
<Huawei> display current-configuration | include vlan
vlan batch 10 77 88
port trunk allow-pass vlan 10
Function
The display reset-reason command displays device reset reasons.
Format
display reset-reason
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
If the device resets unexpectedly, you can run this command to view the device
reset reason to locate the fault.
Example
# Display device reset reasons.
<Huawei> display reset-reason
The MPU frame[0] board[0]'s reset total 1, detailed information:
-- 1. 2014-09-01 00:00:06, Reset No.: 1
Reason: Reset for power off
Item Description
Item Description
Reset for mfpi detect fwd abnormal The MSC module detects a PKO
module exception.
Reset for the radio type is different The radio type is different from that in
from that specified by the the configuration file.
configuration file
Reset for the radio type is changed The radio type is changed.
Reason Description
Reset for MFPI detect MSC module The MFPI module detects an MSC
abnormal module exception.
Reset for MFPI detect MSU module The MFPI module detects an MSU
abnormal module exception.
Reset for MFPI detect KAP module The MFPI module detects a KAP
abnormal module exception.
Reset for MFPI detect CAP pbuf use Resources in the forwarding pbuf pool
out are exhausted.
Reset for the undo ap command The AP is deleted using the undo ap
command.
Reset for the AP added to the blacklist The AP is added to the blacklist.
Reset for the CAPWAP link and AP The CAPWAP link and AP status are
status mismatch inconsistent.
Reset for a CAPWAP link fault The CAPWAP link status is abnormal.
Reason Description
Reset for restoration to factory The factory settings are restored using
defaults (by command) commands.
Reset for the ap-rename command The AP name is changed using the ap-
rename command.
Reset for the ap-regroup command The AP group to which the AP belongs
is changed using the ap-regroup
command.
Reset for a country code mismatch The country code does not match.
Reset for abnormal network port self- The faulty network port is self-healing.
healing
Reset for the radio type mismatch The radio types do not match on the
between the AP and AC AP and AC.
Reset for the DTLS configuration The DTLS configuration of the data
change of the data link link is changed.
Reset for the AC IP address list change The IP address list is changed on the
AC.
Reset for the address mode change The address mode is changed.
Reason Description
Reset for the version rollback because The AP does not go online after the
the AP does not go online 30 minutes online upgrade.
after the online upgrade
Reset for the online configuration The AP's online startup configuration
switching is switched.
When the AP fails to go online due to
incorrect configurations of the
management VLAN, working mode of
the wired interface, and IP address
allocation mode, the device
periodically checks the configurations.
If the configurations are inconsistent
with the last time, the online
configurations are switched to the
configurations used when the AP starts
last time, and the AP restarts. If the AP
still fails to go online, the online
configurations are switched to the
default configurations, and the AP
restarts.
Reset for a channel set switching The channel set used by the AP is
switched.
Reset for the proxy scanning mode The proxy scanning mode of the radio
switching is switched.
Function
The display startup command displays the patch file for the current and next
startup.
Format
display startup
Parameters
None
Views
All views
Default Level
3: Management level
Example
# Display the names of system software for current and next startup.
<Huawei> display startup
Current startup system software: V200R010C00SPC100(AP6510DN-AGN FIT)
Backup startup system software: V200R010C00(AP6510DN-AGN FIT)
Next startup system software: V200R010C00SPC100(AP6510DN-AGN FIT)
Startup patch package: NULL
Next startup patch package: NULL
Item Description
Current startup system software System software for the current startup
Next startup system software System software for the next startup
Related Topics
2.5.6 startup patch
2.5.4 reboot
Function
The reboot command restarts the device.
Format
reboot [ fast ]
Parameters
Parameter Description Value
fast Fast restarts the device. In fast restart mode, the -
configuration file is not saved.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
This command functions in the same way as a power recycle operation (power off
and then restart the device). The command enables you to restart the device
remotely.
● After the reboot command is run, if the current configuration is modified, the
system displays a message asking you whether to save the configuration
before a restart.
Info: The system is comparing the configuration, please wait................
Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/n]: Y
● After the reboot fast command is run, the system restarts quickly without
displaying any message and the configuration is lost.
● After the reboot fast command is run, the system displays the following
message:
Info: system is sync data now, please wait ...
The message indicates that the system is synchronizing internal data.
Precautions
● If you do not respond to the displayed message within the timeout period
after running this command, the system will return to the user view and the
device will not be restarted.
● This command interrupts services on the entire device. Therefore, do not use
this command when the device is running properly.
● Before restarting the device, ensure that the configuration file has been saved.
Example
# Restart the device.
<Huawei> reboot
Function
The reset factory-configuration command restarts a device and restores the
factory settings of the device.
Format
reset factory-configuration
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the device cannot work properly due to incorrect configurations, you can run the
reset factory-configuration command to restart the device and restore the
factory settings.
Precautions
Example
# Restore the factory settings of the device.
<Huawei> reset factory-configuration
Warning: All of configurations will restore to factory and restart, Are you sure
to continue? [y/n]: y
Function
The startup patch command specifies the patch file for next startup.
Format
startup patch patch-name
Parameters
Parameter Description Value
patch-name Specifies the name The value is a string of 4 to 64 case-sensitive
of the patch file for characters without spaces. It is in the format
next startup. of [ drive-name ] [ path ] [ file-name ]. If
drive-name is not specified, the name of the
default storage device is used.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To make the patch file take effect after the device restarts, run this command to
specify the patch file for next startup.
Follow-up Procedure
Precautions
● A patch file uses .pat as the file name extension and must be saved in the
root directory.
● If you use this command to specify another patch for next startup, the
previous patch will be overridden.
● After the patch file is specified for next startup, run the display startup
command to view the patch file.
– If the patch file for next startup is not empty, the device load the patch
automatically after next startup.
– If the patch file for next startup is empty, the device cannot load the
patch after next startup.
Example
# Specify the patch file for next startup.
<Huawei> startup patch patch.pat
Related Topics
2.5.3 display startup
2.5.4 reboot
Function
The reset patch-configure command clears the patch settings.
Format
reset patch-configure next-startup
Parameters
Parameter Description Value
next-startup Clears the patch status and settings for the next startup. -
Views
User view
Default Level
3: Management level
Usage Guidelines
If you run the reset patch-configure next-startup command, the system clears
the settings for the next startup patch and sets the patch status to idle.
Example
# Clear the patch status and settings for the next startup.
Function
The startup system-software command specifies the system software for next
startup.
Format
startup system-software { backup | current }
Parameters
Parameter Description Value
backup Specifies the backup system software as the system software
-
for next startup.
current Specifies the current system software as the system software
-
for next startup.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When the system needs to roll back to the backup system software, you can run
the startup system-software backup command to specify the backup system
software as the next startup system software and restart the device to complete
the rollback.
Follow-up Procedure
Precautions
Example
# Specify the backup system software as the system software for next startup.
<Huawei> startup system-software backup
Related Topics
2.5.3 display startup
2.5.4 reboot
2.6.1 ap-mode-switch
Function
The ap-mode-switch command obtains the system software file from the AP
backup area to switch AP running mode.
Format
ap-mode-switch { fat | cloud }
NOTE
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Example
# Switch the AP6050DN running mode from Fit AP to Fat AP.
<Huawei> system-view
[Huawei] ap-mode-switch fat
Warning: The system will reboot and start in fat mode of V200R010C00SPC100. All
of configurations will restore to factory. Continue? (y/n)[n]:y
Related Topics
2.6.2 ap-mode-switch check
2.6.3 ap-mode-switch ftp
2.6.5 ap-mode-switch sftp
Function
The ap-mode-switch check command checks whether the file system on an AP
allows switching between a fit AP and a fat AP.
NOTE
Format
ap-mode-switch check
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Before switching a fat AP to a fit AP or a fit AP to a fat AP, run this command to
check whether the file system on the AP allows switching between the fit AP and
fat AP. System software can be changed or upgraded only when the file system on
the device allows switching between the fit AP and fat AP.
NOTE
If the file system does not allow switching from a fit AP to a fat AP, run the 2.6.4 ap-mode-
switch prepare command to configure the file system to allow switching from a fit AP to a
fat AP.
Example
# Check whether the file system on a fat AP allows switching to a fit AP.
<Huawei> system-view
[Huawei] ap-mode-switch check
Info: Ap-mode-switch check ok.
Related Topics
2.6.4 ap-mode-switch prepare
Format
ap-mode-switch ftp filename server-ip-address user-name password [ port ]
ap-mode-switch { fat | cloud } ftpfilename server-ip-address user-name password
[ port ]
AP5030DN/AP5130DN/ Yes No
AP4030DN/AP4130DN/
AP5030DN-S/
AP3030DN/AP9131DN/
AP9132DN/AP4030DN-
E/AP3010DN-V2
AP2051DN/AP2051DN- No Yes
S/AP2051DN-E/
AP5050DN-S/AP4030TN/
AP6050DN/AP6150DN/
AP2050DN/AP2050DN-
S/AP2050DN-E/
AP4050DN-E/
AP4050DN-HD/
AP7050DN-E/AP7050DE/
AP8050DN/AP8150DN/
AP8050DN-S/
AP4050DN/AP4051DN/
AP4151DN/AP4050DN-
S/AP4051DN-S/
AP8030DN/AP8130DN/
AD9430DN-24/
AD9430DN-12/
AP1050DN-S/
AD9431DN-24X/
AP4050DE-M/AP4050DE-
M-S/AP4050DE-B-S/
AP3050DE/AP7060DN/
AP2051DN-L-S/AP5510-
W-GP
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To use the FTP server to switch a Fit AP to Fat AP or cloud AP, run the ap-mode-
switch ftp command to switch the system software file of the AP.
Prerequisites
The system software file has been uploaded to the FTP server.
It has been confirmed that the file system allows switching between a Fit AP and
a Fat AP using the 2.6.2 ap-mode-switch check command.
NOTE
Example
# Use the FTP server (192.168.1.1) to switch the AP5030DN running mode from
Fat AP to Fit AP.
<Huawei> system-view
[Huawei] ap-mode-switch ftp AP5030DN_V200R010C00.bin 192.168.1.1 admin admin
Warning: System will reboot, if you want to switch to upgrade-assistant-package.
Are you sure to execute these operations ? [Y/N]: y
# Use the FTP server (192.168.1.1) to switch the AP6050DN running mode from
Fit AP to Fat AP.
<Huawei> system-view
[Huawei] ap-mode-switch fat ftp AP6050DN_V200R010C00.bin 192.168.1.1 admin admin
Warning: The system will reboot and start in fat mode of V200R010C00. Continue ? [y/n]: y
Related Topics
2.6.2 ap-mode-switch check
2.6.6 ap-mode-switch tftp
2.6.5 ap-mode-switch sftp
Function
The ap-mode-switch prepare command configures the file system on a fit AP to
allow the fit AP to switch to a fat AP.
NOTE
Format
ap-mode-switch prepare
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Before switching a fit AP to a fat AP, run the ap-mode-switch check command to
check whether the file system on the fit AP allows the fit AP to switch to a fat AP.
If not, run the ap-mode-switch prepare command to configure the file system to
allow the fit AP to switch to a fat AP. Then connect the device to an FTP, TFTP, or
SFTP server and download the fat AP system software file from the server so that
the fit AP can switch to a fat AP.
NOTE
After the ap-mode-switch prepare command is executed, run the ap-mode-switch check
command again to ensure that the file system on the fit AP allows the fit AP to switch to a
fat AP.
Example
# Configure the file system on a fit AP to allow the fit AP to switch to a fat AP.
<Huawei> system-view
[Huawei] ap-mode-switch prepare
Info: Prepare is ok, Use ap-mode-switch command to switch to fat ap.
Related Topics
2.6.2 ap-mode-switch check
2.6.6 ap-mode-switch tftp
2.6.3 ap-mode-switch ftp
Format
ap-mode-switch { fat | cloud } sftp filename server-ip-address user-name
password [ port ]
AD9430DN-24/ No Yes
AD9430DN-12/
AD9431DN-24X/
AP2051DN/AP2051DN-
S/AP2051DN-E/
AP5050DN-S/
AP4050DN/AP4051DN/
AP4151DN/AP4050DN-
S/AP4051DN-S/
AP1050DN-S/AP4030TN/
AP6050DN/AP6150DN/
AP2050DN/AP2050DN-
S/AP2050DN-E/
AP4050DN-E/
AP4050DN-HD/
AP7050DN-E/AP7050DE/
AP4051TN/AP6052DN/
AP7052DN/AP7152DN/
AP7052DE/AP8050DN/
AP8150DN/AP8050DN-
S/AP8030DN/
AP8130DN/AP8050TN-
HD/AP8082DN/
AP8182DN/AP4050DE-
M/AP4050DE-M-S/
AP4050DE-B-S/
AP3050DE/AP7060DN/
AP2051DN-L-S/AP5510-
W-GP
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To use the SFTP server to switch a Fit AP to Fat AP or cloud AP, run the ap-mode-
switch sftp command to switch the system software file of the AP.
Prerequisites
The system software file has been uploaded to the SFTP server.
It has been confirmed that the file system allows switching between a Fit AP and
a Fat AP using the 2.6.2 ap-mode-switch check command.
NOTE
Example
# Use the SFTP server (192.168.1.1) to switch the AP5030DN running mode from
Fat AP to Fit AP.
<Huawei> system-view
[Huawei]ap-mode-switch sftp AP5030DN_V200R010C00.bin 192.168.1.1 admin admin
Warning: System will reboot, if you want to switch to upgrade-assistant-package.
Are you sure to execute these operations ? [Y/N]: y
# Use the SFTP server (192.168.1.1) to switch the AP6050DN running mode from
Fit AP to Fat AP.
<Huawei> system-view
[Huawei] ap-mode-switch fat sftp AP6050DN_V200R010C00.bin 192.168.1.1 admin admin
Warning: The system will reboot and start in fat mode of V200R010C00. Continue ? [y/n]: y
Related Topics
2.6.2 ap-mode-switch check
2.6.6 ap-mode-switch tftp
2.6.3 ap-mode-switch ftp
Function
The ap-mode-switch tftp command connects an AP to a TFTP server to download
the system software file for switching AP running mode.
Format
ap-mode-switch { fat | cloud } tftp filename server-ip-address
AP5030DN/AP5130DN/ Yes No
AP4030DN/AP4130DN/
AP5030DN-S/
AP3030DN/AP9131DN/
AP9132DN/AP4030DN-
E/AP3010DN-V2
AP8050DN/AP8150DN/ No Yes
AP8050DN-S/
AP4050DN/AP4051DN/
AP4151DN/AP4050DN-
S/AP4051DN-S//
AP1050DN-S/
AD9431DN-24X/
AP8030DN/AP8130DN/
AD9430DN-24/
AD9430DN-12/
AP8050TN-HD/
AP8082DN/AP8182DN/
AP2051DN/AP2051DN-
S/AP2051DN-E/
AP5050DN-S/AP4030TN/
AP6050DN/AP6150DN/
AP2050DN/AP2050DN-
S/AP2050DN-E/
AP4050DN-E/
AP4050DN-HD/
AP7050DN-E/AP7050DE/
AP4051TN/AP6052DN/
AP7052DN/AP7152DN/
AP7052DE/AP4050DE-M/
AP4050DE-M-S/
AP4050DE-B-S/
AP3050DE/AP7060DN/
AP2051DN-L-S/AP5510-
W-GP
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To use the TFTP server to switch a Fit AP to Fat AP or cloud AP, run the ap-mode-
switch tftp command to switch the system software file of the AP.
Prerequisites
The system software file has been uploaded to the TFTP server.
It has been confirmed that the file system allows switching between a Fit AP and
a Fat AP using the 2.6.2 ap-mode-switch check command.
NOTE
Example
# Use the TFTP server (192.168.1.1) to switch the AP5030DN running mode from
Fat AP to Fit AP.
<Huawei> system-view
[Huawei] ap-mode-switch tftp AP5030DN_V200R010C00.bin 192.168.1.1
Warning: System will reboot, if you want to switch to upgrade-assistant-package.
Are you sure to execute these operations ? [Y/N]: y
# Use the TFTP server (192.168.1.1) to switch the AP6050DN running mode from
Fit AP to Fat AP.
<Huawei> system-view
[Huawei] ap-mode-switch fat tftp AP6050DN_V200R010C00.bin 192.168.1.1
Warning: The system will reboot and start in fat mode of V200R010C00. Continue ? [y/n]: y
Related Topics
2.6.2 ap-mode-switch check
2.6.3 ap-mode-switch ftp
2.6.5 ap-mode-switch sftp
Format
display paf { all | { resource | service } item-name }
Parameters
Parameter Description Value
Views
All views
Default Level
3: Management level
Usage Guidelines
A PAF file provides only required resources and features. This command can
display all the specification information about the PAF file.
Example
# Display the value set for a resource item in the PAF file.
# Display the value set for a service item in the PAF file.
<Huawei> display paf service PAF_LCS_BFD_BASIC_SPECS_ENABLED
PAF_LCS_BFD_BASIC_SPECS_ENABLED = 0, 1
Item Description
Item Description
1 Service status.
● 1: enabled
● 0: disabled
Function
The display patch-information command displays information about the current
patch package in the system.
Format
display patch-information
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
After a patch is loaded or deleted, run this command to view information about
the patch package, including its version, name.
Example
# Display information about the current patch package.
<Huawei> display patch-information
Patch Package Name : flash:/patch.pat
Patch Package Version : V200R010C00SPH
The current state is:Running
******************************************************************
* The patch information, as follows *
******************************************************************
Type State Count Time(YYYY-MM-DD HH:MM:SS)
------------------------------------------------------------------
VRP Running 1 2020-07-04 18:51:04+00:00
Item Description
Related Topics
2.6.10 patch delete all
2.6.11 patch load
Function
The display upgrade failure-reason command displays the reasons for the latest
upgrade failure.
NOTE
Format
display upgrade failure-reason
Parameters
None
Views
System view
Default Level
1: Monitoring level
Usage Guidelines
Run the display upgrade failure-reason command to check causes of upgrade
failures so that you can take corresponding measures to fix the error.
Message Description
Error: Upgrade failed by Failure in configuring the IP address for the AP.
configuring ip address.
Message Description
Error: Upgrade failed by type Unmatch between the upgrade file and AP type.
mismatched. If this error message is displayed, check whether
the upgrade file is correct.
Error: Upgrade failed by md5 CRC error. If this message is displayed, check
or crc check. whether data is modified or lost during
transmission.
Error: Upgrade failed by Failure in writing the upgrade file into the flash
writing flash. memory.
Example
# Display the reasons for the latest upgrade failure.
<Huawei> system-view
[Huawei] display upgrade failure-reason
Info: Connecting to remote server failed!
Function
The patch delete all command deletes patches on the current system.
Format
patch delete all
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
● If you find errors in patches that have been loaded to the system, run this
command to delete the patches to prevent patch errors from affecting system
operating.
● Before loading a non-incremental patch, run this command to delete the
existing patches (if any). Otherwise, the non-incremental patch cannot be
loaded.
Example
# Delete all patches.
<Huawei> patch delete all
The patch will be deleted. Continue? (y/n)[n]:y
Related Topics
2.6.8 display patch-information
Function
The patch load command loads the patches to the patch areas in the system.
Format
patch load filename all run
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When you load a patch to the current system, the system searches the patch
package for a matching patch file according to the attributes of the patch file.
● If a matching patch file is found in the patch package, the system loads the
patch.
● If no matching patch file is found in the patch package, the system does not
load any patch.
Prerequisites
The patch package has been uploaded to the root directory of the storage device.
Before loading a patch, the system must resolve the patch package, check the
validity of the patch files in the patch package, and obtain the attributes such as
the patch type and version of the patch file.
Precautions
The patch file cannot be reloaded. When you reload a patch, the system displays
an error message.
Example
# Load the patches to the patch area of the device and run the patches directly.
<Huawei> patch load patch.pat all run
Related Topics
2.6.10 patch delete all
2.5.6 startup patch
2.6.8 display patch-information
Function
The upgrade version check command checks whether the upgrade assistant
package is available before a device upgrade.
NOTE
Format
upgrade version check
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Before you upgrade a fat AP or fit AP (not by the AC), run this command to check
whether the upgrade assistant package is available. You can upgrade a fat AP or
fit AP using the available upgrade assistant package.
NOTE
If the upgrade assistant package is not available, contact technical support personnel and
update the upgrade assistant package under their guidance.
Example
# Check whether the upgrade assistant package is available.
<Huawei> system-view
[Huawei] upgrade version check
Info: Upgrade version check ok.
Related Topics
2.6.15 upgrade version tftp
2.6.13 upgrade version ftp
2.6.14 upgrade version sftp
Format
upgrade version ftp filename server-ip-address user-name password [ port ]
[ signature signature-name ]
upgrade version ftp filename ipv6 server-ipv6-address user-name password
[ port ] [ signature signature-name ]
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run this command to upgrade a Fit AP (not by the AC) using the upgrade
assistant package on an FTP server.
Prerequisites
The upgrade assistant package has been uploaded to the FTP server.
It has been confirmed that the upgrade assistant package can be used using the
2.6.12 upgrade version check command.
NOTE
You need to run the command to check whether the upgrade assistant package can be
used for the AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP6010DN-AGN,
AP5010SN-GN and AP9132DN.
Example
# Upgrade the AP using the upgrade assistant package on the FTP server
192.168.1.1.
<Huawei> system-view
[Huawei] upgrade version ftp AP5030DN_V200R006C10.bin 192.168.1.1 admin admin
Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/n]:y
Warning: System will reboot, if you want to switch to upgrade-assistant-package.
Are you sure to execute these operations ? [Y/N]:y
# Upgrade the AP using the FTP server with the IPv6 address 1000::1.
<Huawei> system-view
[Huawei] upgrade version ftp AP6010DN_V200R006C10.bin ipv6 1000::1 admin admin
Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/n]:y
Warning: System will reboot, if you want to switch to upgrade-assistant-package.
Are you sure to execute these operations ? [Y/N]:y
Related Topics
2.6.12 upgrade version check
2.6.15 upgrade version tftp
2.6.14 upgrade version sftp
Format
upgrade version sftp filename server-ip-address user-name password [ port ]
[ signature signature-name ]
upgrade version sftp filename ipv6 server-ipv6-address user-name password
[ port ] [ signature signature-name ]
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run this command to upgrade a Fit AP (not by the AC) using the upgrade
assistant package on an SFTP server.
Prerequisites
The upgrade assistant package has been uploaded to the SFTP server.
It has been confirmed that the upgrade assistant package can be used using the
2.6.12 upgrade version check command.
NOTE
You need to run the command to check whether the upgrade assistant package can be
used for the AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP6010DN-AGN,
AP5010SN-GN and AP9132DN.
Example
# Upgrade the AP using the upgrade assistant package on the SFTP server
192.168.1.1.
<Huawei> system-view
[Huawei] upgrade version sftp AP8030DN_V200R006C10.bin 192.168.1.1 admin admin
Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/n]:y
Warning: System will reboot, if you want to switch to upgrade-assistant-package.
Are you sure to execute these operations ? [Y/N]:y
# Upgrade the AP using the SFTP server with the IPv6 address 1000::1.
<Huawei> system-view
[Huawei] upgrade version sftp AP6010DN_V200R006C10.bin ipv6 1000::1 admin admin
Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/n]:y
Warning: System will reboot, if you want to switch to upgrade-assistant-package.
Are you sure to execute these operations ? [Y/N]:y
Related Topics
2.6.12 upgrade version check
2.6.13 upgrade version ftp
2.6.15 upgrade version tftp
Format
upgrade version tftp filename server-ip-address [ signature signature-name ]
upgrade version tftp filename ipv6 server-ipv6-address [ signature signature-
name ]
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run this command to upgrade a Fit AP (not by the AC) using the upgrade
assistant package on a TFTP server.
Prerequisites
The upgrade assistant package has been uploaded to the TFTP server.
It has been confirmed that the upgrade assistant package can be used using the
2.6.12 upgrade version check command.
NOTE
You need to run the command to check whether the upgrade assistant package can be
used for the AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP6010DN-AGN,
AP5010SN-GN and AP9132DN.
Example
# Upgrade the AP using the upgrade assistant package on the TFTP server
192.168.1.1.
<Huawei> system-view
[Huawei] upgrade version tftp AP5030DN_V200R006C10.bin 192.168.1.1
Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/n]:y
Warning: System will reboot, if you want to switch to upgrade-assistant-package.
Are you sure to execute these operations ? [Y/N]:y
# Upgrade the AP using the TFTP server with the IPv6 address 1000::1.
<Huawei> system-view
[Huawei] upgrade version tftp AP6010DN_V200R006C10.bin ipv6 1000::1
Warning: All the configuration will be saved to the next startup configuration. Continue ? [y/n]:y
Related Topics
2.6.12 upgrade version check
2.6.13 upgrade version ftp
2.6.14 upgrade version sftp