0% found this document useful (0 votes)
85 views

01-02 Basic Configurations Commands

The document discusses basic configuration commands for a Fit AP device. It covers commands for clearing the screen, entering diagnostic view, displaying historical commands, and displaying the current configuration. It also describes commands for configuring header information and files displayed upon user login.

Uploaded by

Lukman Setiawan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views

01-02 Basic Configurations Commands

The document discusses basic configuration commands for a Fit AP device. It covers commands for clearing the screen, entering diagnostic view, displaying historical commands, and displaying the current configuration. It also describes commands for configuring header information and files displayed upon user login.

Uploaded by

Lukman Setiawan
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 227

Fit AP

Command Reference 2 Basic Configurations Commands

2 Basic Configurations Commands

About This Chapter

2.1 CLI Overview Commands


2.2 UI Configuration Commands
2.3 User Login Configuration Commands
2.4 File Management Commands
2.5 Configuring System Startup Commands
2.6 Upgrade Commands

2.1 CLI Overview Commands

2.1.1 cls

Function
The cls command clears the current screen.

Format
cls

Parameters
None

Views
User view

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 11


Fit AP
Command Reference 2 Basic Configurations Commands

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]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 12


Fit AP
Command Reference 2 Basic Configurations Commands

2.1.3 display history-command


Function
The display history-command command displays the historical commands stored
on the current device.

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.

You can view historical commands using the following methods:


● To view the previous historical command, press the Up arrow key or Ctrl+P.
If there is an earlier historical command, the earlier historical command is
displayed.
● To view the next historical command, press the Down arrow key or Ctrl+N.
If there is a new historical command, the new historical command is
displayed.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 13


Fit AP
Command Reference 2 Basic Configurations 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

2.1.4 display this


Function
The display this command displays the running configuration in the current view.

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 a configuration parameter uses the default value, this parameter is not


displayed. Configurations of the functions that do not take effect are not
displayed.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 14


Fit AP
Command Reference 2 Basic Configurations Commands

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.

The undo header command deletes the header information displayed on a


terminal when users log in to a connected device.

By default, no header information is displayed on terminals when users log in to a


connected device.

Format
header { login | shell } { information text | file file-name }

undo header { login | shell }

Parameters

Parameter Description Value


login Indicates header -
information displayed on
a terminal when a user
logs in to the device and a
connection between the
terminal and the device is
activated.
shell Indicates the header -
displayed on a terminal
when the session is set up
after the user logs in to
the connected device.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 15


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


information Specifies the header and The value is a string with spaces
text content. and carriage returns supported. The
maximum length of the string that
can be entered at one time is 480
characters, if a linefeed is contained
in the first line. If no linefeed is
contained in the first line, a
maximum of 510 characters can be
entered at one time, and the total
string length ranges from 1 to 2038
characters.
file file-name Specifies the file name The value is a string of 5 to 64
that the header uses. characters. The maximum header
file size is 128 KB. If the file size is
greater than 128 KB, only the first
128 KB file information can be
displayed.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 16


Fit AP
Command Reference 2 Basic Configurations Commands

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

# Display the shell header if the login succeeds.


Hello! Welcome to system!

# Configure a shell header (interactive process).


<Huawei> system-view
[Huawei] header shell information % # Press Enter after entering the start character '%' to start the
interactive process.
Info: Input banner text, and quit with the character '%'. Hello!
Welcome to system!%
[Huawei] quit
<Huawei> quit # Log off.

# Press Enter. The shell header is displayed when the user logs in again.
Hello!
Welcome to system!
<Huawei>

# Specify the file that stores a login header.


<Huawei> system-view
[Huawei] header login file flash:/header-file.txt

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 17


Fit AP
Command Reference 2 Basic Configurations Commands

2.1.6 display hotkey


Function
The display hotkey command displays the status of the defined, undefined, and
system hotkeys.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 18


Fit AP
Command Reference 2 Basic Configurations Commands

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

Table 2-1 Description of the display hotkey command output

Item Description

Defined hotkeys Defined hotkeys.

Undefined hotkeys Undefined hotkeys.

System hotkeys System hotkeys.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 19


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


CTRL_O Specifies the shortcut key Ctrl+O for a -
command.
CTRL_U Specifies the shortcut key Ctrl+U for a -
command.
command-text Specifies the associated command line for The value is a string
shortcut keys. of 1 to 240
characters.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 20


Fit AP
Command Reference 2 Basic Configurations Commands

<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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 21


Fit AP
Command Reference 2 Basic Configurations Commands

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 22


Fit AP
Command Reference 2 Basic Configurations Commands

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 23


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.2 UI Configuration Commands

2.2.1 acl (user interface view)

Function
The acl command uses an ACL to restrict login rights of users on a terminal.

The undo acl command cancels the configuration.

By default, login rights are not restricted.

Format
acl [ ipv6 ] acl-number { inbound | outbound }

undo acl [ ipv6 ] { inbound | outbound }

Parameters
Parameter Description Value
ipv6 Indicates an ACL6 number. -

acl-number Specifies the number of an ACL. The value is an integer ranging


from 2000 to 3999.
● 2000-2999: restricts the
source address using the
basic ACL.
● 3000-3999: restricts the
source and destination
addresses using the
advanced ACL.

inbound Restricts users with an address or -


within an address segment to log
in to the device.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 24


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


outbound Restricts users that have logged in -
to the device from logging in to
other devices.

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

2.2.2 auto-execute command


Function
The auto-execute command command configures auto-run commands.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 25


Fit AP
Command Reference 2 Basic Configurations Commands

The undo auto-execute command command cancels auto-run commands.


By default, the auto-run function is disabled.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 26


Fit AP
Command Reference 2 Basic Configurations Commands

[Huawei-ui-vty0] auto-execute command telnet 10.110.100.1


Warning: The system will not be configured through ui-vty0.Continue? [Y/N]: y

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 27


Fit AP
Command Reference 2 Basic Configurations Commands

[Huawei-ui-console0] databits 7

2.2.4 display mib-index interface


Function
The display mib-index interface command displays the index value of an
interface in the MIB.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 28


Fit AP
Command Reference 2 Basic Configurations Commands

Wlan-Capwap0 7 1
Wlan-Radio0/0/0 9 --
Wlan-Radio0/0/1 4 --

Table 2-2 Description of the display mib-index interface command output

Item Description

IfName Interface name.

IfIndex Index value of an interface.

PortIndex Index value of a port.

2.2.5 display user-interface

Function
The display user-interface command displays information about a user interface.

Format
display user-interface [ ui-type ui-number1 | ui-number ] [ summary ]

Parameters

Parameter Description Value


ui-type Displays information about a The value can be Console or VTY.
specified user interface.
ui-number1 Displays information about a The minimum value is 0. The
user interface with a specified maximum value is smaller by 1
relative number. than the number of user interfaces
the system supports.
ui-number Displays information about a The value is an integer ranging
user interface with a specified from 0 to 25. The value varies
absolute number. according to the device type.

summary Displays the summary of a -


user interface.

Views
All views

Default Level
1: Monitoring level

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 29


Fit AP
Command Reference 2 Basic Configurations Commands

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.

# Display detailed information about all user interfaces.


<Huawei> display user-interface
Idx Type Tx/Rx Modem Privi ActualPrivi Auth Int
+ 0 CON 0 9600 - 15 15 P -
+ 129 VTY 0 - 0 15 A -
130 VTY 1 - 0 0 A -
131 VTY 2 - 0 0 A -
132 VTY 3 - 0 0 A -
133 VTY 4 - 0 0 A -
145 VTY 16 - 0 0 A -
146 VTY 17 - 0 0 A -
147 VTY 18 - 0 0 A -
148 VTY 19 - 0 0 A -
149 VTY 20 - 0 0 A -
150 Web 0 - 15 0 A -
151 Web 1 - 15 0 A -
152 Web 2 - 15 0 A -
153 Web 3 - 15 0 A -
154 Web 4 - 15 0 A -
155 XML 0 - 0 0 A -
156 XML 1 - 0 0 A -
157 XML 2 - 0 0 A -
+ 168 XML 0 - 15 15 N -
UI(s) not in async mode -or- with no hardware support:
1-128
+ : 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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 30


Fit AP
Command Reference 2 Basic Configurations Commands

Table 2-3 Description of the display user-interface command output

Parameter Description

+ Active user interface.

Idx Absolute number of a user interface.

Type Type and relative number of a user interface.


● CON: Login through the console port
● VTY: Login through Telnet or SSH.
● Web: Login through the web platform
● XML: Login through the upper-layer NMS, which
communicates with the local device using
NETCONF

Tx/Rx Data transfer rate of the user interface.

Modem Type of the modem. The value - indicates that the


hardware does not support the modem.

Privi Authority configured on a user interface.

ActualPrivi Actual permission of a user interface. In the case of


the AAA authentication mode, the level of a local
user in AAA configuration is the actual permission.

Auth Authentication mode on a user interface.


● A: AAA authentication.
● N: No authentication on the current user
interface.
● P: Password authentication.

Int User interface.

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.

2.2.6 display user-interface maximum-vty

Function
The display user-interface maximum-vty command displays the maximum
number of VTY users.

Format
display user-interface maximum-vty

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 31


Fit AP
Command Reference 2 Basic Configurations Commands

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

Table 2-4 Description of the display user-interface maximum-vty command output

Parameter Description

Maximum of VTY user Maximum number of VTY users.


The maximum number of VTY users can be
configured using the user-interface maximum-
vty command.

Related Topics
2.2.22 user-interface maximum-vty

2.2.7 display users

Function
The display users command displays login information for each user interface.

Format
display users [ all ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 32


Fit AP
Command Reference 2 Basic Configurations Commands

Parameters

Parameter Description Value


all Displays information about all users who log in to the device -
through user interfaces, including information about user
interfaces that are not used. If the all parameter is not used,
the command displays only information about user interfaces
that have been connected.

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

Table 2-5 Description of the display users command output

Item Description

+ Terminal line in use.

User-Intf The number in the first column indicates the absolute


number of the user interface, and the number in the second
column indicates the relative number of the user interface.

Delay Interval from the user's latest input to the current time, in
seconds.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 33


Fit AP
Command Reference 2 Basic Configurations Commands

Item Description

Type Connection type.


● Console
● Telnet
● SSH
● Web

Network Indicates the initial connection location.


Address

Username User name for logging in to the device. If the user name is
not specified, Unspecified is displayed.

AuthenStatus Whether the authentication succeeds.

AuthorcmdFlag Command line authorization status.

2.2.8 display vty lines


Function
The display vty lines command lists the number of rows displayed on the VTY
screen.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 34


Fit AP
Command Reference 2 Basic Configurations Commands

Related Topics
2.2.15 screen-length

2.2.9 display vty mode

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.

2.2.10 free user-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 }

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 35


Fit AP
Command Reference 2 Basic Configurations Commands

Parameters

Parameter Description Value


ui-number Specifies the absolute The value is an integer ranging from 0
number of a user interface. to 25. The value varies according to the
device type.

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

The free user-interface command cannot be executed on the current user


interface. For example, if the current user interface is VTY 2, the free user-
interface vty 2 command fails to be executed on VTY 2 and an error message is
displayed.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 36


Fit AP
Command Reference 2 Basic Configurations Commands

2.2.11 history-command max-size

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.

By default, a maximum of 10 previously-used commands can be saved in the


buffer.

Format
history-command max-size size-value

undo history-command max-size

Parameters

Parameter Description Value


size-value Specifies the size of the historical The value is an integer ranging
command buffer. from 0 to 256.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 37


Fit AP
Command Reference 2 Basic Configurations Commands

2.2.12 idle-timeout

Function
The idle-timeout command sets the timeout duration for disconnection from a
user interface.

The undo idle-timeout command restores the default timeout duration.

By default, the timeout duration is 5 minutes.

Format
idle-timeout minutes [ seconds ]

undo idle-timeout

Parameters

Parameter Description Value


minutes Specifies the idle timeout The value is an integer ranging from
duration, in minutes. 0 to 35791, in minutes.
seconds Specifies the idle timeout The value is an integer ranging from
duration, in seconds. 0 to 59, in seconds.

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

● To disable the user interface disconnection function, run the idle-timeout 0 0


command.
● If the user interface disconnection function is not configured, user connection
will never times out, bringing security risks, and other users may fail to log in
to the device.
● You are advised to set the timeout duration to 10-15 minutes.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 38


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.2.13 mmi-mode enable


Function
The mmi-mode enable command enters the machine-to-machine mode.
The undo mmi-mode enable command enters the man-to-machine mode.
By default, a user is in man-to-machine mode.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 39


Fit AP
Command Reference 2 Basic Configurations Commands

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

The undo parity command disables the parity check.

By default, no parity check is configured.

Format
parity { even | none | odd }

undo parity

Parameters

Parameter Description Value


even Specifies even parity check. -
none Specifies no parity check. -
odd Specifies odd parity check. -

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 40


Fit AP
Command Reference 2 Basic Configurations Commands

2.2.15 screen-length

Function
The screen-length command sets the number of lines on each terminal screen
after you run a command.

The undo screen-length command restores the default configuration.

By default, the number of lines to be displayed on a terminal screen is 24.

Format
screen-length screen-length [ temporary ]

undo 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)

0: Visit level (user 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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 41


Fit AP
Command Reference 2 Basic Configurations Commands

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 42


Fit AP
Command Reference 2 Basic Configurations Commands

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.

The undo shell command disables terminal services on a user interface.

By default, terminal services are enabled on all user interfaces.

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.

To configure or maintain the parameters of a user interface, the undo shell


command can be used to disable terminal services on the user interface. During
this period, you cannot log in to the device using the interface. After completing
the configuration for the parameters of the user interface, the shell command
must be used to enable terminal services on the user interface. Otherwise,
authorized users may fail to log in to the device through the interface.

Implementation Procedure

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 43


Fit AP
Command Reference 2 Basic Configurations Commands

When the undo shell command is executed, determine whether to disable


terminal services on the user interface when the system displays a message like
Warning: ui-vty0-4 will be disabled. Continue? [Y/N]:. Users may fail to log in
to the device through the port after the terminal services are disabled. Exercise
caution before disabling terminal interfaces on a user interface.
Precautions
After the undo shell command is executed in the VTY user interface view to
disable terminal services on the VTY user interface, users cannot log in to the
device using Telnet, STelnet, and SFTP through the VTY user interface.
The undo shell command cannot be used in the interface view through which the
user logs in.
The console user interface does not support this command.

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

2.2.18 speed (user interface view)


Function
The speed command sets the data transfer rate of a user interface.
The undo speed command restores the default data transfer rate of a user
interface.
By default, the data transfer rate is 9600 bit/s.

Format
speed speed-value
undo speed

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 44


Fit AP
Command Reference 2 Basic Configurations Commands

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.

By default, the stop bit is 1.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 45


Fit AP
Command Reference 2 Basic Configurations Commands

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.

If the stop bit is 1.5, the corresponding data bit is 5.

If the stop bit is 2, the corresponding data bit is 6, 7, or 8.

This function takes effect for only serial interfaces.

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 ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 46


Fit AP
Command Reference 2 Basic Configurations Commands

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.

first-ui- Specifies the number of the first user ● If ui-type is set to


number interface. console, the first-ui-
number value is 0.
● If ui-type is set to vty,
the first-ui-number
value ranges from 0 to
the maximum number
of VTY user interfaces.
last-ui- Specifies the number of the last user -
number interface. When you select this
parameter, you enter multiple user
interface views at the same time.
This parameter is valid only when ui-
type is set to VTY. The last-ui-number
value must be larger than the first-
ui-number number.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 47


Fit AP
Command Reference 2 Basic Configurations Commands

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.

Table 2-6 Absolute and relative numbers of user interfaces


User Description Absolute Relative Number
Interface Number

Console Manages and controls 0 0


user users that log in to the
interface device using the console
interface.

VTY user Manages and controls 5 to 19 The first one is VTY 0,


interface users that log in to the the second one is VTY
device using Telnet or 1, and so forth.
SSH. Absolute numbers 5 to
19 map relative
numbers VTY 0 to VTY
14.

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]

# Enter the VTY 1 user interface.


<Huawei> system-view
[Huawei] user-interface vty 1
[Huawei-ui-vty1]

# Enter the VTY 1 to VTY 3 user interfaces.


<Huawei> system-view
[Huawei] user-interface vty 1 3
[Huawei-ui-vty1-3]

Related Topics
2.2.5 display user-interface

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 48


Fit AP
Command Reference 2 Basic Configurations Commands

2.2.21 user-interface current

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

2.2.22 user-interface maximum-vty

Function
The user-interface maximum-vty command configures the maximum number of
login users.

The undo user-interface maximum-vty command restores the default maximum


number of login users.

By default, the maximum number of Telnet and SSH users is 5.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 49


Fit AP
Command Reference 2 Basic Configurations Commands

Format
user-interface maximum-vty number

undo user-interface maximum-vty

Parameters

Parameter Description Value


number Specifies the maximum number of The value is an integer ranging
Telnet and SSH users. from 0 to 15.

Views
System view

Default Level
3: Management level

Usage Guidelines
Usage Scenario

The user-interface maximum-vty command configures the maximum number of


login users.

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

2.3 User Login Configuration Commands

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 50


Fit AP
Command Reference 2 Basic Configurations Commands

2.3.1 display rsa local-key-pair public


Function
The display rsa local-key-pair public command displays the public key in the
local key pair.

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

Time of Key pair created: 2011-10-06 16:26:37+00:00


Key name: Host
Key type: RSA encryption Key
=====================================================

Key code:
3047
0240
D538B7FC 3AFE1F5B F6C921F9 3D8C5322
905F623A
F0123161 3DA61EEB F5E897CF DC126060
546CC84E
B2AB7424 3EFF5D71 D84C5FE2 3E2BF5B3
D82DD979
A22E4AA1
0203
010001

=====================================================

Time of Key pair created: 2011-10-06 16:26:53+00:00


Key name: Server

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 51


Fit AP
Command Reference 2 Basic Configurations Commands

Key type: RSA encryption Key


=====================================================

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.

Key name The value can be the host or server public


key. The server public key is saved only
when the key type is RSA.

Key type Type of the public key.

Key code Code of the public key.

Related Topics
2.3.17 rsa local-key-pair create

2.3.2 display rsa peer-public-key

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 52


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


name key-name Specifies the key name. The value is a string of 1 to 30
case-insensitive characters
without spaces.

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

Bits Bits in the public key.

Name Name of the public key.

# 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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 53


Fit AP
Command Reference 2 Basic Configurations Commands

0203
010001

Table 2-9 Description of the display rsa peer-public-key name command output
Item Description

Key name Name of the public key.

Key Code Code of the public key.

Related Topics
2.3.19 rsa peer-public-key

2.3.3 display ssh server


Function
The display ssh server command displays the SSH server information.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 54


Fit AP
Command Reference 2 Basic Configurations Commands

SSH connection timeout :120 seconds


SSH server key generating interval :0 hours
SSH Authentication retries :3 times
SFTP Server :Enable
Stelnet server :Enable

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.

SSH Authentication retries Number of times for retrying SSH authentication.


The default value is 3.
Run the ssh server authentication-retries
command to set this item.

SFTP Server Status of the SFTP server. By default, it is enabled.

Stelnet server Status of the STelnet server. By default, it is


enabled.

# Display the current session connection information on the SSH server.


<Huawei> display ssh server session
--------------------------------------------------------------------
Conn Ver Encry State Auth-type Username
--------------------------------------------------------------------
VTY 0 2.0 AES128_CBC run password john
--------------------------------------------------------------------

Table 2-11 Description of the display ssh server session command output

Item Description

Conn VTY connection.

Ver Version number.

Encry Encryption mode: 3DES_CBC,


AES128_CBC, AES256_CBC,
AES128_CTR, and AES256_CTR

State Session status on the SSH server.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 55


Fit AP
Command Reference 2 Basic Configurations Commands

Item Description

Auth-type Authentication mode for an SSH user.


The options are as follows:
● password
● rsa
● password-rsa (password and RSA)
● ecc
● password-ecc (password and ecc)
● all (password, ECC, or RSA)
Run the ssh user authentication-type
command to set this item.

Username User name for SSH server


authentication.

Related Topics
2.3.30 ssh server port

2.3.4 display ssh user-information

Function
The display ssh user-information command displays the configuration of all SSH
users.

Format
display ssh user-information [ username ]

Parameters

Parameter Description Value


username Displays the SSH user The value is a string of 1 to 64 case-
name. insensitive characters without spaces.

Views
All views

Default Level
1: Monitoring level

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 56


Fit AP
Command Reference 2 Basic Configurations Commands

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

Table 2-12 Description of the display ssh user-information command output

Item Description

Username SSH user name.

Auth-type Authentication mode for an SSH user. The options


are as follows:
● password
● rsa
● password-rsa (password and RSA)
● all (password or RSA)
Run the ssh user authentication-type command
to set this item.

User-public-key-name Peer RSA public key assigned to an SSH user.


Run the rsa peer-public-key command to set this
item.

Related Topics
2.3.19 rsa peer-public-key
2.3.36 ssh user authentication-type

2.3.5 display telnet server status

Function
The display telnet server status command displays the status and configuration
of the Telnet server.

Format
display telnet server status

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 57


Fit AP
Command Reference 2 Basic Configurations Commands

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

TELNET IPV4 server IPv4 Telnet server.

TELNET IPV6 server IPv6 Telnet server.

TELNET server port Listening port number of the Telnet


server.

2.3.6 display telnet-client

Function
The display telnet-client command displays the source parameters when the
device works as a Telnet client.

Format
display telnet-client

Parameters
None

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 58


Fit AP
Command Reference 2 Basic Configurations Commands

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

Table 2-14 Description of the display telnet-client command output

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.

2.3.7 display ecc local-key-pair public

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 59


Fit AP
Command Reference 2 Basic Configurations Commands

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

Host public key for PEM format code:


---- BEGIN SSH2 PUBLIC KEY ----
AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAHOHl7zuEPN
kXZIHXDvj87OhRhbMu1fUp6dxNFu3xpfbmOJEKri1HT9nafwWrEjmvPuZJ8Lr5mg
y/Vb4xmy0Y7euwF8Y0abxioiVj6uoL1Ib5UkhVnH7yTZadERCTu/J/dw5wPiirq7
NX5bKO8EzOqTHIHH1+vYV5exzQXZtJdW2REm6Q==
---- END SSH2 PUBLIC KEY ----

Public key code for pasting into OpenSSH authorized_keys file :


ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBAHOHl7z
uEPNkXZIHXDvj87OhRhbMu1fUp6dxNFu3xpfbmOJEKri1HT9nafwWrEjmvPuZJ8Lr5mgy/Vb4xmy0Y7e
uwF8Y0abxioiVj6uoL1Ib5UkhVnH7yTZadERCTu/J/dw5wPiirq7NX5bKO8EzOqTHIHH1+vYV5exzQXZ
tJdW2REm6Q== ecdsa-key

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.

Key name Name of the public key in the local ECC


key pair.

Key modulus Length of the public key in the local ECC


key pair on a client.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 60


Fit AP
Command Reference 2 Basic Configurations Commands

Item Description

Key type Type of the public key in the local ECC


key pair. "ECC encryption Key" indicates
an ECC public key.

Key code Code of the public key in the local ECC


key pair configured using the ecc local-
key-pair create command.

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

2.3.8 display ecc peer-public-key

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

Parameter Description Value


brief Displays the brief information about -
the ECC public key configured on the
remote end.
name key-name Displays information about an ECC The value is a string of 1
public key with a specified name to 30 case-sensitive
configured on the remote end. characters, spaces not
supported.

Views
All views

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 61


Fit AP
Command Reference 2 Basic Configurations Commands

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

Table 2-16 Description of the display ecc peer-public-key command output


Item Description

Bits Length of the ECC public key configured


on the remote end.

Name Name of the ECC public key configured


on the remote end.

Key name Name of the ECC public key configured


on the remote end.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 62


Fit AP
Command Reference 2 Basic Configurations Commands

Item Description

Encoding type Encoding type of the ECC public key


configured on the remote end.
● OPENSSH
If OpenSSH is specified, data is Base64
encoded.
OpenSSH is derived from PEM.
● PEM
If PEM is specified, data is Base64
encoded.
● DER
If DER is specified, data is Base16
encoded.

Key Code Code of the public key in the local ECC


key pair configured using the ecc local-
key-pair create command.

Related Topics
2.3.11 ecc peer-public-key

2.3.9 ecc local-key-pair create

Function
The ecc local-key-pair create command generates a local Elliptic Curves
Cryptography (ECC) host key pair.

By default, no local ECC host key pair exists in the system.

Format
ecc local-key-pair create

Parameters
None

Views
System view

Default Level
3: Management level

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 63


Fit AP
Command Reference 2 Basic Configurations Commands

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

Perform other SSH configurations.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 64


Fit AP
Command Reference 2 Basic Configurations Commands

Related Topics
2.3.10 ecc local-key-pair destroy
2.3.7 display ecc local-key-pair public

2.3.10 ecc local-key-pair destroy


Function
The ecc local-key-pair destroy command deletes the local Elliptic Curves
Cryptography (ECC) keys.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 65


Fit AP
Command Reference 2 Basic Configurations Commands

Info: The name of the key which will be destroyed is Huawei_Host_ECC.


Warning: These keys will be destroyed. Continue? [Y/N]:Y
Info: Succeeded in destroying the ECC host keys.

Related Topics
2.3.9 ecc local-key-pair create

2.3.11 ecc peer-public-key


Function
The ecc peer-public-key command creates an ECC public key and enters the
Elliptic Curves Cryptography (ECC) public key view.
The undo ecc peer-public-key command deletes an ECC public key.
By default, no ECC public key is created.

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.

openssh Specifies OpenSSH as the encoding type of -


an ECC public key.
If OpenSSH is specified, data is Base64
encoded.
OpenSSH is derived from PEM.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 66


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


pem Specifies PEM as the encoding type of an -
ECC public key.
If PEM is specified, data is Base64 encoded.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 67


Fit AP
Command Reference 2 Basic Configurations Commands

[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

# Delete an ECC public key.


<Huawei> system-view
[Huawei] undo ecc peer-public-key ecc-peer-key
Warning: The public key named ecc-peer-key will be deleted. Continue? [Y/N]:Y

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 68


Fit AP
Command Reference 2 Basic Configurations Commands

● The passwords must meet the following requirements:


– The password is a string of 8 to 128 case-sensitive characters.
– The password must contain at least two of the following characters:
upper-case character, lower-case character, digit, and special character.
The special characters include spaces and the following:
`~!@#$%^&*()-_=+\|[{}];:'",<.>/?
● Password entered in interactive mode is not displayed on the screen.
● When you run the lock command to lock the user interface and set a locking
password, you can press CTRL_C to cancel the operation.
● To unlock the user interface, press Enter, and then input the correct password
as prompted by the system.

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:

# Enter the correct password and return to the user view.


<Huawei>

2.3.13 matched upper-view


Function
The matched upper-view command allows the system to search for the undo
command in the upper view, and returns to the upper view.
The undo matched upper-view command prohibits the system from searching for
the undo command in the upper view.
By default, the system does not search for the undo command in the upper view.

Format
matched upper-view
undo matched upper-view

Parameters
None

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 69


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.14 peer-public-key end

Function
The peer-public-key end command returns to the system view from the public
key view and saves the configured public keys.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 70


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.15 public-key-code begin


Function
The public-key-code begin command displays the public key editing view.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 71


Fit AP
Command Reference 2 Basic Configurations Commands

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 72


Fit AP
Command Reference 2 Basic Configurations Commands

[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

2.3.16 public-key-code end


Function
The public-key-code end command returns to the public key view from the public
key editing view and saves the configured public keys.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 73


Fit AP
Command Reference 2 Basic Configurations Commands

● 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

2.3.17 rsa local-key-pair create

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 74


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.18 rsa local-key-pair destroy


Function
The rsa local-key-pair destroy command deletes all local RSA host and server key
pairs.

Format
rsa local-key-pair destroy

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 75


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.19 rsa peer-public-key


Function
The rsa peer-public-key command displays the view of the RSA public key, and
specifies an RSA public key name.
The undo rsa peer-public-key command deletes a rsa public key.
By default, no public key is configured.

Format
rsa peer-public-key key-name [ encoding-type { der | openssh | pem } ]
undo rsa peer-public-key key-name

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 76


Fit AP
Command Reference 2 Basic Configurations Commands

Parameters

Parameter Description Value


key-name Specifies the rsa public key name. The value is a
string of 1 to 30
case-insensitive
characters without
spaces.
encoding-type Specifies an encoding format for an RSA -
public key.
der Specifies the DER format for an RSA public -
key.
DER encodes data in hexadecimal format.

openssh Specifies the OpenSSH format for an RSA -


public key.
OpenSSH encodes data in base-64 format.
OpenSSH is an encoding format based on
PEM.

pem Specifies the PEM format for an RSA public -


key.
PEM encodes data in base-64 format.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 77


Fit AP
Command Reference 2 Basic Configurations Commands

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 78


Fit AP
Command Reference 2 Basic Configurations Commands

2.3.16 public-key-code end


2.3.14 peer-public-key end

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 79


Fit AP
Command Reference 2 Basic Configurations Commands

# 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!

2.3.21 ssh client assign


Function
The ssh client assign command specifies the host public key of the SSH server to
connect on the SSH client.
The undo ssh client assign command cancels the specified host public key of the
SSH server to connect on the SSH client.
By default, the host public key of the server to connect is not specified on the
client.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 80


Fit AP
Command Reference 2 Basic Configurations Commands

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

# Delete the RSA public key of the SSH server.


<Huawei> system-view
[Huawei] undo ssh client 10.164.39.120 assign rsa-key

Related Topics
2.3.22 ssh client first-time enable

2.3.22 ssh client first-time enable


Function
The ssh client first-time enable command enables the first authentication on the
SSH client.
The undo ssh client first-time enable command disables the first authentication
on the SSH client.
By default, first authentication is disabled on the SSH client.

Format
ssh client first-time enable
undo ssh client first-time enable

Parameters
None

Views
System view

Default Level
3: Management level

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 81


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.23 ssh client key-exchange

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.

By default, an SSH client supports the Diffie-hellman-group14-sha1 algorithm.

Format
ssh client key-exchange { dh_group_exchange_sha1 | dh_group14_sha1 |
dh_group1_sha1 } *

undo ssh client 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 client.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 82


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


dh_group14_sha1 Specifies that the Diffie-hellman-group14- -
sha1 algorithm is contained in the key
exchange algorithm list configured on the
SSH client.
dh_group1_sha1 Specifies that the Diffie-hellman-group1-sha1 -
algorithm is contained in the key exchange
algorithm list configured on the SSH client.

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

2.3.24 ssh client secure-algorithms hmac


Function
The ssh client secure-algorithms hmac command configures an HMAC algorithm
list for an SSH client.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 83


Fit AP
Command Reference 2 Basic Configurations Commands

The undo ssh client secure-algorithms hmac command restores the default
HMAC algorithm list of an SSH client.

By default, an SSH client supports the SHA2_256 HMAC algorithm.

Format
ssh client secure-algorithms hmac { md5 | md5_96 | sha1 | sha1_96 | sha2_256 |
sha2_256_96 } *

undo ssh client 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 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 provides the highest security, followed by sha2_256_96, sha1, sha1_96,


md5, and md5_96 in order.

sha2_256_96, sha1, sha1_96, md5, and md5_96 provide weak security. Therefore,
they are not recommended in the HMAC algorithm list.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 84


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.25 ssh client secure-algorithms cipher


Function
The ssh client secure-algorithms cipher command configures an encryption
algorithm list for an SSH client.
The undo ssh client secure-algorithms cipher command restores the default
encryption algorithm list of an SSH client.
By default, an SSH client supports two encryption algorithms: AES128_CTR and
AES256_CTR.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 85


Fit AP
Command Reference 2 Basic Configurations Commands

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

aes256_ctr provides the highest security, followed by aes128_ctr, aes256_cbc,


aes128, and 3des in order.

3des provides weak security. Therefore, it is not recommended in the encryption


algorithm list.

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

2.3.26 ssh server authentication-retries

Function
The ssh server authentication-retries command sets the maximum number of
authentication retries for an SSH connection.

The undo ssh server authentication-retries command restores the default


maximum number of authentication retries for an SSH connection.

The default maximum number of authentication retries for an SSH connection is


3.

Format
ssh server authentication-retries times

undo ssh server authentication-retries

Parameters

Parameter Description Value


times Specifies the maximum number of The value is an integer that
authentication retries for an SSH ranges from 1 to 5.
connection.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 86


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.27 ssh server compatible-ssh1x enable

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.

By default, the server's compatibility with earlier versions is disabled.

Format
ssh server compatible-ssh1x enable

undo ssh server compatible-ssh1x enable

Parameters
None

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 87


Fit AP
Command Reference 2 Basic Configurations Commands

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 88


Fit AP
Command Reference 2 Basic Configurations Commands

2.3.28 ssh server key-exchange


Function
The ssh server key-exchange command configures a key exchange algorithm list
on an SSH server.
The undo ssh server key-exchange command restores the default configuration.
By default, an SSH server supports Diffie-hellman-group-exchange-sha1 and
Diffie-hellman-group14-sha1 key exchange algorithms.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 89


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.29 ssh server permit interface

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>

undo ssh 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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 90


Fit AP
Command Reference 2 Basic Configurations Commands

Default Level
3: Management level

Usage Guidelines
Usage Scenario

To prevent a client from connecting to the SSH server through an unauthorized


physical interface or attacking the SSH server by sending a large number of SSH
packets, you can run the ssh server permit interface command to specify physical
interfaces on the SSH server to which the client can connect.

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

2.3.30 ssh server port

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.

The default listening port number of the SSH server is 22.

Format
ssh server port port-number

undo ssh server port

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 91


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.31 ssh server rekey-interval

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 92


Fit AP
Command Reference 2 Basic Configurations Commands

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

undo ssh server rekey-interval

Parameters

Parameter Description Value


hours Specifies the interval for The value is an integer that ranges
updating the server key pair. from 1 to 24, in hours.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 93


Fit AP
Command Reference 2 Basic Configurations Commands

2.3.32 ssh server secure-algorithms hmac


Function
The ssh server secure-algorithms hmac command configures an HMAC
algorithm list for an SSH server.
The undo ssh server secure-algorithms hmac command restores the default
HMAC algorithm list of an SSH server.
By default, an SSH server supports the SHA2_256 HMAC algorithm.
By default, an SSH server supports the SHA2_256 HMAC algorithm.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 94


Fit AP
Command Reference 2 Basic Configurations Commands

Precautions

sha2_256 provides the highest security, followed by sha2_256_96, sha1, sha1_96,


md5, and md5_96 in order.

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

2.3.33 ssh server secure-algorithms cipher

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.

By default, an SSH server supports two encryption algorithms: AES128_CTR and


AES256_CTR.

Format
ssh server secure-algorithms cipher { 3des | aes128 | aes256_cbc | aes128_ctr |
aes256_ctr } *

ssh server 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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 95


Fit AP
Command Reference 2 Basic Configurations Commands

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

aes256_ctr provides the highest security, followed by aes128_ctr, aes256_cbc,


aes128, and 3des in order.

3des provides weak security. Therefore, it is not recommended in the encryption


algorithm list.

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

2.3.34 ssh server timeout

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.

The default timeout interval for SSH connection authentication is 60 seconds.

Format
ssh server timeout seconds

undo ssh server timeout

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 96


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.3.35 ssh user assign


Function
The ssh user assign command assigns an existing public key to a user.
The undo ssh user assign command deletes the mapping between the user and
public key.
By default, no public key is assigned to a user.

Format
ssh user user-name assign { rsa-key | ecc-key } key-name

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 97


Fit AP
Command Reference 2 Basic Configurations Commands

undo ssh user user-name assign { rsa-key | ecc-key }

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.

rsa-key Specifies the RSA public key. -


ecc-key Specifies the ECC public key. -
key-name Specifies the client public key The value is a string of 1 to 30
name. characters.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 98


Fit AP
Command Reference 2 Basic Configurations Commands

2.3.36 ssh user authentication-type


Function
The ssh user authentication-type command configures the authentication mode
for an SSH user.
The undo ssh user authentication-type command restores the default
authentication mode for an SSH user.
By default, the password authentication mode is configured for an SSH user.

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.

password Specifies the password authentication -


mode.
rsa Specifies the RSA authentication mode. -
password-rsa Specifies the password and RSA -
authentication mode.
ecc Specifies the ECC authentication mode. -
password-ecc Specifies the password and ECC -
authentication modes.
all Specifies the password, ECC, or RSA -
authentication mode.

Views
System view

Default Level
3: Management level

Usage Guidelines
Usage Scenario

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 99


Fit AP
Command Reference 2 Basic Configurations Commands

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.

Table 2-17 shows the application scenario of each authentication mode.

Table 2-17 Application scenario of each authentication mode


Authentication Mode Application Scenario

RSA authentication It is a public key encryption


architecture and an asymmetric
encryption algorithm. Based on the
problem of factoring large numbers,
RSA is mainly used to transmit the
keys of the symmetric encryption
algorithm, which can improve
encryption efficiency and simplify key
management. The server must first
check the validity of the SSH user and
whether the public key and the
numeric signature are valid. If all of
them are consistent with those
configured on the server, user
authentication succeeds. If any of the
three cannot pass authentication, the
user access is denied.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 100


Fit AP
Command Reference 2 Basic Configurations Commands

Authentication Mode Application Scenario

ECC authentication Like RSA authentication, the server


first checks the validity of the SSH user
and whether the public key and the
numeric signature are valid. If all of
them are consistent with those
configured on the server, user
authentication succeeds. If any of the
three cannot pass authentication, the
user access is denied. Compared with
the RSA algorithm, the ECC
authentication has the following
advantages:
● Provides the same security with
shorter key length.
● Features a shorter computing
process and higher processing
speed.
● Requires less storage space.
● Requires lower bandwidth.

Password authentication On the server, the AAA module assigns


each valid user a password for login.
That is, the server has the mappings
between user names and passwords.
When a user wants to log in to the
server, the server authenticates the
user name and its password
respectively. If either of them cannot
pass authentication, the user access is
denied.

password-rsa or password-ecc The server can authenticate the client


authentication by checking both the public key and
the password, and the authentication
succeeds only when both the public
key and the password are consistent
with those configured on the server.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 101


Fit AP
Command Reference 2 Basic Configurations Commands

Authentication Mode Application Scenario

All authentication The server can authenticate the client


by checking both the public key and
the password, and the authentication
succeeds when either of them is
consistent with that configured on the
server.
NOTE
In all authentication mode, the user
priority depends on the authentication
mode selected.
● If password authentication is selected,
the user priority is the same as that
specified on the AAA module.
● If RSA/ECC authentication is selected,
the user priority depends on the priority
of the VTY window used during user
access.
If all authentication is selected and an AAA
user with the same name as the SSH user
exists, user priorities may be different in
password authentication and RSA/ECC
authentication modes. Set relevant
parameters as needed.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 102


Fit AP
Command Reference 2 Basic Configurations Commands

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.

host-ip Specifies the IP The value is a string of 1 to 255 case-


address or host insensitive characters without spaces.
name of the
remote IPv4
STelnet server.
host-ipv6 Specifies the IPv6 The value is a string of 1 to 255 case-
address or host insensitive characters without spaces.
name of the
remote IPv6
STelnet server.
-oi interface-type Specifies the If the IPv6 address of the remote host
interface-number outbound interface is linked to a local address, the
on the local device. outbound interface must be specified.

port-number Specifies the port


The value is an integer that ranges
number that the
from 1 to 65535. The default value 22
SSH server is
is the standard port number.
listening on.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 103


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


identity-key Specifies the public The public key algorithm includes rsa
key for server and ecc.
authentication.
NOTE
To improve security, it is not
recommended that you use RSA as the
authentication algorithm.

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.

prefer_kex Specifies the The dh_group1, dh_exchange_group,


prefer_key-exchange preferred key and dh_group14_sha1 algorithms are
exchange supported currently. The default key
algorithm. exchange algorithm is
dh_group14_sha1.
NOTE
The dh_exchange_group algorithm is
recommended.
● If a key exchange algorithm list has
been configured using the ssh client
key-exchange command for the SSH
client, select a key exchange algorithm
from the list.
● If no key exchange algorithm list has
been configured using the ssh client
key-exchange command for the SSH
client, select one from dh_group1,
dh_exchange_group,
dh_group14_sha1.

prefer_ctos_cipher Specifies the The 3des, aes256_cbc, aes128_ctr,


prefer_ctos_cipher preferred aes256_ctr, and aes128 algorithms are
encryption supported currently. The default
algorithm from the algorithm are aes256_ctr and aes128.
client to the server.
NOTE
● If an encryption algorithm list has
been configured using the ssh client
secure-algorithms cipher command
for the SSH client, select an encryption
algorithm from the list.
● If no encryption algorithm list has
been configured using the ssh client
secure-algorithms cipher command
for the SSH client, select one from
3des, aes128, aes256_cbc, aes128_ctr,
and aes256_ctr.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 104


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


prefer_stoc_cipher Specifies the The 3des, aes256_cbc, aes128_ctr,
prefer_stoc_cipher preferred aes256_ctr, and aes128 algorithms are
encryption supported currently. The default
algorithm from the algorithm are aes256_ctr and aes128.
server to the client.
NOTE
● If an encryption algorithm list has
been configured using the ssh client
secure-algorithms cipher command
for the SSH client, select an encryption
algorithm from the list.
● If no encryption algorithm list has
been configured using the ssh client
secure-algorithms cipher command
for the SSH client, select one from
3des, aes128, aes256_cbc, aes128_ctr,
and aes256_ctr.

prefer_ctos_hmac Specifies the The sha1, sha1_96, md5, sha2_256,


prefer_ctos_hmac preferred HMAC sha2_256_96, and md5_96 algorithms
algorithm from the are supported currently. The default
client to the server. algorithm is sha2_256.
NOTE
● If an HMAC algorithm list has been
configured using the ssh client secure-
algorithms hmac command for the
SSH client, select an HMAC algorithm
from the list.
● If no HMAC algorithm list has been
configured using the ssh client secure-
algorithms hmac command for the
SSH client, select one from sha1,
sha1_96, md5, md5_96, sha2_256,
and sha2_256_96.

prefer_stoc_hmac Specifies the The sha1, sha1_96, md5, sha2_256,


prefer_stoc_hmac preferred HMAC sha2_256_96, and md5_96 algorithms
algorithm from the are supported currently. The default
server to the client. algorithm is sha2_256.
NOTE
● If an HMAC algorithm list has been
configured using the ssh client secure-
algorithms hmac command for the
SSH client, select an HMAC algorithm
from the list.
● If no HMAC algorithm list has been
configured using the ssh client secure-
algorithms hmac command for the
SSH client, select one from sha1,
sha1_96, md5, md5_96, sha2_256,
and sha2_256_96.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 105


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


-ki aliveinterval Specifies the The value is an integer that ranges
interval for from 1 to 3600, in seconds.
sending keepalive
packets when no
packet is received.
-kc alivecountmax Specifies the The value is an integer that ranges
number of times from 3 to 10. The default value is 5.
for no reply of
keepalive packets.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 106


Fit AP
Command Reference 2 Basic Configurations Commands

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

# Remotely connect to the STelnet server that uses an IPv6 address.


<Huawei> system-view
[Huawei] stelnet ipv6 fe80::100 prefer_ctos_cipher aes128

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.

telnet [ -a source-ip-address ] host-ip [ port-number ]

# Log in to another device through Telnet based on IPv6.

telnet ipv6 [ -a source-ipv6-address ] host-ipv6 [ -oi interface-type interface-


number ] [ port-number ]

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.

-a source-ipv6- By specifying a source IP address, The value is a 32-digit


address you can use this address to hexadecimal number, in
communicate with the server for the X:X:X:X:X:X:X:X format.
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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 107


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


host-ip Specifies the IPv4 address or host The value is a string of 1
name of the remote device. to 255 case-insensitive
characters without spaces.
host-ipv6 Specifies the IPv6 address or host The value is a string of 1
name of the remote device. to 255 case-insensitive
characters without spaces.
-oi interface- Specifies the outbound interface on If the IPv6 address of the
type interface- the local device. remote host is linked to a
number local address, the
outbound interface must
be specified.
port-number Specifies the number of the TCP The value is an integer
port that is used by the remote that ranges from 1 to
device to provide the Telnet service. 65535. The default value is
23.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 108


Fit AP
Command Reference 2 Basic Configurations Commands

<Huawei> telnet 10.1.1.1

# Use the IPv6 address to connect to a remote device through Telnet.


<Huawei> telnet ipv6 2607:f0d0:1002:11::158

2.3.39 telnet client-source

Function
The telnet client-source command specifies the source IP address and interface
for a Telnet client.

The undo telnet client-source command restores the default settings.

The default source IP address of the Telnet client is 0.0.0.0.

Format
telnet client-source { -a source-ip-address | -i interface-type interface-number }

undo telnet client-source

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 109


Fit AP
Command Reference 2 Basic Configurations Commands

Related Topics
2.3.38 telnet

2.3.40 telnet server permit interface


Function
The telnet server permit interface command specifies physical interfaces on the
Telnet server to which clients can connect.
The undo telnet permit interface command restores the default physical
interfaces on the Telnet server to which clients can connect.
By default, clients can connect to all the physical interfaces on the Telnet server.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 110


Fit AP
Command Reference 2 Basic Configurations Commands

● 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 File Management Commands

2.4.1 ascii

Function
The ascii command sets the file transfer mode to ASCII on an FTP client.

The default file transfer mode is ASCII.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 111


Fit AP
Command Reference 2 Basic Configurations Commands

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 112


Fit AP
Command Reference 2 Basic Configurations Commands

<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] binary
200 Type set to I.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 113


Fit AP
Command Reference 2 Basic Configurations Commands

[Huawei-ftp] bye
221 server closing.
<Huawei>

Related Topics
2.4.9 close
2.4.17 disconnect
2.1.8 quit

2.4.4 cd (FTP client view)


Function
The cd command changes the working directory of the FTP 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 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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 114


Fit AP
Command Reference 2 Basic Configurations Commands

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)

2.4.5 cd (SFTP 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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 115


Fit AP
Command Reference 2 Basic Configurations Commands

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)

2.4.6 cd (user view)


Function
The cd command changes the current working directory of a user.
By default, the current working directory is flash:.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 116


Fit AP
Command Reference 2 Basic Configurations Commands

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
● 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:

# Change the current working directory from flash: to flash:/t1/t2.


<Huawei> pwd
flash:
<Huawei> cd flash:/t1/t2
<Huawei> pwd
flash:/t1/t2

# Change the current working directory from flash:/selftest to flash:/logfile.


<Huawei> pwd
flash:/selftest
<Huawei> cd /logfile/
<Huawei> pwd
flash:/logfile

# Change the current working directory from flash:/selftest to flash:/selftest/


test.
<Huawei> pwd
flash:/selftest
<Huawei> cd test/
<Huawei> pwd
flash:/selftest/test

Related Topics
2.4.41 pwd (user view)

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 117


Fit AP
Command Reference 2 Basic Configurations Commands

2.4.7 cdup (SFTP client 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>

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 118


Fit AP
Command Reference 2 Basic Configurations Commands

2.4.8 cdup (FTP client view)


Function
The cdup command enables you to return to the upper-level directory.

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)

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 119


Fit AP
Command Reference 2 Basic Configurations Commands

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

This command is equivalent to the disconnect command.

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]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 120


Fit AP
Command Reference 2 Basic Configurations Commands

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

source-filename Specifies the path and The value is a string of 1


the name of a source to 64 case-sensitive
file. characters without
spaces in the [ drive ]
[ 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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 121


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Settings

destination-filename Specifies the path and The value is a string of 1


the name of a to 64 case-sensitive
destination file. characters without
spaces in the [ drive ]
[ 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

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 122


Fit AP
Command Reference 2 Basic Configurations Commands

● 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:/

Idx Attr Size(Byte) Date Time(LMT) FileName


0 -rw- 6,721,804 Mar 19 2012 12:31:58 devicesoft.cc
1 -rw- 910 Mar 19 2012 12:32:58 config.cfg
2 drw- - Mar 05 2012 09:54:34 temp
...
1,927,220 KB total (1,130,464 KB free)
<Huawei> copy config.cfg 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

# 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:/

Idx Attr Size(Byte) Date Time(LMT) FileName


0 -rw- 6,721,804 Mar 19 2012 12:31:58 devicesoft.cc
1 -rw- 910 Mar 19 2012 12:32:58 config.cfg
2 drw- - Mar 05 2012 09:54:34 temp
...
1,927,220 KB total (1,130,464 KB free)
<Huawei> copy config.cfg temp
Copy flash:/config.cfg to flash:/temp/config.cfg?(y/n)[n]:y
100% complete
Info: Copied file flash:/config.cfg to flash:/temp/config.cfg...Done

# 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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 123


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.4.12 delete (user view)


Function
The delete command deletes a specified file in the storage device.

Format
delete [ /unreserved ] [ /force ] { filename | devicename }

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 124


Fit AP
Command Reference 2 Basic Configurations Commands

Parameters
Parameter Description Value
/unreserved Deletes a specified file. -
The deleted file cannot be
restored.

/force Deletes a file directly -


without any confirmation.

filename Specifies the name of a The value is a string of 1 to 64 case-


file to be deleted. sensitive characters without spaces in
the [ drive ] [ 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.

devicename Deletes all the files in the -


storage device.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 125


Fit AP
Command Reference 2 Basic Configurations Commands

● The wildcard (*) can be used in the delete command.


● If the parameter /unreserved is not included, the file is stored in the recycle
bin. To display all files including deleted files that are displayed in square
brackets ([ ]), run the dir /all command. To restore these files that are
displayed in square brackets ([ ]), run the undelete command. To clear these
files from the recycle bin, run the reset recycle-bin command.

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

2.4.13 dir (user view)

Function
The dir command displays information about files and directories stored on the
storage device.

Format
dir [ /all ] [ filename | directory ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 126


Fit AP
Command Reference 2 Basic Configurations Commands

Parameters
Parameter Description Settings

/all Displays all files and -


directories stored in the
current directory,
including files and
directories moved to the
recycle bin from the
current directory.

filename Specifies the file name. The value is a string of 1


to 64 case-sensitive
characters without
spaces in the [ drive ]
[ 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.

directory Specifies the file The value is a string of 1


directory. to 64 case-sensitive
characters without
spaces in the [ drive ]
path 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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 127


Fit AP
Command Reference 2 Basic Configurations Commands

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:/

Idx Attr Size(Byte) Date Time(LMT) FileName


0 -rw- 889 Feb 25 2012 10:00:58 private-data.txt
1 -rw- 6,311 Feb 17 2012 14:05:04 backup.cfg
2 -rw- 836 Jan 01 2012 18:06:20 rr.dat
3 drw- - Jan 01 2012 18:08:20 syslogfile
4 -rw- 836 Jan 01 2012 18:06:20 rr.bak
5 drw- - Feb 27 2012 00:00:54 security
6 -rw- 523,240 Mar 16 2011 11:21:36 bootrom_53hib66.bin
7 -rw- 2,290 Feb 25 2012 16:46:06 vrpcfg.cfg
8 -rw- 812 Dec 12 2011 15:43:10 hostkey
9 drw- - Jan 01 2012 18:05:48 compatible
10 -rw- 25,841,428 Nov 17 2011 09:48:10 basicsoft.cc
11 -rw- 540 Dec 12 2011 15:43:12 serverkey
12 -rw- 26,101,692 Dec 21 2011 11:44:52 devicesoft.cc
13 -rw- 6,292 Feb 14 2012 11:14:32 1.cfg
14 -rw- 6,311 Feb 17 2012 10:22:56 1234.cfg
15 -rw- 6,311 Feb 25 2012 17:22:30 [11.cfg]

1,927,220 KB total (1,130,464 KB free)

# Display information about file vrpcfg.cfg in the current directory.


<Huawei> dir vrpcfg.cfg
Directory of flash:/

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 128


Fit AP
Command Reference 2 Basic Configurations Commands

Idx Attr Size(Byte) Date Time(LMT) FileName


0 -rw- 2,290 Feb 25 2012 16:46:06 vrpcfg.cfg

1,927,220 KB total (1,130,464 KB free)

# Display information about all .txt files stored in the current directory.
<Huawei> dir *.txt
Directory of flash:/

Idx Attr Size(Byte) Date Time(LMT) FileName


0 -rw- 889 Feb 25 2012 10:00:58 private-data.txt

1,927,220 KB total (1,130,464 KB free)

Table 2-18 Description of the dir command output

Item Description

d Indicates a directory. If there is no output for this parameter, the


command output indicates a file. For example, devicesoft.cc is a
file and security is a directory.

r Indicates that the file or directory can be read.

w Indicates that the file or directory is editable.

[] Indicates a file stored in the recycle bin.

2.4.14 delete (FTP client view)


Function
The delete command deletes a file from the FTP server.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 129


Fit AP
Command Reference 2 Basic Configurations Commands

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)

2.4.15 dir/ls (FTP client view)


Function
The dir and ls commands display all files or specified files that are stored on the
FTP server, and save them to a local disk.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 130


Fit AP
Command Reference 2 Basic Configurations Commands

Usage Guidelines
Usage Scenario

The following describes differences between the dir and ls commands.

● 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

The wildcard (*) can be used in commands dir and ls.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 131


Fit AP
Command Reference 2 Basic Configurations Commands

221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye

<Huawei> more temp1


-rwxrwxrwx 1 noone nogroup 3929 Apr 27 18:13 temp.c

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

226 Transfer complete.

[Huawei-ftp] quit

221 Server closing.


<Huawei> more test
test.bat

Table 2-19 Description of the dir/Is command output

Parameter Description

d in the Indicates a directory. If there is no output for this parameter, the


command command output indicates a file.
output

r in the Indicates that the file or directory can be read.


command
output

w in the Indicates that the file or directory is editable.


command
output

2.4.16 dir/ls (SFTP client view)

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 ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 132


Fit AP
Command Reference 2 Basic Configurations Commands

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 133


Fit AP
Command Reference 2 Basic Configurations Commands

-rwxrwxrwx 1 noone nogroup 5736 Mar 24 18:38 backup.txt


-rwxrwxrwx 1 noone nogroup 5736 Mar 24 18:38 backup1.txt
sftp-client> ls -a test
.
..
yourtest
backup.txt
backup1.txt

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 134


Fit AP
Command Reference 2 Basic Configurations Commands

[Huawei-ftp]

Related Topics
2.4.3 bye
2.4.9 close
2.4.35 open

2.4.18 display ftp-client


Function
The display ftp-client command displays the source IP address configured for the
FTP client.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 135


Fit AP
Command Reference 2 Basic Configurations Commands

Table 2-20 Description of the display ftp-client command output


Parameter Description

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

2.4.19 display sftp-client


Function
The display sftp-client command displays the source IP address configured for
the SFTP client.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 136


Fit AP
Command Reference 2 Basic Configurations Commands

<Huawei> display sftp-client


Info: The source address of SFTP client is 1.1.1.1

Table 2-21 Description of the display sftp-client command output

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

2.4.20 display tftp-client


Function
The display tftp-client command displays the source IP address configured for
the TFTP client.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 137


Fit AP
Command Reference 2 Basic Configurations Commands

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.

Table 2-22 Description of the display tftp-client command output


Parameter Description

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

2.4.21 file prompt


Function
The file prompt command changes the prompt mode when you perform
operations on files.
The default prompt mode is alert.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 138


Fit AP
Command Reference 2 Basic Configurations Commands

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

# Set the prompt mode to alert.


<Huawei> system-view
[Huawei] file prompt alert
[Huawei] quit
<Huawei> copy test.txt test1.txt
Copy flash:/test.txt to flash:/test1.txt?(y/n)[n]:y
The file flash:/test1.txt exists. Overwrite it?(y/n)[n]:y
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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 139


Fit AP
Command Reference 2 Basic Configurations Commands

Parameters

Parameter Description Value


drive Specifies the name of the The enumerated values are:
storage device to format.
● usb:
● sdcard: \
The value sdcard: is supported only by
the AD9430DN-12.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 140


Fit AP
Command Reference 2 Basic Configurations Commands

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.

ftp [ [ -a source-ip-address | -i interface-type interface-number ] host-ip [ port-


number ] ]
# Connect the FTP client to the FTP server based on the IPv6 address.

ftp ipv6 host-ipv6 [ port-number ]

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.

-i interface-type Specifies the source interface type -


interface- and ID. You are advised to use the
number 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 FTP connection cannot be set up.

host-ip Specifies the IP address or host name The value is a string of


of the remote IPv4 FTP server. 1 to 255 case-insensitive
characters without
spaces.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 141


Fit AP
Command Reference 2 Basic Configurations Commands

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]

# Connect to the remote IPv6 FTP server whose address is 1000::1.


<Huawei> ftp ipv6 1000::1
Trying 1000::1
Press CTRL+K to abort

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 142


Fit AP
Command Reference 2 Basic Configurations Commands

Connected to ftp 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.3 bye
2.4.17 disconnect

2.4.24 ftp client-source

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 }

undo ftp 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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 143


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.4.25 get (FTP client view)

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 ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 144


Fit AP
Command Reference 2 Basic Configurations Commands

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
FTP 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
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)

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 145


Fit AP
Command Reference 2 Basic Configurations Commands

2.4.26 get (SFTP client view)


Function
The get command downloads a file from the SFTP server and saves the file to the
local device.

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:

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 146


Fit AP
Command Reference 2 Basic Configurations Commands

sftp-client> get test.txt

Related Topics
2.4.38 put (SFTP client view)

2.4.27 help (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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 147


Fit AP
Command Reference 2 Basic Configurations Commands

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.

# Display all commands in the SFTP client view.


sftp-client> help all
cd
cdup
dir
get
help
ls
mkdir
put
pwd
quit
rename
remove
rmdir

Related Topics
2.4.50 sftp

2.4.28 mkdir (FTP client view)

Function
The mkdir command creates a directory on the remote FTP server.

Format
mkdir remote-directory

Parameters

Parameter Description Value


remote- Specifies the directory The value is a string of case-sensitive
directory to be created. characters without spaces. The
absolute path length ranges from 1 to
64

Views
FTP client view

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 148


Fit AP
Command Reference 2 Basic Configurations Commands

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)

2.4.29 mkdir (SFTP client view)


Function
The mkdir command creates a directory on the remote SFTP server.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 149


Fit AP
Command Reference 2 Basic Configurations Commands

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)

2.4.30 mkdir (User view)


Function
The mkdir command creates a directory in the current storage device.

Format
mkdir directory

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 150


Fit AP
Command Reference 2 Basic Configurations Commands

Parameters
Parameter Description Settings

directory Specifies a directory or The value is a string of


directory and its path. case-sensitive characters
in the [ drive ] [ path ]
directory format. The
absolute path length
ranges from 1 to 64,
while 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
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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 151


Fit AP
Command Reference 2 Basic Configurations Commands

● A maximum of four directory levels are supported when you create a


directory.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 152


Fit AP
Command Reference 2 Basic Configurations Commands

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

Parameter Description Value


/binary Displays the file -
content in the binary
mode.
filename Specifies the file The value is a string of 1 to 64 case-sensitive
name. characters without spaces in the [ drive ]
[ 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.

offset Specifies the file The value is an integer that ranges from 0 to
offset. 2147483647, in bytes.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 153


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


all Displays all the file -
content on one
screen.

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.

● 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

● 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 number of lines that can be displayed on a terminal screen is


greater than 0. (The number of lines that can be displayed on a
terminal screen is set by running the screen-length command.)

▪ 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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 154


Fit AP
Command Reference 2 Basic Configurations Commands

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 that can be displayed on a terminal screen is


greater than 0. (The number of lines that can be displayed on a
terminal screen is set by running the screen-length command.)

▪ 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
#----------------------------------------------------------------------------------

#BEGIN FOR RESOURCE DEFINATION


[RESOURCE]
FORMAT: SPECS RESOURCE NAME STRING = CONTROLLABLE(1 : ABLE , 0: NOT ABLE),DEFAUL
T VALUE , MAX VALUE , MIN VALUE
#BEGIN SPECS RESOURCE FOR TE tunnel Nto1 PS MODULE
PAF_LCS_TUNNEL_SPECS_TE_PS_MAX_PROTECT_NUM = 1, 8, 16, 1
PAF_LCS_TUNNEL_SPECS_TE_PS_REBOOT_TIME = 1, 180000, 3600000, 60000
---- More ----

# Display the content of the file paf.txt.


<Huawei> more paf.txt all
PAF_LCS_588_IFC_FIFO_DEPTH_ASE = 222
#IFC_FIFO_DEPTH_ASE EXPLAIN (222: NORMAL, 102: DEEP)
PAF_LCS_588_IPE_FIFO_DEPTH_TCM = 659206
#IPE_FIFO_DEPTH_TCM EXPLAIN (659206: NORMAL, 655360: DEEP)
PAF_LCS_588_IFC_FIFO_DEPTH_TCM = 222

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 155


Fit AP
Command Reference 2 Basic Configurations Commands

#IFC_FIFO_DEPTH_TCM EXPLAIN (222: NORMAL, 102: DEEP)


#END OF SPECS RESOURCE FOR 588 MODULE
#BEGIN 8090 MEM GATE AND ISSU MEM GATE
PAF_LCS_8090_BOARD_RESET_MEMORY_GATE = 90
PAF_LCS_8090_512BOARD_RESET_MEMORY_GATE = 85
PAF_LCS_8090_BOARD_RESET_MEMORY_GATE_ISSU = 95
PAF_LCS_ISSU_CHECK_MEMORY_GATE = 40
#END 8090 MEM GATE AND ISSU MEM GATE
[END CONFIGURE]

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

Only the AD9431DN-24X, AD9430DN-24, AD9430DN-12, AP4030TN, AP4050DN-E,


AP5050DN-S, AP6050DN, AP6150DN, AP7050DN-E, AP7050DE, AP4051TN, AP6052DN,
AP7052DN, AP7152DN, AP7052DE, AP2050DN, AP2050DN-S, AP2050DN-E, AP2051DN,
AP2051DN-S, AP2051DN-E, AP4051DN, AP4151DN, AP4051DN-S, AP4050DN, AP4050DN-S,
AP4051DN-USA, AP1050DN-S, AP4050DN-HD, AP4030TN, AP7060DN, WA375DD-CE,
R250D-E and R251D-E support this command.

Format
mount driver

Parameters
Parameter Description Value

driver Specifies the driver that The enumerated values


requires hot loading. are:
● usb:
● sdcard:
The value sdcard: is
supported only by the
AD9430DN-12.

Views
User view

Default Level
3: Management level

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 156


Fit AP
Command Reference 2 Basic Configurations Commands

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

source-filename Specifies the directory The value is a string of 1


and name of a source to 64 case-sensitive
file. characters without
spaces in the [ drive ]
[ 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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 157


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Settings

destination-filename Specifies the directory The value is a string of 1


and name of a to 64 case-sensitive
destination file. characters without
spaces in the [ drive ]
[ 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

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 158


Fit AP
Command Reference 2 Basic Configurations Commands

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

open [ -a source-ip-address | -i interface-type interface-number ] host-ip [ port-


number ]

# Connect the FTP client to the FTP server based on the IPv6 address.

open ipv6 host-ipv6 [ port-number ]

Parameters

Parameter Description Value


-a source-ip- Specifies the source IP address for -
address connecting to the FTP client. You are
advised to use the loopback interface
IP address.

-i interface-type Specifies the source interface type -


interface- and ID. You are advised to use the
number 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 FTP connection cannot be set up.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 159


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


host-ip Specifies the IP address or host name The value is a string of
of the remote IPv4 FTP server. 1 to 255 case-
insensitive characters
without spaces.
port-number Specifies the port number of the FTP The value is an integer
server. that ranges from 1025
to 55535, or 21. The
default value is the
standard port number
21.
ipv6 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
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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 160


Fit AP
Command Reference 2 Basic Configurations Commands

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.

By default, the data transmission mode is active.

Format
passive

undo passive

Parameters
None

Views
FTP client view

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 161


Fit AP
Command Reference 2 Basic Configurations Commands

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.

2.4.37 put (FTP client view)

Function
The put command uploads a local file to the remote FTP server.

Format
put local-filename [ remote-filename ]

Parameters

Parameter Description Value


local-filename Specifies the local file name The value is a string of 1 to 64
of the FTP client. case-sensitive characters without
spaces.
remote- Specifies the name of the file The value is a string of 1 to 64
filename to be uploaded to the remote case-sensitive characters without
FTP server. spaces.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 162


Fit AP
Command Reference 2 Basic Configurations Commands

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)

2.4.38 put (SFTP client view)


Function
The put command uploads a local file to a remote SFTP server.

Format
put local-filename [ remote-filename ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 163


Fit AP
Command Reference 2 Basic Configurations Commands

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

● If remote-filename is not specified, the uploaded file is saved on the remote


SFTP server with the original file name.
● If the specified remote-filename is the same as an existing file name on the
SFTP server, the uploaded file overwrites the existing file on the server.

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)

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 164


Fit AP
Command Reference 2 Basic Configurations Commands

2.4.39 pwd (FTP 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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 165


Fit AP
Command Reference 2 Basic Configurations Commands

2.4.40 pwd (SFTP client view)

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)

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 166


Fit AP
Command Reference 2 Basic Configurations Commands

2.4.41 pwd (user 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 ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 167


Fit AP
Command Reference 2 Basic Configurations Commands

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.

● The help information is provided by the remote server. Different remote


servers may provide different help information for an FTP command.
● The help information can be displayed for FTP commands user, pass, cwd,
cdup, quit, port, pasv, type, retr, stor, dele, rmd, mkd, pwd, list, nlst, syst,
help, xcup, xcwd, xmkd, xpwd, and xrmd.

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.

[Huawei-ftp] remotehelp cdup


214 Syntax: CDUP <change to parent directory>.

2.4.43 remove (SFTP client view)

Function
The remove command deletes specified files from the remote SFTP server.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 168


Fit AP
Command Reference 2 Basic Configurations Commands

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)

2.4.44 rename (SFTP client view)


Function
The rename command renames a file or directory stored on the SFTP server.

Format
rename old-name new-name

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 169


Fit AP
Command Reference 2 Basic Configurations Commands

Parameters

Parameter Description Value


old-name Specifies the name of a file The value is a string of 1 to 64 case-
or directory. insensitive characters without spaces.

new-name Specifies the new name of The value is a string of 1 to 64 case-


the file or directory. insensitive characters without spaces.

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)

2.4.45 rename (user view)

Function
The rename command renames a file or folder.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 170


Fit AP
Command Reference 2 Basic Configurations Commands

Format
rename old-name new-name

Parameters
Parameter Description Settings

old-name Specifies the name of a The value is a string of 1


file or folder. to 64 case-sensitive
characters without
spaces in the [ drive ]
[ path ] filename
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.

new-name Specifies the new name The value is a string of 1


of the file or directory. to 64 case-sensitive
characters without
spaces in the [ drive ]
[ path ] filename
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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 171


Fit AP
Command Reference 2 Basic Configurations Commands

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

● You must rename a file or directory in its source directory.


● If the renamed file or directory has the same name as an existing file or
directory, an error message is displayed.
● If you specify old-name or new-name without specifying the file path, the file
must be saved in your current working directory.

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

# Rename the file sample.txt to sample.bak.


<Huawei> rename sample.txt sample.bak
Rename flash:/sample.txt to flash:/sample.bak ?(y/n)[n] :y
Info: Rename file flash:/sample.txt to flash:/sample.bak .......Done

Related Topics
2.4.41 pwd (user view)

2.4.46 reset recycle-bin

Function
The reset recycle-bin command permanently deletes files from the recycle bin.

Format
reset recycle-bin [ filename | devicename ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 172


Fit AP
Command Reference 2 Basic Configurations Commands

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.

devicename Specifies the -


storage device
name.

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 ([ ]).

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 173


Fit AP
Command Reference 2 Basic Configurations Commands

● 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)

2.4.47 rmdir (FTP client view)


Function
The rmdir command deletes a specified directory from the remote FTP server.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 174


Fit AP
Command Reference 2 Basic Configurations Commands

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)

2.4.48 rmdir (SFTP client view)

Function
The rmdir command deletes a specified directory from the remote SFTP server.

Format
rmdir remote-directory &<1-10>

Parameters

Parameter Description Value


remote- Specifies the name of a file The value is a string of 1 to 64
directory on the SFTP server. case-insensitive characters
without spaces.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 175


Fit AP
Command Reference 2 Basic Configurations Commands

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)

2.4.49 rmdir (user view)


Function
The rmdir command deletes a specified directory from the storage device.

Format
rmdir directory

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 176


Fit AP
Command Reference 2 Basic Configurations Commands

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

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

● 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)

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 177


Fit AP
Command Reference 2 Basic Configurations Commands

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 178


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


-i interface-type Specifies the -
interface-number source interface
type and ID. You
are advised 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 SFTP
connection cannot
be set up.

host-ip Specifies the IP The value is a string of 1 to 255 case-


address or host insensitive characters without spaces.
name of the
remote IPv4 SFTP
server.
host-ipv6 Specifies the IPv6 The value is a string of 1 to 255 case-
address or host insensitive characters without spaces.
name of the
remote IPv6 SFTP
server.
-oi interface-type Specifies an -
interface-number outbound interface
on the local device.
If the remote host
uses an IPv6 link-
local address, you
must specify the
outbound interface
on the local device.

port Specifies the port The value is an integer that ranges


number of the SSH from 1 to 65535. The default port
server. number is 22.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 179


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


prefer_kex Specifies the The dh_group1, dh_exchange_group,
prefer_key-exchange preferred key and dh_group14_sha1 algorithms are
exchange supported currently. The default key
algorithm. exchange algorithm is
dh_group14_sha1.
NOTE
The dh_exchange_group algorithm is
recommended.
● If a key exchange algorithm list has
been configured using the ssh client
key-exchange command for the SSH
client, select a key exchange algorithm
from the list.
● If no key exchange algorithm list has
been configured using the ssh client
key-exchange command for the SSH
client, select one from dh_group1,
dh_exchange_group,
dh_group14_sha1.

prefer_ctos_cipher Specifies the The 3des, aes256_cbc, aes128_ctr,


prefer_ctos_cipher preferred aes256_ctr, and aes128 algorithms are
encryption supported currently. The default
algorithm from the algorithm are aes256_ctr and aes128.
client to the server.
NOTE
● If an encryption algorithm list has
been configured using the ssh client
secure-algorithms cipher command
for the SSH client, select an encryption
algorithm from the list.
● If no encryption algorithm list has
been configured using the ssh client
secure-algorithms cipher command
for the SSH client, select one from
3des, aes128, aes256_cbc, aes128_ctr,
and aes256_ctr.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 180


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


prefer_stoc_cipher Specifies the The 3des, aes256_cbc, aes128_ctr,
prefer_stoc_cipher preferred aes256_ctr, and aes128 algorithms are
encryption supported currently. The default
algorithm from the algorithm are aes256_ctr and aes128.
server to the client.
NOTE
● If an encryption algorithm list has
been configured using the ssh client
secure-algorithms cipher command
for the SSH client, select an encryption
algorithm from the list.
● If no encryption algorithm list has
been configured using the ssh client
secure-algorithms cipher command
for the SSH client, select one from
3des, aes128, aes256_cbc, aes128_ctr,
and aes256_ctr.

prefer_ctos_hmac Specifies the The sha1, sha1_96, md5, sha2_256,


prefer_ctos_hmac preferred HMAC sha2_256_96, and md5_96 algorithms
algorithm from the are supported currently. The default
client to the server. algorithm is sha2_256.
NOTE
● If an HMAC algorithm list has been
configured using the ssh client
secure-algorithms hmac command
for the SSH client, select an HMAC
algorithm from the list.
● If no HMAC algorithm list has been
configured using the ssh client
secure-algorithms hmac command
for the SSH client, select one from
sha1, sha1_96, md5, md5_96,
sha2_256, and sha2_256_96.

prefer_stoc_hmac Specifies the The sha1, sha1_96, md5, sha2_256,


prefer_stoc_hmac preferred HMAC sha2_256_96, and md5_96 algorithms
algorithm from the are supported currently. The default
server to the client. algorithm is sha2_256.
NOTE
● If an HMAC algorithm list has been
configured using the ssh client
secure-algorithms hmac command
for the SSH client, select an HMAC
algorithm from the list.
● If no HMAC algorithm list has been
configured using the ssh client
secure-algorithms hmac command
for the SSH client, select one from
sha1, sha1_96, md5, md5_96,
sha2_256, and sha2_256_96.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 181


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


-ki aliveinterval Specifies the The value is an integer that ranges
interval for from 1 to 3600, in seconds.
sending keepalive
packets when no
packet is received
in reply.
-kc alivecountmax Specifies the times The value is an integer that ranges
for sending from 3 to 10. The default value is 5.
keepalive packets
when no packet is
received in reply.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 182


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.4.51 sftp client-source


Function
The sftp client-source command specifies the source IP address for the SFTP
client to send packets.
The undo sftp client-source command restores the default source IP address for
the SFTP client to send packets.
The default source IP address for the SFTP client to send packets is 0.0.0.0.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 183


Fit AP
Command Reference 2 Basic Configurations Commands

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 ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 184


Fit AP
Command Reference 2 Basic Configurations Commands

# Upload a file to the TFTP server or download a file to the local device based on
the IPv6 address

tftp ipv6 [ -a source-ipv6-address ] tftp-server-ipv6 [ -oi interface-type interface-


number ] { get | put } source-filename [ destination-filename ]

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.

-oi interface- Specifies an outbound interface If the remote host uses an


type interface- on the local device. IPv6 address, you must
number specify the outbound
interface on the local
device.
tftp-server Specifies the IPv4 address or host The value is a string of 1 to
name for the TFTP server. 255 case-insensitive
characters without spaces.

tftp-server-ipv6 Specifies the IPv6 address or host The value is a string of 1 to


name for the TFTP server. 255 case-insensitive
characters without spaces.

get Download a file. -


put Upload a file. -
source-filename Specifies the source file name. The value is a string of 1 to
64 case-sensitive characters
without spaces.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 185


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


destination- Specifies the destination file The value is a string of 1 to
filename name. 64 case-sensitive characters
without spaces. By default,
source and destination file
names are the same.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 186


Fit AP
Command Reference 2 Basic Configurations Commands

2.4.53 tftp client-source


Function
The tftp client-source command specifies the source IP address for the TFTP
client to send packets.
The undo tftp client-source command restores the default source IP address for
the TFTP client to send packets.
The default source IP address for the TFTP client to send packets is 0.0.0.0.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 187


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.4.54 tftp-server acl


Function
The tftp-server acl command specifies the ACL number for the local device so
that the device can access TFTP servers with the same ACL number.
The undo tftp-server acl command deletes the ACL number from the local device.
By default, no ACL number is specified on the local 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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 188


Fit AP
Command Reference 2 Basic Configurations Commands

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.

[Huawei] tftp-server acl 2000

Related Topics
2.4.52 tftp

2.4.55 umount
Function
The umount command unloads a storage device.

NOTE

Only the AD9431DN-24X, AD9430DN-24, AD9430DN-12, AP4030TN, AP4050DN-E,


AP5050DN-S, AP6050DN, AP6150DN, AP7050DN-E, AP7050DE, AP4051TN, AP6052DN,
AP7052DN, AP7152DN, AP7052DE, AP2050DN, AP2050DN-S, AP2050DN-E, AP2051DN,
AP2051DN-S, AP2051DN-E, AP4051DN, AP4151DN, AP4051DN-S, AP4050DN, AP4050DN-S,
AP4051DN-USA, AP1050DN-S, AP4050DN-HD, AP4030TN, AP7060DN, WA375DD-CE,
R250D-E and R251D-E support this command.

Format
umount driver

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 189


Fit AP
Command Reference 2 Basic Configurations Commands

Parameters
Parameter Description Value

driver Specifies the driver that The enumerated values


requires unloading. are:
● usb:
● sdcard:
The value sdcard: is
supported only by the
AD9430DN-12.

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 }

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 190


Fit AP
Command Reference 2 Basic Configurations Commands

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.

devicename Specifies the -


storage device
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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 191


Fit AP
Command Reference 2 Basic Configurations Commands

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

Parameter Description Value


source- Specifies the name The value is a string of 1 to 64 case-sensitive
filename of a source file to characters without spaces in the [ drive ]
be decompressed. [ 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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 192


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


destination- Specifies the name The value is a string of 1 to 64 case-sensitive
filename of a destination file characters without spaces in the [ drive ]
that is [ path ] file name format.
decompressed.
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 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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 193


Fit AP
Command Reference 2 Basic Configurations Commands

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 194


Fit AP
Command Reference 2 Basic Configurations Commands

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 195


Fit AP
Command Reference 2 Basic Configurations Commands

<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] verbose
Info: Succeeded in switching verbose on.
[Huawei-ftp] get h1.txt
200 Port command okay.
150 Opening ASCII mode data connection for h1.txt.

226 Transfer complete.


FTP: 69 byte(s) received in 0.160 second(s) 431.25byte(s)/sec.

# Disable the verbose function.


[Huawei-ftp] undo verbose
Info: Succeeded in switching verbose off.
[Huawei-ftp] get h1.txt

FTP: 69 byte(s) received in 0.150 second(s) 460.00byte(s)/sec.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 196


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


destination- Specifies the The value is a string of 1 to 64 case-sensitive
filename name of a characters without spaces in the [ drive ]
destination file [ path ] file name format.
that is
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:/

Idx Attr Size(Byte) Date Time(LMT) FileName


0 -rw- 155 Dec 02 2011 01:28:48 log.txt
1 -rw- 9,870 Oct 01 2011 00:22:46 patch.pat
2 drw- - Mar 22 2012 00:00:48 test

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 197


Fit AP
Command Reference 2 Basic Configurations Commands

3 -rw- 836 Dec 22 2011 16:55:46 rr.dat


...

1,927,220 KB total (1,130,464 KB free)


<Huawei> zip log.txt flash:/test/log.zip
<Huawei> cd test
Zip flash:/log.txt flash:/test/log.zip? (y/n)[n]:y
100% complete
Compressed file flash:/log.txt flash:/test/log.zip.
<Huawei> dir
Directory of flash:/test/

Idx Attr Size(Byte) Date Time(LMT) FileName


0 -rw- 836 Mar 20 2012 19:49:14 test
1 -rw- 239 Mar 22 2012 20:57:38 test.txt
2 -rw- 1,056 Dec 02 2011 01:28:48 log.txt
3 -rw- 240 Mar 22 2012 21:23:46 log.zip

1,927,220 KB total (1,130,463 KB free)

Related Topics
2.4.13 dir (user view)

2.5 Configuring System Startup Commands

2.5.1 display current-configuration

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 ]

display current-configuration [ all | inactive | [ simple ] [ section section ] ]

Parameters

Parameter Description Value


configuration Specifies the configuration The value is determined by
configuration-type type. the current system
configurations.
configuration-instance Specifies a configuration The value is a string of 1 to
instance. 80 case-insensitive
characters without spaces.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 198


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value


interface [ interface- Specifies an interface name -
name | interface-type or an interface type.
[ interface-number ] ]
feature feature-name Specifies a feature name. -
filter filter-expression Displays the configuration The value is a string of 1 to
information that matches a 255 case-insensitive
regular expression. characters without spaces.
all Displays all the -
configuration information.

inactive Displays the offline -


configuration information.

simple Displays the current simple -


configuration.
section section Specifies the configurations The value is a string of 1 to
to be obtained based on 79 case-insensitive
types. characters without spaces.

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.

You can use a regular expression to filter the command output.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 199


Fit AP
Command Reference 2 Basic Configurations Commands

2.5.2 display reset-reason

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

Table 2-23 Description of the display reset-reason command output

Item Description

frame Frame ID of a board.

board Slot ID of a board.

reset total Number of times a board was reset.

detailed information Detailed information about board


resetting.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 200


Fit AP
Command Reference 2 Basic Configurations Commands

Item Description

2014-09-01 00:00:06 Reset time point.


NOTE
When the reset reason is displayed as Reset
for power off and Reset for others, the
displayed time is the system startup time
rather than the reset time point.

Reset No. Number of a reset.

Reason Reason for a reset. For details, see Table


2-24.

MPU Main Processing Unit.

Table 2-24 Device reset reasons


Reason Description

Reset for power off The device is powered off.

Reset for kernel panic A kernel panic occurs.

Reset for switch zone after update An active/standby zone switchover


version occurs after an AP upgrade.

Reset for update version success The AP automatic upgrade is


successful.

Reset for update version failed The AP automatic upgrade fails.

Reset for exception A VOS exception occurs.

Reset for mfpi detect fwd abnormal The MSC module detects a PKO
module exception.

Reset for watchdog The watchdog resets.

Reset for cpld Data is written into the CPLD register.

Reset for reset-key The default key is pressed.

Reset for canbus The CANBUS resets.

Reset for ap disturbed APs are too close to each other,


causing interference.

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.

Reset for firmware abnormal An exception occurs on the Wi-Fi chip


firmware.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 201


Fit AP
Command Reference 2 Basic Configurations Commands

Reason Description

Reset for tx dma stop The Tx DMA process stops.

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 disable defence engine The security engine is disabled.

Reset for configuration synchronization The configuration synchronization


command command is executed.
In configuration synchronization
scenarios, when public configurations
on the master and master backup ACs
are different, you can synchronize the
configurations manually. Restart the
ACs as prompted.

Reset for auto configuration The configuration synchronization


synchronization command is executed.
In configuration synchronization
scenarios, when public configurations
on the master and master backup ACs
are different, the configurations can be
synchronized automatically. Restart
the ACs as prompted.

Reset for a country code change The country code is changed.

Reset for an AP MAC or SN change The AP authentication mode is


changed.

Reset for an AP upgrade The AP online upgrade is complete.

Reset for the undo ap command The AP is deleted using the undo ap
command.

Reset for license expiration The license expires.

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 DTLS configuration change The DTLS configuration changes.

Reset for a CAPWAP link fault The CAPWAP link status is abnormal.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 202


Fit AP
Command Reference 2 Basic Configurations Commands

Reason Description

Reset for restoration to factory The factory settings are restored using
defaults (by command) commands.

Reset for restoration to factory The factory settings are restored by


defaults (by button) pressing the reset button.

Reset for a dual-link backup switch An active/standby link switchover


change occurs.

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 an AP conflict state change The AP conflict state is changed.

Reset for an AP management VLAN The AP's management VLAN is


change changed.

Reset for commands in the provision- Commands configured in the AP


ap view provisioning view are delivered.

Reset for a country code mismatch The country code does not match.

Reset for an AC wideband status The AC bandwidth status is changed.


change

Reset for a central AP type change The central AP type is changed.

Reset for AP deleted by controller The AP is deleted from the Agile


Controller.

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 batch delete APs are deleted in a batch in HSB


scenarios.

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.

Reset for the IP address change The IP address is changed.

Reset for the forcible AP disconnection The AP is forcibly disconnected in


in specific scenarios specific scenarios.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 203


Fit AP
Command Reference 2 Basic Configurations Commands

Reason Description

Reset for AP self-healing (The AP is The AP does not go online on the AC


not online on the AC for consecutive for consecutive 24 hours.
24 hours)

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 due to different Ethernet When the Ethernet port configuration


interface configurations on the AP and of an AP is different from that on the
AC AC after going online, the AP uses the
configuration on the AC and restarts.

Reset for slow task switching Task switchover is slow.

Reset for a smart upgrade A smart upgrade of the AP succeeds.

Reset by user command A user command is executed.

Reset for the proxy scanning mode The proxy scanning mode of the radio
switching is switched.

Reset for others The device restarts due to other


reasons.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 204


Fit AP
Command Reference 2 Basic Configurations Commands

2.5.3 display startup

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

Table 2-25 Description of the display startup command output

Item Description

Current startup system software System software for the current startup

Backup startup system software Backup system software.

Next startup system software System software for the next startup

Startup patch package Patch file for current startup.


"Null" indicates that no patch file is
specified.

Next startup patch package Patch file for next startup.


"Null" indicates that no patch file is
specified for next startup.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 205


Fit AP
Command Reference 2 Basic Configurations Commands

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 206


Fit AP
Command Reference 2 Basic Configurations Commands

● 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

# Restart the device quickly.


<Huawei> reboot fast
System will reboot! Continue ? [y/n]: Y

2.5.5 reset factory-configuration

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

When an upstream device is connected to a central AP or an AP with two network


ports through an Eth-Trunk, you need to enable one member interface of the Eth-
Trunk and disable other member interfaces before restoring the factory settings of
the AP by holding down Default, or running the reset factory-configuration
command in the AC's WLAN view. Otherwise, loops and MAC address flapping
occur, and the network connection fails.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 207


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.5.6 startup patch

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

Run the reboot command to restart the device.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 208


Fit AP
Command Reference 2 Basic Configurations Commands

● 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

2.5.7 reset patch-configure

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 209


Fit AP
Command Reference 2 Basic Configurations Commands

<Huawei> reset patch-configure next-startup


The patch will be deleted. Continue? (y/n)[n]:y
Info: Succeeded in resetting the next-startup patch state.

2.5.8 startup system-software

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

Run the reboot command to restart the device.

Precautions

Example
# Specify the backup system software as the system software for next startup.
<Huawei> startup system-software backup

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 210


Fit AP
Command Reference 2 Basic Configurations Commands

Related Topics
2.5.3 display startup
2.5.4 reboot

2.6 Upgrade Commands

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

Only the AP5050DN-S, AP2051DN, AP2051DN-S, AP2051DN-E, AP1050DN-S, AP2050DN,


AP2050DN-S, AP2050DN-E, AP4050DN-HD, AP4050DN-E, AP7050DN-E, AP7050DE,
AD9430DN-12, AD9430DN-24, AP6150DN, AP6050DN, AP8130DN, AP8030DN, AP4050DN,
AP4051DN, AP4151DN, AP4050DN-S, AP8050DN, AP8150DN, AP8050DN-S, AP4051TN,
AP6052DN, AP7052DN, AP7152DN, AP7052DE, AP8050TN-HD, AP8082DN, AP8182DN,
AP4050DE-M, AP4050DE-M-S, AP4050DE-B-S, AP3050DE, AP7060DN, AP2051DN-L-S,
AP5510-W-GP support the ap-mode-switch { fat | cloud } command.
The AP4030TN do not support the cloud.

Parameters
Parameter Description Value

fat Switches a Fit AP to Fat -


AP.

cloud Switches a Fit AP to -


cloud AP.

Views
System view

Default Level
3: Management level

Usage Guidelines
Usage Scenario

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 211


Fit AP
Command Reference 2 Basic Configurations Commands

To switch a Fit AP to Fat AP or cloud AP, run the ap-mode-switch command to


switch the AP system software file.

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

2.6.2 ap-mode-switch check

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

Only AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP9132DN, AP5010DN-AGN


support this command.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 212


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.6.3 ap-mode-switch ftp


Function
The ap-mode-switch command connects an AP to an FTP server to download the
system software file for switching AP running mode.

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 ]

Table 2-26 Command support of APs


AP Model Whether the ap-mode- Whether the ap-mode-
switch ftp Command Is switch { fat | cloud } ftp
Supported Command Is Supported

AP5030DN/AP5130DN/ Yes No
AP4030DN/AP4130DN/
AP5030DN-S/
AP3030DN/AP9131DN/
AP9132DN/AP4030DN-
E/AP3010DN-V2

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 213


Fit AP
Command Reference 2 Basic Configurations Commands

AP Model Whether the ap-mode- Whether the ap-mode-


switch ftp Command Is switch { fat | cloud } ftp
Supported Command Is Supported

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

Other AP models do not support the preceding commands.

Parameters
Parameter Description Value

fat Switches a Fit AP to Fat -


AP.

cloud Switches a Fit AP to -


cloud AP.

filename Specifies the name of The value is a string of 1


the system software file to 127 characters
on an FTP server. without spaces. The
system software file has
an extension name
of .bin.

server-ip-address Specifies the IP address The value is in dotted


of an FTP server. decimal notation.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 214


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value

port Specifies the number of The value is an integer


the FTP server port to that ranges from 0 to
which the AP connects. 65535. The default value
is 21.

user-name Specifies the user name The value is a string of 1


for logging in to an FTP to 31 characters without
server. spaces.
The value cannot be
keywords in the
command lines, such as
ftp, tftp, or sftp.

password Specifies the password The value is a string of 1


for logging in to an FTP to 31 characters without
server. spaces.
The value cannot be
keywords in the
command lines, such as
ftp, tftp, or sftp.

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

Only AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP9132DN, AP5010DN-AGN


support this command.

Example
# Use the FTP server (192.168.1.1) to switch the AP5030DN running mode from
Fat AP to Fit AP.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 215


Fit AP
Command Reference 2 Basic Configurations Commands

<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

2.6.4 ap-mode-switch prepare

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

Only AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP9132DN, AP5010DN-


AGN support this command.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 216


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.6.5 ap-mode-switch sftp


Function
The ap-mode-switch sftp command connects an AP to an SFTP server to
download the system software file for switching AP running mode.

Format
ap-mode-switch { fat | cloud } sftp filename server-ip-address user-name
password [ port ]

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 217


Fit AP
Command Reference 2 Basic Configurations Commands

Table 2-27 Command support of APs


AP Model Whether the ap-mode- Whether the ap-mode-
switch sftp Command Is switch { fat | cloud }
Supported sftp Command Is
Supported

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

Other AP models do not support the preceding commands.

Parameters
Parameter Description Value

fat Switches a Fit AP to Fat -


AP.

cloud Switches a Fit AP to -


cloud AP.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 218


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value

filename Specifies the name of The value is a string of 1


the system software file to 127 characters
on an SFTP server. without spaces. The
system software file has
an extension name
of .bin.

server-ip-address Specifies the IP address The value is in dotted


of an SFTP server. decimal notation.

port Specifies the number of The value is an integer


the SFTP server port to that ranges from 0 to
which the AP connects. 65535. The default value
is 22.

user-name Specifies the user name The value is a string of 1


for logging in to an SFTP to 31 characters without
server. spaces.
The value cannot be
keywords in the
command lines, such as
ftp, tftp, or sftp.

password Specifies the password The value is a string of 1


for logging in to an SFTP to 31 characters without
server. spaces.
The value cannot be
keywords in the
command lines, such as
ftp, tftp, or sftp.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 219


Fit AP
Command Reference 2 Basic Configurations Commands

NOTE

Only AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP9132DN, AP5010DN-AGN


support this command.

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

2.6.6 ap-mode-switch tftp

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

Table 2-28 Command support of APs

AP Model Whether the ap-mode- Whether the ap-mode-


switch tftp Command Is switch { fat | cloud }
Supported tftp Command Is
Supported

AP5030DN/AP5130DN/ Yes No
AP4030DN/AP4130DN/
AP5030DN-S/
AP3030DN/AP9131DN/
AP9132DN/AP4030DN-
E/AP3010DN-V2

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 220


Fit AP
Command Reference 2 Basic Configurations Commands

AP Model Whether the ap-mode- Whether the ap-mode-


switch tftp Command Is switch { fat | cloud }
Supported tftp Command Is
Supported

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

Other AP models do not support the preceding commands.

Parameters
Parameter Description Value

fat Switches a Fit AP to Fat -


AP.

cloud Switches a Fit AP to -


cloud AP.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 221


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value

filename Specifies the name of The value is a string of 1


the system software file to 127 characters
on a TFTP server. without spaces. The
system software file has
an extension name
of .bin.

server-ip-address Specifies the IP address The value is in dotted


of a TFTP server. decimal notation.

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

Only AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP9132DN, AP5010DN-AGN


support this command.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 222


Fit AP
Command Reference 2 Basic Configurations Commands

Related Topics
2.6.2 ap-mode-switch check
2.6.3 ap-mode-switch ftp
2.6.5 ap-mode-switch sftp

2.6.7 display paf


Function
The display paf command displays information about the product adapter file
(PAF) in the system.

Format
display paf { all | { resource | service } item-name }

Parameters
Parameter Description Value

all Displays all information -


about the PAF file.

resource Specifies the value set for a -


resource item in the PAF
file.

service Specifies the value set for a -


service item in the PAF file.

item-name Specifies the name of a The value is a string of 1 to


resource item or a service 64 characters.
item.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 223


Fit AP
Command Reference 2 Basic Configurations Commands

<Huawei> display paf resource PAF_LCS_NQA_SPECS_NUM_ENTRY


PAF_LCS_NQA_SPECS_NUM_ENTRY = 0, 32, 32, 0

# 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

Table 2-29 Description of the display paf resource command output

Item Description

PAF_LCS_NQA_SPECS_NUM_ENTRY Resource item name in the PAF file.

0 Whether a resource item is controlled


by a license.
● 1: yes
● 0: no

32 Default value of the resource item in


the PAF file.

32 Maximum value of the resource item


in the PAF file.

0 Minimum value of the resource item in


the PAF file.

Table 2-30 Description of the display paf service command output

Item Description

PAF_LCS_BFD_BASIC_SPECS_ENABLED Service item name in the PAF file.

0 Whether a service item is controlled by


a license.
● 1: yes
● 0: no

1 Service status.
● 1: enabled
● 0: disabled

2.6.8 display patch-information

Function
The display patch-information command displays information about the current
patch package in the system.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 224


Fit AP
Command Reference 2 Basic Configurations Commands

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

Table 2-31 Description of the display patch-information command output

Item Description

Patch Package Name Name of the running patch package.

Patch Package Version Version of the running patch package.

The current state is State of the running patch package.

Type Patch type.

State Running status of the patch. (Running: The


patch is running.)

Count Number of patches of each type in the


system.

Time Activation time of patches of each type in


the system.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 225


Fit AP
Command Reference 2 Basic Configurations Commands

Related Topics
2.6.10 patch delete all
2.6.11 patch load

2.6.9 display upgrade failure-reason

Function
The display upgrade failure-reason command displays the reasons for the latest
upgrade failure.

NOTE

Only AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP9132DN, AP5010DN-


AGN support this command.

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.

Table 2-32 Causes of upgrade failures

Message Description

Error: Upgrade failed by Failure in obtaining the upgrade data.


getting data.

Error: Upgrade failed by Failure in decrypting the password.


decrypting password.

Error: Upgrade failed by Failure in configuring the IP address for the AP.
configuring ip address.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 226


Fit AP
Command Reference 2 Basic Configurations Commands

Message Description

Error: Upgrade failed by Failure in downloading the upgrade file. If this


downloading version file. error message is displayed, check network
connections and ensure that the fat AP can
communicate with the server.

Error: Upgrade failed by Unmatched versions. If this error message is


version mismatched. displayed, check whether the version file name
is modified.

Error: Upgrade failed by Invalid file name. If this error message is


invalid version filename. displayed, check whether the version file name
is modified.

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.

Error: Upgrade failed by Failure in restoring the factory settings.


resetting factory
configuration.

Error: Upgrade failed by Other causes.


other reasons.

Info: Upgrade successfully. Successful upgrade.

Example
# Display the reasons for the latest upgrade failure.
<Huawei> system-view
[Huawei] display upgrade failure-reason
Info: Connecting to remote server failed!

2.6.10 patch delete all

Function
The patch delete all command deletes patches on the current system.

Format
patch delete all

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 227


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.6.11 patch load

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

filename Specifies the path and The value is a string of 4


file name of a patch to 64 case-sensitive
package. The path can characters without
be an absolute path or a spaces. The file name
relative path. must have an extension
of .pat.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 228


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value

all Loads the patches of all -


boards.

run Runs loaded patches of -


all boards.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 229


Fit AP
Command Reference 2 Basic Configurations Commands

2.6.12 upgrade version check

Function
The upgrade version check command checks whether the upgrade assistant
package is available before a device upgrade.

NOTE

Only AP5030DN, AP5130DN, AP4030DN, AP4130DN, AP9131DN, AP9132DN, AP5010DN-


AGN support this command.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 230


Fit AP
Command Reference 2 Basic Configurations Commands

2.6.13 upgrade version ftp


Function
The upgrade version ftp command connects a device to an FTP server to
download the upgrade assistant package.

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

filename Specifies the name of The value is a string of 1


the upgrade assistant to 127 characters
package on an FTP without spaces. The
server. upgrade assistant
package has an
extension name of .bin.

server-ip-address Specifies the IP address The value is in dotted


of an FTP server. decimal notation.

ipv6 server-ipv6-address Specifies the IPv6 The value is a 32-digit


address of the FTP hexadecimal number, in
server. the format
X:X:X:X:X:X:X:X.

port Specifies the number of The value is an integer


the FTP server port to that ranges from 0 to
which the AP connects. 65535, The default value
is 21.

user-name Specifies the user name The value is a string of 1


for logging in to an FTP to 31 characters without
server. spaces.
The value cannot be
keywords in the
command lines, such as
ftp, tftp, or sftp.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 231


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value

password Specifies the password The value is a string of 1


for logging in to an FTP to 31 characters without
server. spaces.
The value cannot be
keywords in the
command lines, such as
ftp, tftp, or sftp.

signature signature- Checks the validity of the The value is a string of 1


name digital signature file of to 63 case-sensitive
the system software. characters without
spaces. The file name
extension must be .asc.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 232


Fit AP
Command Reference 2 Basic Configurations Commands

<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

2.6.14 upgrade version sftp


Function
The upgrade version sftp command connects a device to an SFTP server to
download the upgrade assistant package.

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

filename Specifies the name of The value is a string of 1


the upgrade assistant to 127 characters
package on an SFTP without spaces. The
server. upgrade assistant
package has an
extension name of .bin.

server-ip-address Specifies the IP address The value is in dotted


of an SFTP server. decimal notation.

ipv6 server-ipv6-address Specifies the IPv6 The value is a 32-digit


address of the SFTP hexadecimal number, in
server. the format
X:X:X:X:X:X:X:X.

port Specifies the number of The value is an integer


the SFTP server port to that ranges from 0 to
which the AP connects. 65535, The default value
is 22.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 233


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value

user-name Specifies the user name The value is a string of 1


for logging in to an SFTP to 31 characters without
server. spaces.
The value cannot be
keywords in the
command lines, such as
ftp, tftp, or sftp.

password Specifies the password The value is a string of 1


for logging in to an SFTP to 31 characters without
server. spaces.
The value cannot be
keywords in the
command lines, such as
ftp, tftp, or sftp.

signature signature- Checks the validity of the The value is a string of 1


name digital signature file of to 63 case-sensitive
the system software. characters without
spaces. The file name
extension must be .asc.

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.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 234


Fit AP
Command Reference 2 Basic Configurations Commands

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

2.6.15 upgrade version tftp


Function
The upgrade version tftp command connects a device to a TFTP server to
download the upgrade assistant package.

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

filename Specifies the name of The value is a string of 1


the upgrade assistant to 127 characters
package on a TFTP without spaces. The
server. upgrade assistant
package has an
extension name of .bin.

server-ip-address Specifies the IP address The value is in dotted


of a TFTP server. decimal notation.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 235


Fit AP
Command Reference 2 Basic Configurations Commands

Parameter Description Value

ipv6 server-ipv6-address Specifies the IPv6 The value is a 32-digit


address of the TFTP hexadecimal number, in
server. the format
X:X:X:X:X:X:X:X.

signature signature- Checks the validity of the The value is a string of 1


name digital signature file of to 63 case-sensitive
the system software. characters without
spaces. The file name
extension must be .asc.

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

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 236


Fit AP
Command Reference 2 Basic Configurations Commands

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.14 upgrade version sftp

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 237

You might also like