01-04 Basic Configurations Commands
01-04 Basic Configurations Commands
Function
The assistant task command creates an assistant task.
Format
assistant task task-name
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
An assistant task is a virtual assistant on the device to realize automatic
maintenance and management. After you create an assistant task and bind it to a
batch of files to be processed, the device performs operations or configurations
when it is unattended. Assistant tasks are mainly used for scheduled system
upgrade or configuration.
NOTE
Example
# Create an assistant task.
<Huawei> system-view
[Huawei] assistant task test
4.1.3 cls
Function
The cls command clears the current screen.
Format
cls
Parameters
None
Views
User view
Default Level
1: Monitoring level
Usage Guidelines
This command only clears the screen and does not clear the screen buffer.
Example
# Clear screen.
<Huawei> cls
Info: Current terminal monitor is off.
Info: Current terminal debugging is off.
Function
The command-privilege level command sets the command level in a specified
view.
Format
command-privilege level level view view-name command-key
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The system divides commands into four levels and sets the command level in the
specified view. The device administrator can change the command level as
required, so that a lower-level user can use some high-level commands. The device
administrator can also change the command level to a larger value to improve
device security.
When using this command to change the level of a command, you can run the
display command-view command-key command to check the view of the
specified command. You can also check common views in Table 4-1.
Precautions
You are not advised to change the default command level. If you need to change
it, consult with professional personnel to ensure that routine operation and
maintenance are not affected and security risk is avoided.
The rules for using this command to set the command level of a specified view are
as follows:
● When you degrade the target command, all keywords in the command are
degraded.
● When you upgrade the target command, only the last keyword in the
command is upgraded.
● When you set a level for the target command, the levels of all commands (in
the same view) starting with this command are changed.
● When you set a level for the target command, the keyword level in other
commands having the same index as the keyword whose level is changed is
also changed.
● If the level of keywords that have the same index is modified for multiple
times, the latest configured level takes effect.
Example
# Set the privilege level of the save command to 5.
<Huawei> system-view
[Huawei] command-privilege level 5 view cli_8f save
4.1.5 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 Huawei technical engineers.
Example
# Enter the diagnostic view.
<Huawei> system-view
[Huawei] diagnose
[Huawei-diagnose]
Format
display assistant task history [ task-name ]
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
The latest five operations of each assistant task are displayed in an earlier-to-later
order.
Example
# Displays operation records of an assistant task.
<Huawei> display assistant task history
--------------------------------------------------------------------------------
Assistant task name: nemo
--------------------------------------------------------------------------------
Assistant task name: song
Action type : Batch file
Batch file name: flash:/reboottest.bat
Start time : 2012-07-16 09:25:00
End time : 2012-07-16 09:25:00
State : Finished
--------------------------------------------------------------------------------
Assistant task name: xu
Action type : Batch file
Batch file name: flash:/reboottest.bat
Start time : 2012-07-16 09:25:00
End time : 2012-07-16 09:25:00
State : Finished
--------------------------------------------------------------------------------
Table 4-2 Description of the display assistant task history command output
Item Description
Item Description
Function
The display command-view command displays the view of a specified command.
Format
display command-view command-key
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
You can run this command to check the view of a specified command. For
example, if you need to run the command-privilege level command to change
the level of a specified command, run the display command-view command to
check the view of the specified command.
Example
# Display the view of the if-match timer cron command.
<Huawei> system-view
[Huawei] display command-view if-match timer cron
It will take several minutes, please wait.........
Matching result(s):
----------------
assistant-task
----------------
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.
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
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.
In versions earlier than V300R021C10SPC100:
<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
CTRL_H Erase the character left of the cursor
CTRL_K Kill outgoing connection when connecting
CTRL_N Display the next command from the history buffer
CTRL_P Display the previous command from the history buffer
CTRL_T Function as a question mark
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
=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
CTRL_H Erase the character left of the cursor
CTRL_J Line feed function
CTRL_K Kill outgoing connection when connecting
CTRL_N Display the next command from the history buffer
CTRL_P Display the previous command from the history buffer
CTRL_T Function as a question mark
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
Item Description
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 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] interface ethernet 2/0/0
[Huawei-Ethernet2/0/0] display this
#
interface Ethernet2/0/0
port link-type trunk
#
return
4.1.11 header
Function
The header command configures the header information displayed on a terminal
when users log in to a connected device.
Format
header { login | shell } { information text | file file-name }
Parameters
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 220
characters, if a linefeed is contained
in the first line. If no linefeed is
contained in the first line, a
maximum of 480 characters can be
entered at one time, and the total
string length ranges from 1 to 2000
characters.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To provide some prompts or alarms to users, you can use the header command to
configure a title on the device. If a user logs in to the device, the title is displayed.
Procedure
If information is specified, the header text starts and ends with the same
character. You can set the header text in either of the following modes:
● Non-interactive: enter the header text behind the start character.
Use the same character at the beginning and end of the header and press
Enter. If the start and end characters are inconsistent, the system prompts an
error message.
● Interactive: enter the start character and press Enter.
The system displays a message prompting the correct header information.
Then enter the required information and enter the same character at the
beginning and end of the header, and press Enter. The system quits the
interactive process.
During interaction, you can press Enter at any time to enter information in
the next line.
Precautions
● Before setting the login parameter, you must set login authentication
parameters; otherwise, no header information about authentication is
displayed.
● Before setting the file parameter, ensure that the file containing the header
exists; otherwise, the file name cannot be obtained.
● After you use the file parameter to specify the file used by the header, if the
header information does not contain all file information after you log in to
the device, you are advised to open the header file in text format and check
whether the file contains garbled characters. If the file contains garbled
characters, delete garbled characters and reconfigure the header { login |
shell } file file-name command.
● If the file parameter is specified, only a file (with any file name extension) in
flash:/header can be configured as the file that stores a login header.
● If you use SSH1.X to log in to the device, the shell header rather than the
login header is displayed.
● If you use SSH2.0 to log in to the device, both login and shell headers are
displayed in the login process.
● If the header command is configured several times, only the latest
configuration takes effect.
● After the login title is configured, any user that logs in to the system can view
the title.
● The start and end characters in the header text can be double quotation
marks (""). However, the header text content cannot contain double
quotation marks ("").
Example
# Configure a shell header. (non-interactive process)
<Huawei> system-view
[Huawei] header shell information &Hello! Welcome to system!& # Enter the header text behind the
start character '&' and enter '&' at the end of the header text, and press Enter.
# Press Enter. The shell header is displayed when the user logs in again.
Hello!
Welcome to system!
<Huawei>
4.1.12 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
Parameters
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
You can set a shortcut key for a command that is often used; you can also change
the default value of the shortcut key that is defined by the system according to
your requirements.
Precautions
Four shortcut keys are customized by users: CTRL+G, CTRL+L, CTRL+O, and CTRL
+U.
● By default, the shortcut key CTRL+G corresponds to the display current-
configuration command which displays current configuration.
● By default, the shortcut key CTRL+L corresponds to the undo idle-timeout
command which restores the default timeout period.
● By default, the shortcut key CTRL+O corresponds to the undo debugging all
command which stops the output of all debugging information.
After you use the hotkey command to set a shortcut key for a command, you can
run the command by pressing the shortcut key or entering a command.
NOTE
One shortcut key can be set for only one command. If you set a shortcut key for multiple
commands, only the latest configuration takes effect.
When assigning a command for a shortcut key, you need to mark the command with
double quotation marks if the command consists of several words, that is, the command
includes spaces. You do not need to mark the command with double quotation marks if the
command consists of only one word.
Example
# Assign the display tcp status command for the shortcut key CTRL+L.
<Huawei> system-view
[Huawei] hotkey ctrl_l "display tcp status"
[Huawei] display hotkey
----------------- HOTKEY -----------------
=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L display tcp status
CTRL_O undo debugging all
=Undefined hotkeys=
Hotkeys Command
CTRL_U NULL
=System hotkeys=
Hotkeys Function
CTRL_A Move the cursor to the beginning of the first line
CTRL_B Move the cursor one character left
CTRL_C Stop current command function
CTRL_D Erase current character
CTRL_E Move the cursor to the end of the Last line
CTRL_F Move the cursor one character right
CTRL_H Erase the character left of the cursor
CTRL_K Kill outgoing connection when connecting
CTRL_N Display the next command from the history buffer
CTRL_P Display the previous command from the history buffer
CTRL_T Function as a question mark
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
Format
if-match timer cron seconds minutes hours days-of-month months days-of-week
[ years ]
undo if-match timer cron
Parameters
Parameter Description Value
Views
Assistant task view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The if-match timer cron command is used to set the time to perform an assistant
task. The time is expressed in the cron format defined in UNIX or Linux.
The commonly used time format (hh:mm:ss dd-mm-yyyy) can specify only one
specific time value. The cron time format is more flexible and powerful and uses
simple methods to display single or multiple time, duration, and period. The
method is as follows:
● Valid characters include digits 0 to 9, and special characters asterisk (*),
hyphen (-), slash (/), and comma (,).
● This table shows the syntax of cron format:
Express Format Description Example
ion
Mode
Precautions
● If you run this command multiple times in the same view, only the latest
configuration takes effect.
● The days-of-month and days-of-week parameters are exclusive. Set one or
both of them to "*". If one parameter is set to *, the other one specifies a
specific date. If both parameters are set to *, they can refer to any date.
● The minimum unit supported is second, so set the second parameter to *. The
specified assistant task can work only once every minute.
● Since the system can perform only one assistant task at a time, the time
when one assistant task finished working may be later than the time when
the next task is schedule to start. There may be a time span between the time
when an assistant task is scheduled to work and the time when it actually
starts to work. The if-match timer cron command specifies the time when an
assistant task is scheduled to work.
● When you enter digits, such as 000002012, the numeric string means the
same as 2012.
Example
# Configure an assistant task to work at 20:00, 2012-05-04.
<Huawei> system-view
[Huawei] assistant task test
[Huawei-assistant-task-test] if-match timer cron * 0 20 4 5 * 2012
[Huawei-assistant-task-test] perform 1 batch-file sys.bat
Format
perform priority batch-file filename
undo perform priority
Parameters
Parameter Description Value
priority It has a fixed value of 1 at current
Specifies the priority of an
because one assistant task can
assistant task.
process only one batch file.
filename Specifies the name of the batch The value is a string of 5 to 64
file processed by the assistant case-insensitive characters
task. The file name is in the *.bat without spaces.
format.
Views
Assistant task template view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
After you successfully create an assistant task and specify the execution time, you
can run this command to configure the device to process a batch file at the
specified time.
Prerequisites
An assistant task has been created using the assistant task command and the
time at which the task is executed has been specified using the if-match timer
cron command.
Precautions
If an assistant task is being executed, stop the assistant task before you can delete
it. If an assistant task is to be executed, directly delete it. The device will not
execute the assistant task later.
By default, the commands listed in the batch file are executed in the system view.
Example
# Configure the assistant task huawei to process the batch file sys.bat at
2012-05-04 20:00.
<Huawei> system-view
[Huawei] assistant task huawei
[Huawei-assistant-task-huawei] if-match timer cron * 0 20 4 5 * 2012
[Huawei-assistant-task-huawei] perform 1 batch-file sys.bat
4.1.15 quit
Function
The quit command returns from the current view to a lower-level view. If the
current view is the user view, this command exits from the system.
Format
quit
Parameters
None
Views
All views
Default Level
0: Visit level
Usage Guidelines
Usage Scenario
Three types of views are available and they are listed as follows from a lower level
to a higher level:
● User view
● System view
● Service view, such as 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
4.1.16 return
Function
The return command returns to the user view from other views except the user
view.
Format
return
Parameters
None
Views
All views
Default Level
0: Visit 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>
Format
set current-configuration display [ all ] level level command-key
undo set current-configuration display [ all ] level level command-key
Parameters
Parameter Description Value
all Indicates that all configuration sub- -
items are displayed if the
configuration contains sub-items.
Views
System view
Default Level
3: Management level
Usage Guidelines
Use Scenario
After the administrator runs the command-privilege level command to degrade
the level of display current-configuration, low-level users can run the display
current-configuration command to view all device configurations.
To allow the low-level users to view the specified configurations, the administrator
can run the set current-configuration display command to specify the
configurations to be displayed.
Precaution
● If you enter a part of a command in the command-key parameter, the system
matches the commands starting with the characters you entered.
● If the command specified in command-key is executed in a sub-view, the
display current-configuration command displays the configurations in the
parent view.
● To view all configuration sub-items in a configuration item, use the all
keyword.
● If you run the set current-configuration display command multiple times,
multiple configurations can be specified. You can specify 128 configurations
for the user of the certain level.
Example
# Set the display current-configuration command level to 0 and specify the
configurations that level-0 users can view.
<Huawei> system-view
[Huawei] command-privilege level 0 view cli_8f display current-configuration
[Huawei] set current-configuration display level 0 ip address
[Huawei] set current-configuration display level 0 aaa
[Huawei] set current-configuration display level 0 network
#
interface LoopBack0
ip address 10.168.1.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 10.168.1.0 0.0.0.255
network 172.16.1.0 0.0.0.255
#
return
4.1.18 system-view
Function
The system-view command enables you to enter the system view from the user
view.
Format
system-view
Parameters
None
Views
User view
Default Level
2: Configuration level
Usage Guidelines
You must configure the device in the system view. Run this command in the user
view to enter the system view.
Example
# Enter the system view.
<Huawei> system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]
Hardware Requirements
Format
autoconfig enable
undo autoconfig enable
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
You can configure the Auto-Config function only after it is enabled. The
autoconfig enable command is used in the following scenarios:
● Auto-Config is disabled on the device (You can run the display autoconfig
enable command to check whether Auto-Config is enabled). In such a case,
you can use the autoconfig enable command to enable Auto-Config.
● If the Auto-Config function cannot be automatically recovered after an error
occurs in the Auto-Config process, run the undo autoconfig enable
Example
# Enable Auto-Config.
<Huawei> system-view
[Huawei] autoconfig enable
Info: Enable autoconfig successfully.
Format
autoconfig getting-file restart
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
If the device fails to obtain the intermediate file, system software, patch file or
configuration file, the Auto-Config process is suspended and needs to be restarted.
The autoconfig getting-file restart command restarts the Auto-Config process,
enabling the device to re-obtain the intermediate file, system software, patch file
and configuration file. The display autoconfig-status command displays whether
the Auto-Config process is suspended.
NOTE
This command can be executed only when obtaining files failed and the Auto-Config
process is suspended.
Example
# Configure the device to re-obtain files from the file server and continue the
AutoConfig process.
<Huawei> system-view
[Huawei] autoconfig getting-file restart
Format
autoconfig permit interface { interface-type interface-number | interface-name }
&<1-4>
undo autoconfig permit interface
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Example
# Configure GigabitEthernet 0/0/0 and GigabitEthernet 0/0/0.1 for Auto-Config
pre-configured deployment.
<Huawei> system-view
[Huawei] autoconfig permit interface GigabitEthernet 0/0/0 GigabitEthernet 0/0/0.1
Info: Interfaces have been configured for AutoConfig.
Format
autoconfig from pre-factory-configuration
undo autoconfig from pre-factory-configuration
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To use the plug-and-play deployment function with user-defined factory settings,
ensure that the autoconfig permit interface command has been run to configure
the interface for Auto-Config pre-configured deployment and the autoconfig
from pre-factory-configuration command has been run to enable the pre-
configured deployment function.
Prerequisites
Before enabling the pre-configured deployment function, ensure that the
autoconfig permit interface command has been run to configure the interface
for Auto-Config pre-configured deployment.
Precautions
To use the plug-and-play deployment function with user-defined factory settings,
run the autoconfig permit interface command to configure the interface for
Auto-Config pre-configured deployment and run the autoconfig from pre-
factory-configuration command to enable the pre-configured deployment
function. The two commands cannot take effect after being executed on the
device. To make the plug-and-play function take effect, write the two commands
into the configuration file, run the set factory-configuration command to set the
configuration file as factory settings, and ensure that there is no input on the
console port and no user login.
Example
# Enable the pre-configured deployment function on GigabitEthernet 0/0/0 and
GigabitEthernet 0/0/0.1.
<Huawei> system-view
[Huawei] autoconfig permit interface GigabitEthernet 0/0/0 GigabitEthernet 0/0/0.1
Info: Interfaces have been configured for AutoConfig.
[Huawei] autoconfig from pre-factory-configuration
Info: The autoconfig from pre-factory-configuration command is executed successfully.
Format
display autoconfig activating-config delay
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
After a user uses the Option 146 parameter to set the delay in restarting a device,
there is a delay in restarting the device after the version file, patch file, and
configuration file are downloaded using Auto-Config. After the device is restarted,
loaded files can take effect. Run the display autoconfig activating-config delay
command to check the configured delay in restarting a device.
Precautions
By default, the device is restarted immediately if no delay is set using the Option
146 parameter.
Example
# Display the delay in restarting a device after a configuration file is downloaded
using Auto-Config.
<Huawei> display autoconfig activating-config delay
The delay in activating configuration is 0 seconds.
Format
display autoconfig activating-config remanent-time
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
After a user uses the Option 146 parameter to set the delay in restarting a device,
there is a delay in restarting the device after the version file, patch file, and
configuration file are downloaded using Auto-Config. After the device is restarted,
loaded files can take effect. Run the display autoconfig activating-config
remanent-time command to check the remaining delay in restarting a device.
Precautions
By default, the device is restarted immediately if no delay is set using the Option
146 parameter.
Example
# Display the remaining delay in restarting a device after a configuration file is
downloaded using Auto-Config.
<Huawei> display autoconfig activating-config remanent-time
The remanent time of activating configuration is 10 seconds.
Format
display autoconfig enable
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Auto-Config runs only after it is enabled. You can run the display autoconfig
enable command to check whether Auto-Config is enabled to ensure that Auto-
Config runs properly.
Example
# Check whether Auto-Config is enabled.
Format
display autoconfig-status
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
None
Example
# Display the configuration and running status of Auto-Config.
<Huawei> display autoconfig-status
Running: No
Stop : Yes
Reason : Current startup configuration file already exists.
Suspend: No
Reason : --
Operation result: --
Failed reason : --
Can deploy configurations with a USB Whether a USB disk can be used for
disk deployment.
NOTE
The device can be configured using Auto-
Config or USB deployment. However, two
deployment methods cannot be used
together.
Item Description
Item Description
Item Description
Item Description
Item Description
The status of getting middle file phase Phase of obtaining the intermediate
file.
Item Description
Item Description
The status of getting patch file phase Phase of obtaining a patch file.
Item Description
Item Description
Item Description
Hardware Requirements
This section is applicable to all models. For details about differences for specific
models, see the description in the corresponding section.
4.3.2 autostart
Function
The autostart command displays the autostart view.
Format
autostart
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
To perform configurations related to Auto-Start, enter the autostart view first. You
can run this command in the system view to enter the autostart view.
Example
# Display the autostart view.
<Huawei> system-view
[Huawei] autostart
[Huawei-autostart]
Function
The autostart enable command enables Auto-Start on a device.
Format
autostart enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
You can run this command to enable Auto-Start. You can use Auto-Start to deploy
or upgrade a device only after enabling Auto-Start.
Example
# Enable Auto-Start.
[Huawei] autostart enable
Info: Enable autostart successfully.
Function
The autostart run command configures a device to immediately start the Auto-
Start process.
Format
autostart run
Parameters
None
Views
Autostart view
Default Level
3: Management level
Usage Guidelines
When the Auto-Start process fails, you can modify file server parameters or
reconfigure the intermediate file and file server, and run this command to
configure the device to immediately start the Auto-Start process.
Example
# Configure the device to immediately start the Auto-Start process.
<Huawei> system-view
[Huawei] autostart
[Huawei-autostart] autostart run
Are you sure to run autostart function? (Please set autostart config first.)[Y/N]:
y
Info: Autostart function run.
Function
The display autostart config command displays the file server configuration.
Format
display autostart config
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
You can run this command to view the file server configuration on the device,
including the type and IP address of the file server, and the user name and
password for accessing the file server.
Example
# Display the file server configuration.
[Huawei] display autostart config
Server type :FTP
Server IP address :192.168.1.1
Username :user1
Password :***
Format
display autostart status
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
None
Example
# Display the running status of Auto-Start.
[Huawei] display autostart status
Enable : Yes
Running: No
Suspend: No
Reason : --
Item Description
Can deploy configurations by USB disk Whether site deployment using a USB
or AutoConfig flash drive or Auto-Config is available:
● Yes: available
● No: unavailable
NOTE
The device can be deployed using a USB
flash drive, Auto-Config, or Auto-Start. The
three deployment modes are mutually
exclusive and only one of them can be
used at a time.
Item Description
Item Description
The status of getting middle file phase Phase of obtaining the intermediate
file.
Item Description
Item Description
The status of getting patch file phase Phase of obtaining the patch file.
4.3.7 ipaddress
Function
The ipaddress command configures the IP address of the file server.
The undo ipaddress command deletes the IP address of the file server.
Format
ipaddress ip
undo ipaddress
Parameters
Parameter Description Value
ip Specifies the IP address of the file The value is in dotted decimal
server. notation.
Views
Autostart view
Default Level
3: Management level
Usage Guidelines
Before using Auto-Start to deploy or upgrade a device, run this command to
configure the IP address of the file server. After the IP address is configured, the
device can connect to the corresponding file server based on the IP address and
download site deployment files.
Example
# Configure the IP address 192.168.1.20 for the file server.
<Huawei> system-view
[Huawei] autostart
[Huawei-autostart] ipaddress 192.168.1.20
Info: Set ip address successfully.
4.3.8 servertype
Function
The servertype command configures the type of the file server.
The undo servertype command restores the default type of the file server.
By default, the file server used in Auto-Start is an FTP server.
Format
servertype { ftp | sftp }
undo servertype
Parameters
Parameter Description Value
Views
Autostart view
Default Level
3: Management level
Usage Guidelines
Before using Auto-Start to deploy or upgrade a device, run this command to
configure the type of the file server.
If the file server type is set to FTP, the device connects to the file server and
downloads site deployment files using FTP. If the file server type is set to SFTP, the
device connects to the file server and downloads site deployment files using SFTP.
Site deployment files contain the intermediate file and one or more of the system
software, patch file, and configuration file.
Example
# Set the type of the file server to SFTP.
<Huawei> system-view
[Huawei] autostart
[Huawei-autostart] servertype sftp
Info: Set server type successfully.
4.3.9 username
Function
The username command configures the user name and password for accessing
the file server.
The undo username command deletes the user for accessing the file server.
By default, no user is configured for accessing the file server.
Format
username username password password
Parameters
Views
Autostart view
Default Level
3: Management level
Usage Guidelines
Before using Auto-Start to deploy or upgrade a device, run this command to
configure the user name and password for accessing the file server. After the user
name and password are configured, the device can be authenticated by and
connect to the file server.
Example
# Set the user name and password for accessing the file server to admin and
huawei, respectively.
<Huawei> system-view
[Huawei] autostart
[Huawei-autostart] username admin password huawei
Info: Set user name and password successfully.
Hardware Requirements
This section is applicable to all models. For details about differences for specific
models, see the description in the corresponding section.
Format
autoupdate enable
undo autoupdate enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Use Scenario
● If a device has the current configuration file (not an unconfigured device),
you must run the autoupdate enable command to enable the USB-based
deployment function before you can use a USB flash drive to upgrade the
device.
● If a device has no current configuration file (unconfigured), the device can be
upgraded using a flash drive regardless of whether the USB-based
deployment function is enabled.
Prerequisites
This command can take effect only after an authentication password for USB-
based deployment is configured by the set usb autoupdate password command.
Precautions
If the USB-based deployment is enabled, the clear usb autoupdate password
command disables the USB-based deployment function while deleting the
authentication password for USB-based deployment.
Example
# Enable the USB-based deployment function.
<Huawei> system-view
[Huawei] set usb autoupdate password huawei123
[Huawei] autoupdate enable
Info: Enable Autoupdate successfully.
Format
clear usb autoupdate [ hmac ] password
Parameters
Parameter Description Value
hmac Deletes the password used as the key to calculate the hash- -
based message authentication code (HMAC).
Views
System view
Default Level
3: Management level
Usage Guidelines
To disable password authentication for USB-based deployment, run this command
to delete the authentication password configured by the set usb autoupdate
password command.
If you need to disable password authentication for USB-based deployment, run
the clear usb autoupdate hmac password password command to delete the
password configured using the set usb autoupdate hamc password password
command as the key used to calculate the HMAC.
Example
# Delete the authentication password for USB-based deployment.
<Huawei> system-view
[Huawei] clear usb autoupdate password
<Huawei> system-view
[Huawei] clear usb autoupdate password
Info: Successfully cleared the password for USB autoupdate and disabled
# Delete the password configured as the key used to calculate the HMAC.
<Huawei> system-view
[Huawei] clear usb autoupdate hmac password
Info: Successfully cleared the HMAC password for USB autoupdate and disabled HMAC check.
Function
The display autoupdate enable command displays whether the USB-based
deployment function is enabled.
Format
display autoupdate enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
None
Example
# Check whether the USB-based deployment function is enabled.
<Huawei> system-view
[Huawei] display autoupdate enable
Autoupdate state: enabled.
Item Description
Format
display hmac enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
None
Example
# Check whether the HMAC check function is enabled for USB-based deployment.
<Huawei> system-view
[Huawei] display hmac enable
Autoupdate hmac check state: enabled.
Item Description
Format
display usb usb-id autoupdate state
Parameters
Parameter Description Value
usb-id Specifies the USB interface The value is an integer ranging from
ID. 0 to 1.
Views
User view
Default Level
3: Management level
Usage Guidelines
None
Example
# Display the USB-based deployment status.
<Huawei> display usb 1 autoupdate state
Info: Deployment using the USB flash drive is completed successfully.
Table 4-10 Description of the display usb autoupdate state command output
Item Description
Info: Deployment using a USB flash drive USB-based deployment has not
is not performed. started.
The undo hmac enable command disables the HMAC check function for USB-
based deployment.
By default, the HMAC check function is disabled.
Format
hmac enable
undo hmac enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Use Scenario
To improve security of USB-based deployment, you can run the hmac enable
command to enable the HMAC check function for USB-based deployment.
After HMAC check is configured for USB-based deployment, the device uses the
password configured using the set usb autoupdate hamc password password
command as the key to calculate an HMAC for the specified file based on the
HMAC-SHA256 algorithm. Then the device compares the calculated HMAC with
the value of the HMAC field in the index file. If the two HMAC values are the
same, the device considers the file to be downloaded valid.
Prerequisites
An authentication password has been configured using the set usb autoupdate
hamc password password command.
Precautions
If HMAC check is enabled for USB-based deployment, the command disables the
HMAC function while deleting the authentication password for USB-based
deployment. To delete the password used as the key to calculate an HMAC, run
the clear usb autoupdate hmac password password command.
Example
# Enable the HMAC check function for USB-based deployment.
<Huawei> system-view
[Huawei] set usb autoupdate password huawei123
[Huawei] hmac enable
Info: Enable Autoupdate hmac check successfully.
Function
The set usb autoupdate password command configures an authentication
password for USB-based deployment.
Format
set usb autoupdate hmac password password
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
The authentication password configured by this command is used in the following
scenarios:
● When HMAC check is enabled, the password configured using the set usb
autoupdate hamc password password command is used as the key to
calculate an HMAC.
NOTE
Currently, the HMAC can only be calculated using the HMAC-SHA256 algorithm.
● When downloading an encrypted configuration file from the USB flash drive,
the device uses the password configured using the set usb autoupdate
password password command to decrypt the configuration file.
NOTE
Currently, configuration files can be encrypted only when they are being compressed
into .zip format. The following encryption methods can be used:
● Simple text encryption: For example, when you compress a .cfg configuration file
into a .zip file, you can enter a password in the compression software to encrypt
the configuration file.
● AES256 encryption algorithm: For example, when you compress a .cfg
configuration file into a .zip file, you can select the AES256 mode and enter a
password in the compression software to encrypt the configuration file. This
encryption method is recommended because it is more secure.
The password used to encrypt the configuration file must be the same as the
password configured by the set usb autoupdate password command.
Example
# Set the authentication password used in USB-based deployment to huawei123.
<Huawei> system-view
[Huawei] set usb autoupdate password huawei123
Hardware Requirements
The undo sms config autodeploy enable command disables the SMS-based
deployment function.
Format
sms config autodeploy enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
As the enterprise network size expands, more branch devices need to be deployed.
Some devices are geographically dispersed and difficult to obtain wired resources
and have services deployed. SMS-based deployment function can solve this
problem. For example, deployment personnel can send deployment short
messages to devices through Short Message Service (SMS). Devices then receive
and parse the short messages, activate 3G/LTE links, and access the file server
through SFTP to obtain and load a configuration file for zero touch deployment in
a batch. By default, SMS-based deployment is enabled. After devices are deployed
successfully, you are advised to disable SMS-based deployment to prevent
unauthorized users from modifying device configurations using forged deployment
short messages.
Example
# Enable SMS-based deployment.
<Huawei> system-view
[Huawei] sms config autodeploy enable
Info: Enable the SMS config function successfully.
Function
The sms config caller command configures a mobile phone number whitelist.
The undo sms config caller command deletes a mobile phone number whitelist.
Format
sms config caller tel-number
Parameters
Parameter Description Value
tel-number Specifies the mobile phone The value is a string of 3 to 20
number segment in the characters without spaces and can
whitelist. contain digits 0 to 9.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
After devices are deployed successfully, you need to prevent device configurations
from being modified according to short messages sent from unauthorized phone
numbers. You can run the sms config caller command to configure a whitelist
that contains mobile phone number segments. Only the mobile phone numbers
that match all consecutive digits of any mobile phone number segment in the
whitelist are allowed to send short messages for service configurations.
Precautions
Example
# Add the mobile phone number segment 13812345678 to a whitelist to allow the
mobile phone number that matches this number segment to send short messages
for SMS-based deployment.
<Huawei> system-view
[Huawei] sms config caller 13812345678
Info: Succeed in setting whitelist.
Hardware Requirements
This section is applicable to all models. For details about differences for specific
models, see the description in the corresponding section.
Function
The display fast provisioning record command displays the automatic learning
record of an interface enabled with the fast provisioning function.
Format
display fast provisioning record [ interface interface-type interface-number ]
Parameters
Views
All views
Default Level
2: Configuration level
Usage Guidelines
None
Example
# Display the automatic learning records of interfaces enabled with the fast
provisioning function.
<Huawei> system-view
[Huawei] display fast provisioning record
----------Fast Provisioning Record-----------
Ethernet1/0/0.1
State : successful
Vlan : 11
IP : 172.16.0.1 Mask : 8
Fast provisioning num : 1
---------------------------------------------
Table 4-12 Description of the display fast provisioning record command output
Item Description
Format
display fast provisioning state
Parameters
None
Views
All views
Default Level
2: Configuration level
Usage Guidelines
None
Example
# Display the status of the fast provisioning function on interfaces.
<Huawei> system-view
[Huawei] display fast provisioning state
----------Fast Provisioning State-----------
GigabitEthernet0/0/1
GigabitEthernet0/0/1.1
State : enable
GigabitEthernet0/0/1.2
State : disable
---------------------------------------------
Table 4-13 Description of the display fast provisioning state command output
Item Description
Function
The fast provisioning enable command enables the fast provisioning function
globally.
The undo fast provisioning enable command disables the fast provisioning
function globally.
Format
fast provisioning enable [ restart ]
Parameters
Parameter Description Value
restart Indicates that the fast provisioning function is enabled -
globally after the device restarts.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Use Scenario
To enable the fast provisioning function, run the fast provisioning enable in the
system view.
Precautions
● After the fast provisioning function is disabled globally using the undo fast
provisioning enable command, the fast provisioning function configured on
interfaces also becomes invalid.
● After the fast provisioning function is enabled, the device starts a timer since
the first time the automatic learning function is triggered. The fast
provisioning function is automatically disabled globally and on interfaces 1
hour later. If the device restarts within 1 hour, the fast provisioning function
will not be automatically disabled 1 hour later. In this case, the fast
provisioning function can only be disabled using the undo fast provisioning
enable command.
● The configuration takes effect immediately when the fast provisioning
enable or undo fast provisioning enable command is used to enable or
disable the fast provisioning function.
● The configuration takes effect after the device restarts when the fast
provisioning enable restart command is used to enable the fast provisioning
function.
Example
# Enable the fast provisioning function globally.
<Huawei> system-view
[Huawei] fast provisioning enable
Format
fast-provisioning disable
Parameters
None
Views
Ethernet sub-interface view, serial sub-interface view, ADSL sub-interface view
Default Level
2: Configuration level
Usage Guidelines
Use Scenario
When the fast provisioning function is enabled on an interface using the fast-
provisioning enable command, all sub-interfaces of the interface have the
function enabled. If the fast provisioning function only needs to be enabled on
some sub-interfaces, run the fast-provisioning disable command to disable the
fast provisioning function on specified sub-interfaces.
Prerequisite
The fast provisioning function has been enabled on the main interface using the
fast-provisioning enable command.
Example
# Disable the fast provisioning function on the sub-interface GE1/0/0.1.
<Huawei> system-view
[Huawei] fast provisioning enable
[Huawei] interface gigabitEthernet 1/0/0
[Huawei-GigabitEthernet1/0/0] fast-provisioning enable
[Huawei-GigabitEthernet1/0/0] quit
[Huawei] interface gigabitEthernet 1/0/0.1
[Huawei-GigabitEthernet1/0/0.1] fast-provisioning disable
Format
fast-provisioning enable
Parameters
None
Views
Ethernet interface view, serial interface view, ADSL interface view
Default Level
2: Configuration level
Usage Guidelines
Use Scenario
You can run the fast-provisioning enable command to enable the fast
provisioning function on an interface. After the fast provisioning function is
enabled on an interface, sub-interfaces of the interface can automatically learn
and save information such as the VLAN, IP address, and DLCI from the peer device.
Currently, the fast provisioning function is supported by the following three kinds
of sub-interfaces:
● ADSL sub-interface: supports the fast provisioning function only when the
sub-interface is used in an IPoA scenario.
● Serial sub-interface: supports the fast provisioning function only when the
sub-interface is used in a synchronous or asynchronous sub-interface and the
sub-interface type is P2P.
● Ethernet sub-interface: supports the fast provisioning function only in a
scenario where packets carry one VLAN tag.
Prerequisite
The fast provisioning function has been enabled globally using the fast
provisioning enable command.
Precautions
Example
# Enable the fast provisioning function on GE1/0/0.
<Huawei> system-view
[Huawei] fast provisioning enable
[Huawei] interface gigabitEthernet 1/0/0
[Huawei-GigabitEthernet1/0/0] fast-provisioning enable
Format
reset fast-provisioning
Parameters
None
Views
Ethernet interface view, serial interface view, ADSL interface view, serial sub-
interface view, ADSL sub-interface view
Default Level
2: Configuration level
Usage Guidelines
Use Scenario
You can run the reset fast-provisioning command to clear configuration
information automatically learned by an interface using the fast provisioning
function. Sub-interfaces then can relearn configuration information automatically.
Precautions
● In the main interface view, run the reset fast-provisioning command to clear
all the configuration information learned by sub-interfaces of the main
interface.
● In the sub-interface view, run the reset fast-provisioning command to clear
the IP address learned by the sub-interface.
● After the fast provisioning function is enabled, the device starts a timer since
the first time the automatic learning function is triggered. The fast
provisioning function is automatically disabled globally and on interfaces 1
hour later. If the device restarts within 1 hour, the fast provisioning function
will not be automatically disabled 1 hour later. In this case, the fast
provisioning function can only be disabled using the undo fast provisioning
enable command.
Example
# Reset the status of the fast provisioning function on the sub-interface GE1/0/0.1.
<Huawei> system-view
[Huawei] interface gigabitEthernet 1/0/0.1
[Huawei-GigabitEthernet1/0/0.1] reset fast-provisioning
Format
clock datetime HH:MM:SS YYYY-MM-DD
Parameters
Parameter Description Value
YYYY-MM-DD Specifies the current YYYY specifies the year, which is an integer
date (year, month, ranging from 2017 to 2037. MM specifies
and day) on the the month, which is an integer ranging
device. from 1 to 12. DD specifies the day, which is
an integer ranging from 1 to 31.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
In the scenario where accurate absolute time is required, the current date and
time must be set on the device.
Prerequisite
The time zone and daylight saving time have been configured using the clock
timezone and clock daylight-saving-time commands. If the time zone and
daylight saving time are not configured, the clock datetime command sets a UTC
time.
Precautions
● The specified time must be in 24-hour format. If you do not specify MM and
SS, their values are 0. You must enter at least one digit to specify HH. For
example, when you enter 0, the time is 00:00:00.
● The specified year must be a four-digit number and the specified month and
day can be a one-digit number. For example, when you enter 2017-9-1, the
time is 2017-09-01.
● If the device is configured to restart at a specified time and if the system time
is changed to be more than 10 minutes later than the specified restart time,
the scheduled restart function will be disabled.
NOTE
The valid time range is based on the UTC, and this command sets the local time. If the
DST or time zone is specified in the current environment, the system automatically
converts the local time to the UTC.
For example, if you set the time zone to GMT+8 and the local date to 2017-1-1, the
UTC converted equals to the local date minus eight hours, which is 2016-12-31.
However, the valid date range is 2017 to 2037. As a result, the validity check fails, and
date setting fails.
Example
# Set the current time and date of the device to 0:0:0 2018-01-01.
<Huawei> clock datetime 0:0:0 2018-01-01
Format
clock daylight-saving-time time-zone-name one-year start-time start-date end-
time end-date offset
Parameters
Parameter Description Value
weekday Specifies a day of The value is Mon, Tue, Wed, Thu, Fri, Sat,
the week. or Sun.
month Specifies a month. The value is Jan, Feb, Mar, Apr, May, Jun,
Jul, Aug, Sep, Oct, Nov, or Dec.
start-year Specifies the start The value is in the format YYYY and
year. ranges from 2017 to 2037.
end-year Specifies the end The value is in the format YYYY and
year. ranges from 2017 to 2037.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Users can customize the DST zone according to their countries' or regions'
convention. In addition, users can set how far ahead clocks are adjusted forward,
usually an hour. With DST enabled, when it is time to start DST, the system time is
adjusted according to the user-specified DST. When it is time to end DST, the
system time automatically returns to the original time.
Configuration Impact
● If DST has not taken effect, removing the configurations will not affect the
system time.
Precautions
● The DST is configured in the summer. The DST duration ranges from one day
to one year.
● You can configure the start time and end time for periodic DST in one of the
following modes: date+date, week+week, date+week, and week+date.
Example
# Set periodic DST.
<Huawei> clock daylight-saving-time bj repeating 0 first sun jan 0 first sun apr 2 2018 2018
Function
The clock timezone command sets the local time zone.
The undo clock timezone command deletes the local time zone.
If you do not specify the time zone name, the system uses Default Zone Name.
Format
clock timezone time-zone-name { add | minus } offset
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The system clock is the time indicated by the system timestamp. Because the rules
governing local time differ in different regions, the system clock can be configured
to comply with the rules of any given region.
Precautions
● The specified time must be in 24-hour format. If you do not specify MM and
SS, their values are 0. You must enter at least one digit to specify HH. For
example, when you enter 0, the time is 00:00:00.
● After configuring the local time zone, run the display clock command to view
the configuration. The time in logs and diagnostic information uses the local
time adjusted based on the time zone and DST.
Example
# Set the local time zone name for Beijing China to BJ.
If the default UTC is London time 2018-12-01 00:00:00, Beijing time is London
time plus 08:00 because the offset from UTC is 8 hours.
<Huawei> clock datetime 0:0:0 2018-12-01
<Huawei> clock timezone BJ add 08:00:00
Format
display clock
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
You can run the display clock command to view the system date and clock setting
and adjust the setting if necessary.
Precautions
The system clock is set using the clock datetime, clock timezone, and clock
daylight-saving-time commands.
● If the three commands are not used, the original system clock is displayed
after you run the display clock command.
● You can use any combination of the three commands to configure the system
time. Table 4-14 lists the formats of the configured time.
The table assumes that the original system time is 08:00:00 on January 1, 2018.
● 1: indicates that the clock datetime command is used, in which the current
time and date is date-time.
● 2: indicates that the clock timezone command is used, in which the time
zone parameter is set and the time offset is zone-offset.
● 3: indicates that the clock daylight-saving-time command is used, in which
the DST parameters are set and the time offset is offset.
● [1]: indicates that the clock datetime command is optional.
Example
# Display the current system date and time.
<Huawei> display clock
<2018-01-01 03:00:06
Monday
Time Zone(Default Zone Name) : UTC+00:00
Daylight saving time :
Name : BJ
Repeat mode : one-year
Start year : 2018
End year : 2018
Start time : 01-01 06:00:00
End time : 09-01 06:00:00
Saving time : 01:00:00
Item Description
Item Description
4.7.6 sysname
Function
The sysname command sets the device host name.
The undo sysname command restores the default device host name.
By default, the device host name is Huawei.
Format
sysname host-name
undo sysname
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Changing the host name affects the command interface prompt. For example, if
the host name is Huawei, the user interface prompt is <Huawei>.
Example
# Set the host name to HuaweiA.
<Huawei> system-view
[Huawei] sysname HuaweiA
[HuaweiA]
Format
acl [ ipv6 ] acl-number { inbound | outbound }
undo acl [ ipv6 ] { inbound | outbound }
Parameters
Parameter Description Value
Views
User interface view
Default Level
2: Configuration 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.
Prerequisites
Before running this command, run the acl (system view) in the system view and
run the rule (basic ACL view) or rule (advanced ACL view) command to
configure an ACL.
If no rule is configured, login rights on the user interface are not restricted when
the acl command is executed.
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] acl 3001
[Huawei-acl-adv-3001] rule deny tcp source any destination-port eq telnet
[Huawei-acl-adv-3001] quit
[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
4.8.3 authentication-domain
Function
The authentication-domain command configures an authentication domain for a
type of users.
Format
authentication-domain domain-name
undo authentication-domain
Parameters
Parameter Description Value
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the authentication-domain command to change the currently used
authentication domain so that users of different access types can be authenticated
in different authentication domains.
NOTE
Currently, the device supports console and virtual type terminal (VTY) user interfaces.
Prerequisites
An authentication domain must have been created in AAA mode and the
authentication mode has been set to AAA using the authentication-mode
command.
Precautions
If you change the authentication mode to a non-AAA mode using the
authentication-mode command, the authentication domain configured using the
authentication-domain command restores to default.
Example
# Configure the authentication domain domain1 for users on the console user
interface.
<Huawei> system-view
[Huawei] aaa
[Huawei-aaa] domain domain1
[Huawei-aaa] quit
[Huawei] user-interface console 0
[Huawei-ui-console0] authentication-mode aaa
[Huawei-ui-console0] authentication-domain domain1
Format
authentication-mode { aaa | password }
undo authentication-mode
Parameters
Parameter Description Value
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When a user logs in to the device using the console interface for the first time, the
system prompts the user to set the login password. After the user logs in to the
device, the user can run the authentication-mode command to change the
authentication mode.
Before Telnet or SSH users log in to the device using VTY user interface, they must
run the authentication-mode command to configure the authentication mode.
Precautions
To ensure that users can log in to the device successfully, configure the
authentication mode.
● After you set the authentication mode for accessing a user interface to
password, run the set authentication password command to configure an
authentication password. Keep the password safe. You need to enter the
password when logging in to the device. The levels of commands accessible to
a user depend on the level configured for the user interface to which the user
logs in.
● When the authentication mode is set to aaa, the authentication password is
deleted at the same time. Users are required to enter the login user name and
password to log in to the device. After login, the level of the commands the
user can run depends on the level of the local user specified in AAA
configuration.
● If the current login channel has a password, enter the password when you
want to modify or delete the authentication mode of a VTY channel range
that contains the current login channel.
Example
# Configure the authentication mode for accessing the user interface.
<Huawei> system-view
[Huawei] user-interface vty 0
[Huawei-ui-vty0] authentication-mode aaa
Format
auto-execute command command
undo auto-execute command
Parameters
Parameter Description Value
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.
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
[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
4.8.6 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.
Format
databits { 5 | 6 | 7 | 8 }
undo databits
Parameters
Parameter Description Value
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.
The setting is valid only when the serial port is configured to work in
asynchronous mode.
NOTE
The data bit of the console user interface does not support 5 and 6.
Example
# Set the number of data bits to 7.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] databits 7
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
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 3 --
GigabitEthernet0/0/1 4 --
GigabitEthernet0/0/2 5 --
Item Description
Function
The display user-interface command displays information about a user interface.
Format
display user-interface [ ui-type ui-number1 | ui-number ] [ summary ]
Parameters
Parameter Description Value
ui-type Displays information about a The value can be Console, VTY, TTY
specified user interface. or Web.
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Using the display user-interface command, you can view detailed configuration
information about all user interfaces or a specified user interface.
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 - 3 - P -
+ : Current UI is active.
F : Current UI is active and work in async mode.
Idx : Absolute index of UIs.
Type : Type and relative index of UIs.
Privi: The privilege of UIs.
ActualPrivi: The actual privilege of user-interface.
Auth : The authentication mode of UIs.
A : Authenticate use AAA. N : Current UI need not authentication. P : Authenticate use current
UI's password.
Int : The physical location of UIs.
Parameter Description
A AAA authentication.
P Password authentication.
Function
The display user-interface maximum-vty command displays the maximum
number of VTY users.
Format
display user-interface maximum-vty
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run the display user-interface maximum-vty command to view the
maximum number of users who connect to the device using Telnet or SSH. By
default, the total number of Telnet users and SSH users is five maximum.
Example
# Display the maximum number of VTY users.
<Huawei> display user-interface maximum-vty
Maximum of VTY user : 5
Format
display users [ all ]
Parameters
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.
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
129 VTY 0 00:00:00 TEL 10.164.6.10 pass
Username : user1
+ 130 VTY 1 00:00:00 TEL 10.164.6.15 pass
Username : user2
Item Description
Item Description
Delay Interval from the user's latest input to the current time, in
seconds.
Username User name for logging in to the device. If the user name is
not specified, Unspecified is displayed.
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.
Example
# Display the VTY mode.
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.
4.8.13 flow-control
Function
The flow-control command configures the flow control mode.
The undo flow-control command restores the default flow control mode.
The default flow control mode is none, that is, flow control is disabled.
NOTE
Format
flow-control { hardware | none }
undo flow-control
Parameters
Views
User interface view
Default Level
3: Management level
Usage Guidelines
The configuration is effective only when the serial interface works in asynchronous
interaction mode.
Example
# Set the flow control mode to hardware flow control in the user view.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] flow-control hardware
Function
The free user-interface command disconnects the device from a specified user
interface.
Format
free user-interface { ui-number | ui-type ui-number1 }
Parameters
Parameter Description Value
ui-type Specifies the type of a user The value can be TTY, Console, VTY or
interface. Web.
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 Console1 will be freed. Continue? [Y/N]:y
The undo history-command max-size command restores the default size of the
historical command buffer.
Format
history-command max-size size-value
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
2: Configuration 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
4.8.16 idle-timeout
Function
The idle-timeout command sets the timeout duration for disconnection from a
user interface.
Format
idle-timeout minutes [ seconds ]
undo idle-timeout
Parameters
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
● If you set the time to zero, then the line connection remains alive until you
close it.
● If the user interface disconnection function is not configured, other users may
fail to log in to the device.
● If the idle timeout interval is set to 0 or a large value, the terminal will remain
in the login state, resulting in security risks. You are advised to run the lock
command to lock the current connection.
● You are advised to set the timeout duration to 10-15 minutes.
NOTE
If AAA authentication is required for login users, the timeout duration configured by the
local-user idle-timeout command takes effect. If no timeout duration is configured or the
undo local-user idle-timeout command is executed in the AAA view, the timeout duration
configured by the idle-timeout command on the user interface takes effect.
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
4.8.17 parity
Function
The parity command sets the parity bit of a user interface.
Format
parity { even | none | odd }
undo parity
Parameters
Views
User interface view
Default Level
3: Management level
Usage Guidelines
The setting is valid only when the serial port is configured to work in
asynchronous mode.
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
Format
protocol inbound { all | ssh | telnet }
Parameters
Parameter Description Value
all Indicates that all protocols including SSH and Telnet are -
supported.
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To manage and monitor login users, configure the VTY user interface for login
users and run the protocol inbound command to configure the protocols that the
VTY user interface supports.
Prerequisites
If SSH is configured for the user interface using the protocol inbound command,
you must configure the authentication-mode aaa authentication mode to ensure
successful logins. If the password authentication mode is configured, the protocol
inbound ssh command cannot be executed.
Precautions
● The configuration takes effect at the next login.
● When SSH is specified for the VTY user interface, the SSH server function is
enabled, and the RSA key is not configured, a user cannot log in to the SSH
server using SSH.
Example
# Configure SSH for user interfaces VTY0 to VTY4.
<Huawei> system-view
[Huawei] user-interface vty 0 4
[Huawei-ui-vty0-4] authentication-mode aaa
[Huawei-ui-vty0-4] protocol inbound ssh
4.8.19 screen-length
Function
The screen-length command sets the number of lines on each terminal screen
after you run a command.
Format
In the user interface view:
Parameters
Parameter Description Value
Views
User interface view, user view
Default Level
3: Management level
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.
NOTE
In the user view, the temporary parameter is mandatory and this command is at the
Monitoring level. The configured value takes effect only on the current VTY user interface
but does not take effect on the next login on the same user interface or login on other VTY
user interfaces.
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
4.8.20 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, 80 columns are displayed on a terminal screen.
Format
screen-width screen-width
undo screen-width
Parameters
Parameter Description Value
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When you log in to the device from a console interface and run the display
interface description [ interface-type [ interface-number ] ] command to view
the interface information, output information does not automatically change to
another line, resulting in wrong format of the output information.
To resolve this problem, run the screen-width command to adjust the information
format. In general, you do not need to adjust the number of columns displayed on
the terminal screen. Setting the number of columns displayed on a screen is not
recommended.
Precautions
The number of columns set using the screen-width command is valid only for the
current interface. The setting is not saved after you log out. When you log in to
the device from the console interface and configure this command, the number of
columns displayed on the terminal screen is valid only for the current console
interface, which has no impact on other users who log in to the device from the
VTY interface or other interfaces. If you log out of the console interface and log in
to the device again, the default width is used for the terminal screen.
This command is valid only for information displayed by the display interface
description [ interface-type [ interface-number ] ] command.
Example
# Set the screen width to 100.
<Huawei> screen-width 100
Warning: This command will change the default screen width. Continue? [Y/N]:y
Info: Succeeded in setting the screen width to 100.
Function
The set authentication password command configures a local authentication
password.
By default, the local authentication password is not configured for the device.
Format
set authentication password cipher
Parameters
Parameter Description Value
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If password authentication is configured for users, you can run the set
authentication password command to change the password or set a password in
cipher text.
Pre-configuration Tasks
Before running the set authentication password command, ensure that password
authentication has been configured for the user interface.
Precautions
● The passwords must meet the following requirements:
– The password is a string of 8 to 128 case-sensitive characters.
NOTE
After user run the set password min-length command, the minimum length of
the password is the password length set using the set password min-length
command.
– 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.
● Users can press CTRL_C to cancel password modification in the interaction
mode.
● If the current login channel has a password, enter the password when you
want to set an authentication password for a VTY channel range that contains
the current login channel.
● If the password authentication is configured but the password is not
configured for the user interface, the user cannot log in to the device.
● If the set authentication password command is executed multiple times, the
latest configuration overrides the previous ones. You can run the set
authentication password command to change the local authentication
password. After the password is changed, a user who wants to log in to the
device must enter the latest password for identity authentication.
Example
# Set the local authentication password for the user interfaces VTY 0-4.
<Huawei> system-view
[Huawei] user-interface vty 0 4
[Huawei-ui-vty0-4] set authentication password cipher
Enter Password(<8-128>):
Confirm Password:
[Huawei-ui-vty0-4]
Format
set password min-length min-length
undo set password min-length
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To set the minimum password length, run the set password min-length
command. Then the entered password on the device cannot be less than the
configured minimum length.
If the minimum password length does not need to be limited, run the undo set
password min-length command to cancel the minimum password length
configuration.
Precautions
This command limits the minimum length of only the password configured using
the following commands:
● 4.9.18 lock
● 21.1.63 local-user change-password
● set authentication password
● 5.4.8 ntp-service authentication-keyid
● 5.4.8 ntp-service authentication-keyid
● 23.5.3 cwmp acs password
● 23.5.12 cwmp cpe password
● 4.4.8 set usb autoupdate password
● 4.9.49 super password
● 23.1.18 snmp-agent community
● 21.1.60 local-user
Example
# Set the minimum password length to 10.
<Huawei> system-view
[Huawei] set password min-length 10
4.8.23 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 Console user interface and a VTY user
interface and disabled on a TTY user interface.
Format
shell
undo shell
Parameters
None
Views
User interface view
Default Level
3: Management level
Usage Guidelines
You can use the shell command on a user interface to enable terminal services.
This command enables users to enter commands through this interface to query
device information and configure the device.
You can use the undo shell command on the user interface to disable terminal
services. This command does not allow users to perform any operations through
this interface. After the undo shell command is configured on the console user
interface view, the user interface does not provide access through the console
interface and MiniUSB interface. After using the undo shell command in the VTY
view and TTY view, this user interface does not provide Telnet, STelnet, and SFTP
access.
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
Format
speed speed-value
undo speed
Parameters
Parameter Description Value
Views
User interface view
Default Level
3: Management level
Usage Guidelines
The setting is valid only when the serial port is configured to work in
asynchronous mode.
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
4.8.25 stopbits
Function
The stopbits command sets the stop bit of a user interface.
The undo stopbits command restores the default stop bit of a user interface.
Format
stopbits { 1.5 | 1 | 2 }
undo stopbits
Parameters
Parameter Description Value
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.
The setting is valid only when the serial port is configured to work in
asynchronous mode.
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
By default, users who log in to the device using the console interface are at level
15 and other users are at level 0.
Format
user privilege level level
Parameters
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The system manages users at levels to control their access permissions. Users who
log in to the device can use only commands at the same or lower level than their
own levels.
Commands are classified into the visit level, monitoring level, configuration level,
and management level that map levels 0, 1, 2, and 3, as listed in Table 4-20.
Precautions
Example
# Set the user level on the VTY0 user interface to 2.
<Huawei> system-view
[Huawei] user-interface vty 0
[Huawei-ui-vty0] user privilege level 2
# Log in to the device using Telnet and view detailed information about the VTY0
user interface.
<Huawei> display user-interface vty 0
Idx Type Tx/Rx Modem Privi ActualPrivi Auth Int
+ 129 VTY 0 - 2 15 N -
+ : Current UI is active.
F : Current UI is active and work in async mode.
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.
Item Description
Item Description
4.8.27 user-interface
Function
The user-interface command displays one or multiple user interface views.
Format
user-interface [ ui-type ] first-ui-number [ last-ui-number ]
Parameters
Parameter Description Value
ui-type Specifies the type of a user The value can be console, tty, vty
interface. or web.
● If the user interface is
specified, the relative
number is used.
● If the user interface is not
specified, the absolute
number is used.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When the network administrator logs in to the device using the console interface,
asynchronous serial interface, Telnet, web, 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
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.
TTY user Manages and controls 1 to 128 The first one is TTY 1,
interface users that log in to the the second one is TTY
device using the 2, and so forth.
asynchronous serial Absolute numbers 1 to
interface. 128 map relative
numbers TTY 1 to TTY
128.
VTY user Manages and controls 129 to 143 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 129
to 143 map relative
numbers VTY 0 to VTY
14.
Web user Manages and monitors 149 to 153 The first web user
interface users who log in through interface is Web 0, the
the web system. second web user
interface is Web 1, and
so on. By default, Web
0 to Web 4 are
available.
Absolute numbers 149
to 153 map relative
numbers Web 0 to
Web 4.
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]
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
Usage Scenario
To enter the current user interface view, run the display user-interface command
without the user interface number.
Precautions
The user interface varies according to the login mode. The user interface views can
be numbered using absolute numbers or relative numbers. Table 4-22 describes
absolute and relative numbers of user interfaces.
NOTE
● The relative numbering uniquely specifies a user interface or a group of user interfaces
of the same type.
● The absolute numbering specifies a user interface or a group of user interfaces.
Example
# Enter the current user view.
<Huawei> system-view
[Huawei] user-interface current
[Huawei-ui-vty1]
Function
The user-interface maximum-vty command configures the maximum number of
login users.
Format
user-interface maximum-vty number
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
● If the maximum number that you set is smaller than the number of current
online users, the system displays a configuration failure message.
● The maximum number of login users set by the user-interface maximum-vty
command is the total number of Telnet and SSH users.
● If the maximum number of login users is set to 0, no user is allowed to log in
to the device using Telnet or SSH.
Example
# Set the maximum number of Telnet users to 7.
<Huawei> system-view
[Huawei] user-interface maximum-vty 7
Hardware Requirements
This section is applicable to all models. For details about differences for specific
models, see the description in the corresponding section.
4.9.2 connect
Function
The connect command establishes a control connection between a dumb terminal
and a remote server.
Format
connect host [ port-number ] [ -a source-ip-address | -i interface-type interface-
number ] [ -t interval ]
undo connect
Parameters
Parameter Description Value
Views
TTY user interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If a dumb terminal that has no IP address configured initiates a control connection
setup request to a remote server through the router, run the connect command
on the router to establish a control connection between the dumb terminal and
remote server.
Precautions
The dumb terminal must connect to the asynchronous serial interface of the
router.
If -t interval is not specified, the local router does not automatically establish a
control connection to the remoter server.
Example
# Establish a control connection between the dumb terminal and remote server.
<Huawei> system-view
[Huawei] user-interface tty 41
[Huawei-ui-tty41] undo shell
[Huawei-ui-tty41] connect 1.1.1.2 1025 -a 1.1.1.1
Format
config lock
undo config lock
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To prevent other users from modifying or deleting configured data, you can run
the config lock command to lock the configuration management plane before
data configuration. After completing data configuration, run the undo config lock
command to unlock the configuration management plan so that other users can
perform data configuration.
Precautions
The locked system configuration can be unlocked by only the user who locks it,
the super administrator (run the user privilege command to set the user level to
15), or the network management system (NMS) user.
Example
# Lock the system configuration.
<Huawei> system-view
Enter system view, return user view with Ctrl+Z.
[Huawei] config lock
Info: The system config is locked
Function
The config unlock interval command configures the interval for unlocking a
device.
Format
config unlock interval time
Parameters
Parameter Description Value
time Specifies the interval for The value is an integer ranging from
unlocking a device. 1 to 255, in minutes.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the device configuration is clocked by the config lock command, other users
cannot modify the configuration. In this case, the config unlock interval
command can be used to configure the unlock interval, after which the device
configuration is unlocked automatically.
Precautions
This command can be used by only the super administrator (run the user
privilege command to set the user level to 15) and NMS user.
If you run the command multiple times, only the latest configuration takes effect.
The unlocking interval starts from the last time the current user configures the
system.
Example
# Set the unlock interval to 2 minutes.
<Huawei> system-view
[Huawei] config unlock interval 2
# The following message is displayed when the configured unlock interval arrives.
[Huawei]
Info: The system config is unlocked
Format
display config lock
Parameters
None
Views
All views
Default Level
2: Configuration level
Usage Guidelines
The information includes whether the system configuration is locked and the lock
duration If you cannot configure the Router after login, run this command. The
command output helps you locate faults. If the system configuration is locked, the
command output includes the following: type, name, and IP address of the user
who locks the configuration. If no IP address is available, locked user IP address
is blank.
If the current system configuration is locks by a user (user A), only users at the
same level as or higher level than user A can query user A information. If users at
a lower level queries user A information, the system displays a message indicating
that the system configuration is locked by a user with a higher level.
Example
# Display lock information about the system configuration (when configuration is
not locked).
<Huawei> display config lock
------------------------------------------------------------------------------
Item Description
locked user type Type of the user who locks the system
configuration. The user can be any of
the following types:
● CON: Console type
● TEL: Telnet type
● SSH: SSH type
● WEB: Web type
locked user name Name of the user who locks the system
configuration.
Format
display ecc local-key-pair public
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the display ecc local-key-pair public command to check information
about the public key in the local ECC key pair on a client and then copy the public
key to the server. The public key enables a server to authenticate users and
ensures the login of authorized users.
Pre-configuration Tasks
You must run the ecc local-key-pair create command to generate a local ECC
host key pair before using the command.
Example
# Display information about the public key in the local ECC key pair on a client.
<Huawei> display ecc local-key-pair public
=====================================================
Time of Key pair created:2016-06-10 04:45:43+00:00
Key name : localhost_Host_ECC
Key modulus : 256
Key type : ECC encryption Key
Key fingerprint:
=====================================================
Key code:
04B8EC97 382591C6 BE764727 0B06F673 4E3FF3C9 C10F98F9 4D7D9B09 593DF604
D1465979 107F638D 59771BD1 C1C2D325 B7C3A331 9646B76F A9BACA98 4C0F19D2
BC
Table 4-25 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.
Host public key for PEM format PEM code of the public key in the local
code ECC key pair.
Public key code for pasting into Public key in the local ECC key pair used
OpenSSH authorized_keys file for OpenSSH authentication. Copy the
public key to the authorized_keys file of
OpenSSH to make the key effective.
Format
display ecc peer-public-key [ brief | name key-name ]
Parameters
Parameter Description Value
name key-name Displays the ECC public key with The value is a string of 1
the specified name. to 30 case-sensitive
characters without spaces.
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the display ecc peer-public-key command on a client to check
information about the public key configured on the remote end. The public key
enables a server to authenticate users and ensures the login of authorized users.
Example
# Display brief information about all the ECC public keys.
<Huawei> display ecc peer-public-key brief
------------------------------------------
Bits Name
------------------------------------------
256 testecc
------------------------------------------
# Display detailed information about the ECC public key named testecc.
<Huawei> display ecc peer-public-key name testecc
=====================================
Key name: testecc
Format
display rsa local-key-pair public
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run this command on the client and configure the client public key in the
command output to the SSH server, which ensures that the SSH client validity
check by the SSH server is successful and enables the secure data exchange
between the SSH server and client.
Example
# Display the public key in the local key pair.
<Huawei> display rsa local-key-pair public
=====================================================
Key code:
3047
0240
D538B7FC 3AFE1F5B F6C921F9 3D8C5322
905F623A
F0123161 3DA61EEB F5E897CF DC126060
546CC84E
B2AB7424 3EFF5D71 D84C5FE2 3E2BF5B3
D82DD979
A22E4AA1
0203
010001
=====================================================
Key code:
3067
0260
C51C2C01 56B06E6C EBF9055C F7AD9781
46B41A31
5FC87282 E53CFE30 8E6321D3 AC74E948
0A010339
E67C290E 2E0E8E40 BF5E1C97 F9C856EF
568DC159
1A6D28ED AFFB474B 43EFB632 CFB0875F
85420EEA
1919095B A5BC38D0 5FFF169E
0BDB3DC3
0203
010001
Table 4-27 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.
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
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 4-28 Description of the display rsa peer-public-key brief command output
Item Description
# Display the detailed information about the RSA public key named rsakey001.
<Huawei> display rsa peer-public-key name rsakey001
=====================================
Key name: rsakey001
=====================================
Key Code:
3067
0260
A3158E6C F252C039 135FFC45 F1E4BA9B 4AED2D88 D99B2463 3E42E13A 92A95A37
45CDF037 1AF1A910 AAE3601C 2EB70589 91AF1BB5 BD66E31A A9150911 859CAB0E
1E10548C D70D000C 55A1A217 F4EA2F06 E44BD438 DA472F14 3FB7087B 45E77C05
0203
010001
Table 4-29 Description of the display rsa peer-public-key name command output
Item Description
Function
The display ssh server command displays the SSH server information.
Format
display ssh server { status | session }
Parameters
Parameter Description Value
Views
All views
Default Level
3: Management 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 :1.99
SSH connection timeout :120 seconds
SSH server key generating interval :0 hours
SSH Authentication retries :3 times
SFTP Server :Enable
Stelnet server :Enable
Scp server :Disable
SSH server ciper :aes128-ctr aes192-ctr aes256-ctr
SSH server mac :hmac-sha2-256
SSH server key :diffie-hellman-group14-sha1 diffie-hellman-group14-sha256 diffie-hellman-
group-exchange-sha1
Table 4-30 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.
Item Description
SSH connection timeout SSH connection timeout interval. The value ranges
from 60 to 120, in seconds. The default value is
60.
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, in hours.
Run the ssh server rekey-interval command to
set this item.
SSH server mac HMAC algorithm supported by the SSH server. The
default HMAC algorithm is hmac-sha2-256.
Run the ssh server hmac command to set this
item.
Table 4-31 Description of the display ssh server session command output
Item Description
Function
The display ssh user-information command displays the configuration of all SSH
users.
Format
display ssh user-information [ username ]
Parameters
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
This command displays the SSH user name, bound RSA public key name, and
service type.
Example
# Display the configuration of all SSH users.
<Huawei> display ssh user-information
-------------------------------------------------------------------------------
Username Auth-type User-public-key-name
-------------------------------------------------------------------------------
a password null
-------------------------------------------------------------------------------
Item Description
Function
The display telnet server status command displays the status and configuration
of the Telnet server.
Format
display telnet server status
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
● You can run this command to check whether the device functions as a Telnet
server.
● You can run this command to check the listening port number of the Telnet
server if you have set the port number by running the telnet server port
port-number command.
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 4-33 Description of the display telnet server status command output
Item Description
Format
display telnet-client
Parameters
None
Views
All views
Default Level
3: Management 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 10.1.1.1
The source address of telnet client is The source IP address of the Telnet
10.1.1.1 client is 10.1.1.1.
Format
ecc local-key-pair create
ecc local-key-pair destroy
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
A local key pair is a prerequisite to a successful SSH login. Compared with the RSA
algorithm used by the rsa local-key-pair create command, the ECC algorithm
shortens the key length, accelerates the encryption, and improves security. The
length of the ECC host key pair can be 256 bits, 384 bits and 521 bits. By default,
the length of the ECC host key pair is 256 bits.
If you no longer need the local ECC key pair, run the ecc local-key-pair destroy
command to delete it.
Configuration Impact
The ecc local-key-pair destroy command deletes the local ECC host key pair, from
the files on the master and slave main control boards. Exercise caution when you
run this command.
Precautions
● The generated ECC host key pair is named in the format of hostkey_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 Router restarts.
● Do not delete the ECC key file from the Router. If the ECC key file is deleted,
the ECC key pair cannot be restored after the Router 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: hostkey_ECC.
Info: The ECC host key named hostkey_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=256]:256
Info: Generating keys...
Info: Succeeded in creating the ECC host keys.
The undo ecc peer-public-key command deletes the ECC public key.
Format
ecc peer-public-key key-name encoding-type { der | openssh | pem }
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When you use an ECC public key for authentication, specify the public key on the
server for the client of SSH users. When the client logs in to the server, the server
uses the specified public key to authenticate the client.
After you enter the ECC public key view, run the public-key-code begin
command, and copy the ECC public key to the server.
The public key on the client is randomly generated by the client software.
If an ECC public key has been assigned to an SSH user, delete the mapping
between the ECC public key and the SSH user. If you do not delete the mapping,
the undo ecc peer-public-key command cannot delete the ECC public key.
Follow-up Procedure
After you copy the ECC public key generated on the client to the server, perform
the following operations to exit 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 exit the ECC public key view and
return to the system view.
Precautions
The peer public key supports only PKCS#1. Other PKCS versions are not supported.
Example
# Create an ECC public key and enter the ECC public key view.
<Huawei> system-view
[Huawei] ecc peer-public-key ecc-peer-key encoding-type pem
Info: Enter "ECC public key" view, return system view with "peer-public-key end".
[Huawei-ecc-public-key] public-key-code begin
Info: Enter "ECC key code" view, return the last view with "public-key-code end".
[Huawei-ecc-key-code] ---- BEGIN SSH2 PUBLIC KEY ----
[Huawei-ecc-key-code] AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACDBL5J4v3pqi5S
[Huawei-ecc-key-code] ALI9lvLw4cdvtpD2AC6sEJXg9GDCD5vGBnkXlKmnOy6d1TyrXx57ZPNnrSdqVkHC
[Huawei-ecc-key-code] sMBa63vSwg1XsVW2qZgx8H57+FJiTPY61b1Vfst9GUif1ymfpB7XrbdYZDownoh0
[Huawei-ecc-key-code] FZNadZtIf2CRc0OeiKXbCSPP25dfoT/DTcc=
[Huawei-ecc-key-code] ---- END SSH2 PUBLIC KEY ----
[Huawei-ecc-key-code] public-key-code end
[Huawei-ecc-public-key] peer-public-key end
4.9.16 exline-breaker
Function
The exline-breaker enable command enables the function of adding a line break.
The exline-breaker disable command disables the function of adding a line
break.
By default, the function of adding a line break is disabled.
Format
exline-breaker { enable | disable }
Parameters
Parameter Description Value
enable Enables the function of adding a line break. -
disable Disables the function of adding a line break. -
Views
TTY user interface view
Default Level
3: Management level
Usage Guidelines
The device functions as a calling end to send a line break \r\n. When receiving the
line break, the called end discards \n in the line break. As a result, data of the
calling end differs from that of the called end. In this case, you can run the exline-
breaker enable command to enable the function of adding a line break. After the
function is enabled, the calling end adds a line break \n to \r\n when sending it.
When the called end receives the data, it removes only one \n from the line break.
Example
# Enable the function of adding a line break.
<Huawei> system-view
[Huawei] user-interface tty 41
[Huawei-ui-tty41] undo shell
[Huawei-ui-tty41] exline-breaker enable
The default character set in the system is ISO8859-1, that is, the system only
supports English input.
Format
language character-set character
Parameters
Parameter Description Value
character Specifies the character set in Currently, the system supports the
the system. following character sets: GBK, UTF-8,
and ISO8859-1.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can configure the character set so that the system just supports Chinese or
supports Chinese and English input. The character set facilitates device
identification and management, for example, Chinese interface description can be
configured.
Currently, the system supports the following character sets: GBK, UTF-8, and
ISO8859-1. GBK and UTF-8 support both English and Chinese input, whereas
ISO8859-1 supports only English input. GBK is a Chinese character set and UTF-8
is an international character set. To enter Chinese characters on the device,
configure GBK or UTF-8 according to the character set supported on the terminal
login software.
Precaution
The character set supported by the terminal login software affects the display of
Chinese characters. If the character sets in the system and on the terminal login
software are different, Chinese characters may be displayed as garbled characters.
After the character set function is configured, the device cannot work together
with eSight or iManager U2000. The web system only displays the UTF-8 character
set and does not support Chinese input.
Example
# Configure GBK as the character set in the system.
<Huawei> system-view
[Huawei] language character-set GBK
4.9.18 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
● The passwords must meet the following requirements:
– The password is a string of 8 to 128 case-sensitive characters.
NOTE
After user run the set password min-length command, the minimum length of
the password is the password length set using the set password min-length
command.
– 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
Enter Password(<8-128>):
Confirm Password:
Info: The terminal is locked.
# To log in to the system after the system is locked, you must press Enter. The
following information is displayed:
Enter Password:
Format
matched upper-view
undo matched upper-view
Parameters
None
Views
System view
Default Level
3: Management 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 ftp
server 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 FTP function.
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
[] matched upper-view
[] interface gigabitethernet1/0/1
[-GigabitEthernet1/0/1] undo ftp server
Info: Succeeded in closing the FTP server.
[]
# Prohibit the undo command from being searched for in the upper view.
<Huawei> system-view
[Huawei] undo matched upper-view
[Huawei] interface gigabitethernet1/0/1
[Huawei-GigabitEthernet1/0/1] undo ftp server
^
Error: Unrecognized command found at '^' position.
[Huawei-GigabitEthernet1/0/1]
Format
peer-public-key end
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. After editing
a public key in the public key view, you can run this command to return to the
system view.
Prerequisites
Before you run this command, the rsa peer-public-key command has been run to
enter the RSA public key view or the ecc peer-public-key command has been run
to enter the ECC public key 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]
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, or ecc 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, or
display ecc local-key-pair public command can be used as the key data to
enter.
● You can successfully edit the public key in a public key pair by entering the
public key in the server key pair or client key pair. In SSH application, only the
public key in the client key pair can be entered as key data. If you enter the
public key in the server key pair, authentication fails during SSH login.
Example
# Display the public key editing view and enter the key data.
<Huawei> system-view
[Huawei] rsa peer-public-key rsakey001
[Huawei-rsa-public-key] public-key-code begin
[Huawei-rsa-key-code] 308188
[Huawei-rsa-key-code] 028180
[Huawei-rsa-key-code] B21315DD 859AD7E4 A6D0D9B8 121F23F0 006BB1BB
[Huawei-rsa-key-code] A443130F 7CDB95D8 4A4AE2F3 D94A73D7 36FDFD5F
[Huawei-rsa-key-code] 411B8B73 3CDD494A 236F35AB 9BBFE19A 7336150B
[Huawei-rsa-key-code] 40A35DE6 2C6A82D7 5C5F2C36 67FBC275 2DF7E4C5
[Huawei-rsa-key-code] 1987178B 8C364D57 DD0AA24A A0C2F87F 474C7931
[Huawei-rsa-key-code] A9F7E8FE E0D5A1B5 092F7112 660BD153 7FB7D5B2
[Huawei-rsa-key-code] 171896FB 1FFC38CD
[Huawei-rsa-key-code] 0203
[Huawei-rsa-key-code] 010001
[Huawei-rsa-key-code] public-key-code end
[Huawei-rsa-public-key] peer-public-key end
[Huawei]
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.
Prerequisites
Before you run this command, the public-key-code begin command has been run
to enter the public key edit view.
Precautions
● Generally, in the public key view, only the public-key-code end command can
be used to exit. Thus, in this instance the quit command cannot be used.
● If the legal key coding is not input, the key cannot be generated after the
public-key-code end command is used. The system prompts that generating
the incorrect key fails.
● If the key is deleted in another window, the system prompts that the key does
not exist and returns to the system view directly after you run the public-key-
code end command.
Example
# Exit from the RSA public key editing view and saves the RSA key configuration.
<Huawei> system-view
[Huawei] rsa peer-public-key rsakey001
[Huawei-rsa-public-key] public-key-code begin
[Huawei-rsa-key-code] 308188
[Huawei-rsa-key-code] 028180
[Huawei-rsa-key-code] B21315DD 859AD7E4 A6D0D9B8 121F23F0 006BB1BB
[Huawei-rsa-key-code] A443130F 7CDB95D8 4A4AE2F3 D94A73D7 36FDFD5F
[Huawei-rsa-key-code] 411B8B73 3CDD494A 236F35AB 9BBFE19A 7336150B
[Huawei-rsa-key-code] 40A35DE6 2C6A82D7 5C5F2C36 67FBC275 2DF7E4C5
[Huawei-rsa-key-code] 1987178B 8C364D57 DD0AA24A A0C2F87F 474C7931
[Huawei-rsa-key-code] A9F7E8FE E0D5A1B5 092F7112 660BD153 7FB7D5B2
[Huawei-rsa-key-code] 171896FB 1FFC38CD
[Huawei-rsa-key-code] 0203
[Huawei-rsa-key-code] 010001
[Huawei-rsa-key-code] public-key-code end
[Huawei-rsa-public-key] peer-public-key end
[Huawei]
Format
redirect binding vpn-instance vpn-instance-name
undo redirect binding vpn-instance
Parameters
Parameter Description Value
Views
User interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
By default, all users on public and private networks can log in to remote devices
after the redirection function is enabled. To allow only users in a VPN to log in to
a remote device, associate the redirection function with the VPN instance on the
device.
Prerequisite
A VPN instance has been created on the router, and the user-side interface of the
router has been bound to the VPN instance.
The redirection function has been enabled by using the redirect enable command.
Precautions
After the redirection function is associated with a VPN instance, only users in the
VPN instance can use the redirection function to log in to the device remotely.
Users on the public network or other private networks connected to the router are
prevented from logging in to the device remotely.
Example
# Associate the redirection function with the VPN instance vpna.
<Huawei> system-view
[Huawei] user-interface tty 1
[Huawei-ui-tty1] undo shell
[Huawei-ui-tty1] redirect enable
[Huawei-ui-tty1] redirect binding vpn-instance vpna
Format
redirect [ ssh ] enable
undo redirect [ ssh ] enable
Parameters
Parameter Description Value
Views
User interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The redirection function is used in the following scenarios:
● An electricity system or finance system usually uses serial port terminals to
collect data. These terminals are connected to asynchronous serial ports of a
device. The device receives data flows from the terminals and encapsulates
received data into Ethernet frames to transmit the data on an Ethernet
network. With the redirection function, users can manage and maintain the
terminals remotely.
● Some devices can be managed only through their console ports. In this
scenario, connect their console ports to asynchronous serial ports of a device.
The device can function as a serial port server to manage these devices.
Prerequisite
● There are reachable routes between the operation terminal and the device
that provides the redirection function.
● The 8AS board on the device has registered successfully and asynchronous
serial port corresponding to the TTY user interface on the board is in Up state.
● The asynchronous serial port corresponding to the TTY user interface has
been configured to work in flow mode using the async mode flow command.
Precautions
If the modem function is enabled on a TTY user interface, the redirection function
does not take effect.
Example
# Enable the redirection function on a TTY user interface.
<Huawei> system-view
[Huawei] user-interface tty 9
[Huawei-ui-tty9] undo shell
[Huawei-ui-tty9] redirect enable
Format
redirect [ ssh ] listen-port port-number
undo redirect [ ssh ] listen-port
Parameters
Parameter Description Value
Views
User interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
If the default port number for the redirection function is used by another service,
run the redirect listen-port command to set a new port number.
Prerequisite
The redirection function has been enabled using the redirect enable command.
Example
# Set the port number for the redirection function to 2500.
<Huawei> system-view
[Huawei] user-interface tty 1
[Huawei-ui-tty1] undo shell
[Huawei-ui-tty1] redirect enable
[Huawei-ui-tty1] redirect listen-port 2500
Function
The rsa local-key-pair create command generates the local RSA host and server
key pairs.
By default, the local RSA host and server key pairs are not configured.
Format
rsa local-key-pair create
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To implement secure data exchange between the server and client, run this
command to generate a local key pair.
Precautions
If the RSA key pair exists, the system prompts you to confirm whether to replace
the original key pair.
After you run this command, the system prompts you to enter the number of bits
in the host key. The difference between the bits in the server and host key pairs
must be at least 128 bits.
NOTE
Because a longer key pair provides higher security, you are advised to use key pairs of the
largest length.
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 less than 2048,
It will introduce potential security risks.
Input the bits in the modulus[default = 2048]:2048
Generating keys...
......................................................................................+++
....+++
.......................................++++++++
..............++++++++
Format
rsa local-key-pair destroy
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To delete the local key pair, run rsa local-key-pair destroy command. If the host
key pair and the service key pair of an SSH server are deleted, run the rsa local-
key-pair create command to create the new host key pair and service key pair for
the SSH server.
After you run this command, verify that all local RSA keys are deleted. This
command is not saved in a configuration file.
Prerequisite
The local RSA keys that can be deleted exist.
Example
# Delete all RSA server keys.
<Huawei> system-view
[Huawei] rsa local-key-pair destroy
The name for the keys which will be destroyed is Host.
Warning: Confirm to destroy these keys! Continue? [Y/N]y
By default, the encoding format is distinguished encoding rules (DER) for an RSA
public key.
Format
rsa peer-public-key key-name [ encoding-type { der | openssh | pem } ]
Parameters
key-name Specifies the rsa public key name. The value is a string of
1 to 30 case-insensitive
characters without
spaces.
NOTE
When double quotation
marks are used around
the string, spaces are
allowed in the string.
Views
System view
Default Level
2: Configuration 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 the DER, OpenSSH and PEM
formats for RSA keys. If you use an RSA key in non-DER/OpenSSH/PEM format,
use a third-party tool to convert the key into a key in DER, OpenSSH or PEM
format.
Because a third-party tool is not released with Huawei system software, RSA
usability is unsatisfactory. In addition to DER, RSA keys need to support the
privacy-enhanced mail (PEM) and OpenSSH formats to improve RSA usability.
Third-party software, such as PuTTY, OpenSSH, and OpenSSL, can be used to
generate RSA keys in different formats. The details are as follows:
● The PuTTY generates RSA keys in PEM format.
● The OpenSSH generates RSA keys in OpenSSH format.
● The OpenSSL generates RSA keys in DER format.
OpenSSL is an open source software. You can download related documents at
http://www.openssl.org/.
After you configure an encoding format for an RSA public key, Huawei data
communications device automatically generates an RSA public key in the
configured encoding format and enters the RSA public key view. Then you can run
the public-key-code begin command and manually copy the RSA public key
generated on the peer device to the local device.
Prerequisite
The public key 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
The public key on the client is randomly generated by the client software.
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.
The peer public key supports only PKCS#1. Other PKCS versions are not supported.
Example
# Configure the encoding format for an RSA public key and displays the RSA
public key view.
<Huawei> system-view
[Huawei] rsa peer-public-key rsakey001
Enter "RSA public key" view, return system view with "peer-public-key end".
NOTE: The number of the bits of public key must be between 769 and 2048.
[Huawei-rsa-public-key]
4.9.29 send
Function
The send command sends messages to all user interfaces.
Format
send { all | ui-number | ui-type ui-number1 }
Parameters
Parameter Description Value
Views
User view
Default Level
1: Monitoring level
Usage Guidelines
After you run the send command, the system prompts you to enter the message
to send. After you confirm to send this message, the user who logs in to the
system from the specified user interface can receive this message.
Example
# Send a message to the user interface VTY 0.
<Huawei> send vty 0
Enter message, end with CTRL+Z or Enter; abort with CTRL+C:Hello, good morning!^Z
Warning: Send the message? [Y/N]: y
# After you confirm to send the message, the user who logs in to the Huawei
from VTY 0 can receive this message.
<Huawei>
Info: Receive a message from VTY2:Hello, good morning!
Function
The set insecure-protocol enable command allows the usage of insecure
management protocols HTTP and Telnet.
NOTE
Format
set insecure-protocol enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can log in to a device using HTTPS, Telnet, and STelnet, and HTTP and Telnet
belong to insecure management protocols. For security purposes, you can run the
set insecure-protocol disable command to forbid the usage of insecure
management protocols HTTP and Telnet.
Precautions
Before running the set insecure-protocol disable command, you need to check
whether the Telnet and HTTP service functions are enabled using the display
telnet server status and display http server commands, respectively. If the Telnet
and HTTP service functions are enabled, run the undo telnet server enable and
undo http server enable commands to disable the two functions. The set
insecure-protocol disable command then can be successfully run. If the Telnet
and HTTP service functions are disabled, directly run the set insecure-protocol
disable command to forbid the usage of insecure management protocols HTTP
and Telnet.
After the set insecure-protocol disable command is run, you can only run the set
insecure-protocol enable command to allow the usage of insecure management
protocols HTTP and Telnet.
Example
# Forbid the usage of insecure management protocols HTTP and Telnet.
<Huawei> system-view
[Huawei] display telnet server status
TELNET IPV4 server :Disable
TELNET IPV6 server :Disable
TELNET server port :23
Error: insecure-protocol is disabled.
[Huawei] display http server
HTTP server status : Disabled (default: disable)
HTTP server port : 80 (default: 80)
HTTP timeout interval : 10 (default: 10 minutes)
Current online users :0
Maximum users allowed :5
HTTPS server status : Enabled (default: disable)
HTTPS server port : 443 (default: 443)
HTTPS server manager port :
HTTPS SSL Policy :
[Huawei] set insecure-protocol disable
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
Parameters
keyname Specifies the SSH server public key The value is a string of 1 to
name that has been configured on 64 case-insensitive characters
the SSH client. without spaces.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the SSH client connects to the SSH server for the first time and the first
authentication is not enabled on the SSH client using the ssh client first-time
enable command, the SSH client rejects the access from unauthorized SSH
servers. You need to specify the host public key of the SSH server and the
mapping between the key and SSH server on the SSH client. After that, the client
will determine whether the server is reliable using the correct public key based on
the mapping.
Precautions
The RSA or ECC public key to be assigned to the SSH server must have been
configured on the SSH client using the rsa peer-public-key or ecc peer-public-
key command. If the key has not been configured, the verification for the RSA or
ECC public key of the SSH server on the SSH client fails.
Example
# Assign the RSA public key to the SSH server.
<Huawei> system-view
[Huawei] ssh client 10.164.39.120 assign rsa-key sshrsakey01
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.
Format
ssh client first-time enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When the SSH client accesses the SSH server for the first time and the public key
of the SSH server is not configured on the SSH client, you can enable the first
authentication for the SSH client to access the SSH server and save the public key
on the SSH client. When the SSH client accesses the SSH server next time, the
saved public key is used to authenticate the SSH server.
Precautions
You can run the ssh client assign command to pre-assign a 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
Function
The ssh server authentication-retries command sets the maximum number of
authentication retries for an SSH connection.
Format
ssh server authentication-retries times
Parameters
Parameter Description Value
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
NOTE
Format
ssh server compatible-ssh1x enable
undo ssh server compatible-ssh1x enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The SSH server's compatibility with earlier versions applies to the protocol version
negotiation between the client and server. After a TCP connection is set up
between the client and server, the client negotiates with the server on a version
that both the client and server support.
The server compares its own version 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
Example
# Enable an SSH server to be compatible with earlier SSH versions.
<Huawei> system-view
[Huawei] ssh server compatible-ssh1x enable
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.
Format
ssh server cipher { 3des_cbc | aes128_cbc | aes128_ctr | aes192_ctr | aes256_ctr
| blowfish_cbc | des_cbc } *
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
An SSH server and a client need to negotiate an encryption algorithm for the
packets transmitted between them. You can run the ssh server cipher command
to configure an encryption algorithm list for the SSH server. The server compares
the encryption algorithm list sent by the client with its own encryption algorithm
list, and selects the first encryption algorithm on the client's list that matches an
encryption algorithm on its own list as the encryption algorithm for packet
transmission. If no algorithm on the client's list matches an algorithm on the
server's list, the negotiation fails.
For example, for security purposes, you can run the ssh server cipher
{ aes256_ctr | aes192_ctr | aes128_ctr } * command to configure an encryption
algorithm list containing aes256_ctr, aes192_ctr, and aes128_ctr encryption
algorithms with high security for an SSH server.
Precautions
Example
# Configure an encryption algorithm negotiation list containing aes256_ctr for an
SSH server.
<Huawei> system-view
[Huawei] ssh server cipher aes256_ctr
Function
The ssh server hmac command configures the check algorithm list of the SSH
server.
The undo ssh server hmac command restores default check algorithms of the
SSH server.
Format
ssh server hmac { md5 | md5_96 | sha1 | sha1_96 | sha2_256 | sha2_256_96 } *
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The server and client negotiate the algorithm for checking packets transmitted
between them. You can run the ssh server hmac command to configure the check
algorithm list of the SSH server. The server compares the check algorithm list sent
from the client with its own check algorithm list, and selects the first matched
check algorithm for checking transmitted packets. If the check algorithm lists of
the server and client have no common check algorithm, the check algorithm
negotiation fails.
For example, run the ssh server hmac sha2_256 command to add the high-
security sha2_256 check algorithm to the HMAC check algorithm list of the SSH
server, improving device security.
Precautions
You are advised not to add the following HMAC check algorithms to the HMAC
check algorithm list of the SSH server because they provide low security:
sha2_256_96, sha1, sha1_96, md5, and md5_96.
Example
# Add sha2_256 to the check algorithm list of the SSH server.
<Huawei> system-view
[Huawei] ssh server hmac sha2_256
Function
The ssh server key-exchange command configures a key exchange algorithm list
for an SSH server.
The undo ssh server key-exchange command restores the default setting.
Format
ssh server key-exchange { dh_group_exchange_sha1 | dh_group1_sha1 |
dh_group14_sha1 | dh_group14_sha256 | dh_group15_sha512 } *
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
An SSH user 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
server receives a packet from the client, the server matches the key exchange
algorithm list of the client against its local list and selects the first matched key
exchange algorithm. If no key exchange algorithm is matched, the negotiation
fails.
Precautions
The key exchange algorithms are listed as follows in descending order of security
levels: dh_group15_sha512, dh_group14_sha256, dh_group_exchange_sha1,
dh_group14_sha1, and dh_group1_sha1. The dh_group14_sha256 algorithm is
recommended.
You are advised not to add the dh_group1_sha1 algorithm to the key exchange
algorithm list of the SSH server because it provides low security.
Example
# Configure a key exchange algorithm list containing dh_group_exchange_sha1
for the SSH server.
<Huawei> system-view
[Huawei] ssh server key-exchange dh_group_exchange_sha1
Format
ssh server permit interface { interface-type interface-number } &<1-5>
ssh server permit interface all
undo ssh server permit interface
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent clients from connecting to the SSH server through unauthorized
interfaces, you can run the ssh server permit interface command to specify
interfaces on the SSH server to which clients can connect.
Precautions
● This command does not take effect on the MEth management interface. The
SSH server always allows clients to connect to it through the MEth
management interface.
● By default, clients can connect to all interfaces on the SSH server. Once a
specific interface is specified using this command, a client cannot connect to
the SSH server through any other interface.
● A maximum of five interfaces can be specified using the ssh server permit
interface { interface-type interface-number } &<1-5> command. The latest
configuration overrides the previous one. For example, before you run this
command, clients can connect to three interfaces GigabitEthernet 1/0/0,
GigabitEthernet 2/0/0, and GigabitEthernet 3/0/0 on the SSH server. After you
run the command to specify the interface GigabitEthernet 1/0/0, clients can
only connect to the interface GigabitEthernet 1/0/0.
● If no interface is specified on the SSH server to allow clients to connect to the
server, the SSH service cannot be enabled.
● The undo ssh server permit interface command can be executed only after
the SSH service is disabled.
Example
# Allow clients to connect to all interfaces on the SSH server.
<Huawei> system-view
[Huawei] ssh server permit interface all
Warning: Allowing access from all interfaces is insecure.
# Delete the specified interfaces and allow clients to connect to all interfaces on
the SSH server.
<Huawei> system-view
[Huawei] undo ssh server permit interface
Function
The ssh server port command changes the listening port number of the SSH
server.
The undo ssh server port command restores the default listening port number of
the SSH server.
Format
ssh server port port-number
Parameters
Parameter Description Value
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
Function
The ssh server rekey-interval command sets the interval for updating the SSH
server key pair.
The undo ssh server rekey-interval command restores the default interval for
updating the SSH server key pair.
The default interval for updating the SSH server key pair is 0, indicating that the
key pair is never updated.
Format
ssh server rekey-interval hours
Parameters
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
Format
ssh server timeout seconds
undo ssh server timeout
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.
Example
# Set the SSH connection authentication timeout interval to 90 seconds.
<Huawei> system-view
[Huawei] ssh server timeout 90
Function
The ssh server-source command specifies a source IP address for an SSH server.
The undo ssh server-source command deletes the source IP address of an SSH
server.
Format
ssh server-source { -a [ ipv6 ] source-ip-address | -i [ ipv6 ] interface-type
interface-number }
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the SSH server uses the source IP address
specified by routes to send and receive packets. The source IP address must be
configured for an interface with stable performance, such as the loopback
interface. Using the loopback interface as the source IP address simplifies the ACL
rule and security policy configuration. This shields the IP address differences and
interface status impact, filters incoming and outgoing packets, and implements
security authentication.
Precautions
● After the source IP address is specified for the SSH server, you must use the
specified IP address to log in to the SSH server.
● If the configured source IP address does not exist on the SSH server, configure
this IP address on the device and then restart the SSH service. Then you can
log in to the device.
● If the SSH service has been enabled, the SSH service restarts after the ssh
server-source command is executed.
● If the specified source interface has been bound to a VPN instance, the SSH
server is automatically bound to the same VPN instance.
Example
# Set the source IP address of the SSH server to LoopBack0.
<Huawei> system-view
[Huawei] ssh server-source -i loopback 0
Warning: To make the server source configuration take effect, the ssh will be restarted. Continue? (y/n):y
Info: Succeeded in closing the STELNET server.
Info: Succeeded in setting the source interface of the ssh server to LoopBack0
Info: Succeeded in starting the STELNET server.
Format
ssh user user-name assign { rsa-key | ecc-key } key-name
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.
key-name Specifies the client public key The name is a string of 1 to 30 case-
name. insensitive characters without a
blank space.
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 or ECC 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.
If the user named user-name to whom a public key is assigned does not exist, the
system automatically creates an SSH user named user-name and performs the
configured authentication for the SSH user.
Example
# Assign key1 to a user named John.
<Huawei> system-view
[Huawei] ssh user john assign rsa-key key1
Function
The ssh user authentication-type command configures the authentication mode
for an SSH user.
Format
ssh user [ user-name ] authentication-type { password | rsa | password-rsa |
ecc | password-ecc | all }
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Table 4-35 describes the usage scenarios for different authentication modes.
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.
Example
# Configure the password authentication mode for an SSH user John.
<Huawei> system-view
[Huawei] ssh user john authentication-type password
NOTE
Format
ssh user default-authentication-type { password | rsa }
Parameters
Parameter Description Value
rsa Sets the default authentication mode for SSH users to RSA -
authentication.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
To change the default authentication mode for SSH users, run this command.
Example
# Set the default authentication mode for SSH users to RSA authentication.
<Huawei> system-view
[Huawei] ssh user default-authentication-type rsa
4.9.46 stelnet
Function
The stelnet command enables you to use the STelnet protocol to log in to another
device from the current device.
Format
# IPv4 address
# IPv6 address
Parameters
-ki aliveinterval Specifies the interval The value is an integer that ranges
for sending keepalive from 1 to 3600, in seconds.
packets when no
packet is received.
-kc alivecountmax Specifies the number The value is an integer that ranges
of times for no reply from 3 to 10. The default value is
of keepalive packets. 5.
Views
System view
Default Level
3: Management 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
● Enable the STelnet service on the SSH server by stelnet server enable
command, before connecting the SSH server by using the STelnet command.
● 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.
● For security purposes, you are advised to use the AES128, AES128-CTR,
AES192-CTR, AES256-CTR or SHA2_256 encryption algorithms instead.
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
Format
stelnet server enable
undo stelnet server enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To connect a client to the SSH server through STelnet, you must enable the
STelnet service on the SSH server.
Prerequisites
The interfaces on the SSH server to which clients can connect have been specified
by running the ssh server permit interface { { interface-type interface-number }
&<1-5> | all } command. If no interface is specified, the STelnet service cannot be
enabled.
Precautions
After you disable the STelnet service on the SSH server, all clients that have logged
in through STelnet are disconnected.
Example
# Enable the STelnet service.
<Huawei> system-view
[Huawei] ssh server permit interface all
Warning: Allowing access from all interfaces is insecure.
[Huawei] stelnet server enable
Info: Succeeded in starting the STELNET server.
4.9.48 super
Function
The super command switches a user from the current level to a specified level.
Format
super [ level ]
Parameters
Parameter Description Value
level Specifies the target The value is an integer that ranges from 0
user level. to 15. By default, a user is switched to level
3.
Views
User view
Default Level
0: Visit level
Usage Guidelines
Usage Scenario
Users are assigned one of 16 levels, and these levels correspond to command
levels. After logging in to the device, users can use only the commands whose
levels are equal to or lower than their user levels.
When a user is switched from a lower level to a higher level, the device requires
the user to enter the authentication password for the higher user level to
authenticate the user identity, preventing unauthorized users from logging in to
the device. You can run the super password command to set an authentication
password used to switch a user from a lower level to a higher level.
If the entered target user level is lower than or equal to the current user level, the
system directly sets the entered user level as the target user level, and displays a
message. If the target level is higher than the current user level, the system asks
the user to enter the authentication password.
The password entered by a user is not displayed on the screen. If the user enters
the correct password within three times, the system switches the user to the
higher user level; otherwise, the user level remains unchanged.
Precautions
● The configured target level takes effect only for the current user. The user
level restores to the original level the next time the user logs in.
● The password is a string of 8 to 16 characters.
● The password must be a combination of at least two of the following:
uppercase letters, lowercase letters, digits, and special characters.
Special characters include ` ~ ! @ # $ % ^ & * ( ) - _ = + \ | [ { } ] ; : ' " , < .
> / ? spaces.
● The password must be the same as the password set using the super
password command.
Example
# Switch a user to level 10.
<Huawei> super 10
Password:
Now user privilege is level 10, and only those commands whose level is
equal to or less than this level can be used.
Privilege note: 0-VISIT, 1-MONITOR, 2-SYSTEM, 3-MANAGE
Function
The super password command sets an authentication password used to switch a
user from a lower level to a higher level.
Format
super password [ level user-level ] cipher
Parameters
Parameter Description Value
level user-level Specifies the target The value is an integer that ranges from
user level. 1 to 15. The target user level must be
lower than or equal to the current user
level. By default, the authentication
password is set to switch a user to level
3.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If rights are reconfigured, you need to run the super command to switch a user
from a lower level to a higher level. When a user is switched from a lower level to
a higher level, the device authenticates the user identity to prevent unauthorized
users from logging in to the device. Users at a higher level can run the super
password command to set an authentication password used to switch a user from
a lower level to a higher level, so that the device can authenticate the user
identity.
Precautions
● The target user level must be lower than or equal to the current user level.
● The entered authentication password must meet the following requirements:
– It is a string of 8 to 16 characters entered only in plain text.
NOTE
After user run the set password min-length command, the minimum length of
the password is the password length set using the set password min-length
command.
– It must be a combination of at least two of the following: uppercase
letters, lowercase letters, digits, and special characters.
Special characters include ` ~ ! @ # $ % ^ & * ( ) - _ = + \ | [ { } ] ; : ' " ,
< . > / ? spaces.
● The password entered in interactive mode is not displayed on the screen.
● When setting the password in interactive mode, you can press CTRL+C to
cancel the password setting.
● If this command is run, passwords entered by users will be saved in cipher
text in the configuration file. Therefore, a configured password cannot be
retrieved from the system. Keep the password safe.
Example
# Set an authentication password used to switch a user from a lower level to level
5.
<Huawei> system-view
[Huawei] super password level 5 cipher
Enter Password(<8-16>):
Confirm password:
4.9.50 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 [ vpn-instance vpn-instance-name ] [ -a source-ip-address ] host-ip [ port-
number ]
# Log in to another device through Telnet based on IPv6.
telnet ipv6 [ -a source-ip-address ] [ vpn6-instance vpn6-instance-name ] host-
ipv6 [ -oi interface-type interface-number ] [ port-number ]
Parameters
Parameter Description Value
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_] 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.
<Huawei> telnet 192.168.1.6
Format
telnet client-source { -a source-ip-address | -i interface-type interface-number }
undo telnet client-source
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
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.
Precautions
If the specified source interface has been bound to a VPN instance, the client is
automatically bound to the same VPN instance.
Example
# Set the source IP address of the Telnet client to 10.1.1.1.
<Huawei> system-view
[Huawei] telnet client-source -a 10.1.1.1
Function
The telnet server-source command specifies a source IP address for a Telnet
server.
The undo telnet server-source command deletes the source IP address of a Telnet
server.
Format
telnet server-source { -a [ ipv6 ] source-ip-address | -i [ ipv6 ] interface-type
interface-number }
undo telnet [ ipv6 ] server-source
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the Telnet server uses the source IP address
specified by routes to send packets. The source IP address must be configured for
an interface with stable performance, such as the loopback interface. Using the
loopback interface as the source IP address simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, filters incoming and outgoing packets, and implements security
authentication.
Precautions
● After the source IP address is specified for the Telnet server, you must use the
specified IP address to log in to the Telnet server.
● If the Telnet service has been enabled, the Telnet service restarts after the
telnet server-source command is executed.
● If the specified source interface has been bound to a VPN instance, the server
is automatically bound to the same VPN instance.
Example
# Set the source IP address of the Telnet server to LoopBack0.
<Huawei> system-view
[Huawei] telnet server-source -i loopback 0
Warning: To make the server source configuration take effect, the telnet server will be restarted. Continue?
[Y/N]: y
Info: Succeeded in setting the source interface of the telnet server to LoopBack0
Info: Telnet is insecure, recommended to use stelnet with encryption features.
Function
The telnet server permit interface command specifies interfaces on the Telnet
server to which clients can connect.
The undo telnet server permit interface command deletes the specified
interfaces and allows clients to connect to all interfaces on the Telnet server.
By default, clients can connect to all the interfaces on the Telnet server.
Format
telnet server permit interface { interface-type interface-number } &<1-5>
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent clients from connecting to the Telnet server through unauthorized
interfaces, you can run the telnet server permit interface command to specify
interfaces on the Telnet server to which clients can connect.
Precautions
● This command does not take effect on the MEth management interface. The
Telnet server always allows clients to connect to it through the MEth
management interface.
● By default, clients can connect to all interfaces on the Telnet server. Once a
specific interface is specified using this command, a client cannot connect to
the Telnet server through any other interface.
● A maximum of five interfaces can be specified using the telnet server permit
interface { interface-type interface-number } &<1-5> command. The latest
configuration overrides the previous one. For example, before you run this
command, clients can connect to three interfaces GigabitEthernet 1/0/0,
GigabitEthernet 2/0/0, and GigabitEthernet 3/0/0 on the Telnet server. After
you run the command to specify the interface GigabitEthernet 1/0/0, clients
can only connect to the interface GigabitEthernet 1/0/0.
● If no interface is specified on the Telnet server to allow clients to connect to
the server, the Telnet service cannot be enabled.
● The undo telnet server permit interface command can be executed only
after the Telnet service is disabled.
Example
# Allow clients to connect to all interfaces on the Telnet server.
<Huawei> system-view
[Huawei] telnet server permit interface all
Warning: Allowing access from all interfaces is insecure.
# Delete the specified interfaces and allow clients to connect to all interfaces on
the Telnet server.
<Huawei> system-view
[Huawei] undo telnet server permit interface
The undo telnet server enable command disables the Telnet server function.
By default, the Telnet server function is disabled.
Format
telnet [ ipv6 ] server enable
undo telnet [ ipv6 ] server enable
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run this command to enable and disable the Telnet server function. A
Telnet server can be connected only when the Telnet server function is enabled.
When the undo telnet [ ipv6 ] server enable command is executed to disable the
Telnet server function, an online Telnet user goes offline because the Telnet
service is disabled.
When the Telnet server function is disabled, you can log in to the device only
through the console port or SSH.
NOTICE
Prerequisites
The interfaces on the Telnet server to which clients can connect have been
specified by running the telnet server permit interface { { interface-type
interface-number } &<1-5> | all } command. If no interface is specified, the Telnet
service cannot be enabled.
Example
# Enable the Telnet server function.
<Huawei> system-view
[Huawei] telnet server permit interface all
Warning: Allowing access from all interfaces is insecure.
[Huawei] telnet server enable
Function
The telnet server port command configures the listening port number of a Telnet
server.
Format
telnet server port port-number
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To protect the Telnet standard port against attacks and ensure network security,
configure the listening port number of the Telnet server.
Precautions
A Telnet client can log in to the server with no port specified only when the server
is listening on port 23. 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
# Configure the listening port number to 1026.
<Huawei> system-view
[Huawei] telnet server port 1026
Format
transparent-mode enable
undo transparent-mode enable
Parameters
None
Views
TTY user interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
By default, the device checks data redirected by a serial port and discards
unidentifiable data, damaging the original data. You can run the transparent-
mode enable command to ensure the original data integrity. The device will
transparently transmit data without checking it.
Prerequisites
The redirection function has been enabled using the redirect enable command.
Example
# Enable the transparent transmission mode for redirection on a serial port.
<Huawei> system-view
[Huawei] user-interface tty 44
[Huawei-ui-tty44] redirect enable
[Huawei-ui-tty44] transparent-mode enable
Format
system lock type { ip | none }
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
To ensure service security, the device locks the IP addresses of users who fail to log
in to the device using SFTP, STelnet, Telnet, or FTP.
If a user enters an incorrect user name or password, the device adds the IP address
of the user to the blacklist and locks the user for 2 seconds upon the first login
failure, 4 seconds upon the second login failure, and 8 seconds upon the third
login failure. If the user enters incorrect user names or passwords for five
consecutive times, the device locks the user for 300 seconds upon the sixth login
failures. When a user account is locked, the user's IP address cannot be used to set
up a connection in a new window because it is in the blacklist. If the user enters
the correct user name and password and logs in to the device successfully after
the locking duration expires, the user's IP address will be removed from the
blacklist and a recovery log is generated. If the login fails again, the user account
will be locked for 300 seconds. A maximum of 32 IP addresses can be locked at
the same time. If more than 32 IP addresses are added to the blacklist, a new IP
address will overwrite the earliest one.
By default, the device locks a user's IP address after the user fails authentication. If
you do not need to lock the IP address of a user after the user fails authentication,
run the system lock type none command and delete the IP address from the
blacklist as prompted. After the IP address locking function is disabled, if a user
enters an incorrect user name and password when logging in to the device
through Telnet, STelnet, FTP, or SFTP, the IP address of the user will not be added
to the blacklist. That is, the IP address will not be locked.
Example
# Enable the device to lock the IP addresses of users who fail authentication.
<Huawei> system-view
[Huawei] system lock type ip
# Disable the device from locking the IP addresses of users who fail
authentication.
<Huawei> system-view
[Huawei] system lock type none
Info:All ip lock records logged in via telnet, stelnet, ftp and sftp will be del
eted. Continue? [Y/N]:y
Hardware Requirements
This section is applicable to all models. For details about differences for specific
models, see the description in the corresponding section.
Function
The display http server command displays information about the current HTTP
server.
Format
display http server
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
You can view the HTTP server information, including the status of common and
security HTTP services, port number, maximum number of users allowed to access
the HTTP server, and number of current online users.
Example
# Display information about the current HTTP server.
<Huawei> display http server
HTTP server status : Enabled (default: disable)
HTTP server port : 80 (default: 80)
HTTP timeout interval :3 (default: 10 minutes)
Current online users :0
Maximum users allowed :5
HTTPS server status : Enabled (default: enable)
HTTPS server port : 443 (default: 443)
HTTPS server manager port :
HTTPS SSL Policy : default_policy
Item Description
Format
display http user [ username username ]
Parameters
Parameter Description Value
Views
All views
Default Level
3: Management level
Usage Guidelines
If username is not specified, this command displays summary information about
all online users.
If username is specified, this command displays detailed information about the
specified online user.
Example
# Display general information about the current online user.
<Huawei> display http user
---------------------------------------------------------------------------
User Name IP Address Login Date
---------------------------------------------------------------------------
admin 192.168.0.1 2011-10-13 11:11:12+00:00
---------------------------------------------------------------------------
Total online users is 1
NOTE
Only the models that support the web system of the EasyOperation edition support this
function. For details, see EasyOperation Edition.
Format
display fast-configuration state
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To check the state of the Internet access wizard popup notification of the web
system of the EasyOperation edition, run this command.
Precautions
The models must support the web system of the EasyOperation edition.
Example
# Display the state of the Internet access wizard popup notification of the web
system of the EasyOperation edition.
<Huawei> display fast-configuration state
Fast-configuration is enabled
Format
http acl acl-number
Parameters
acl-number Specifies the ACL number. The value is an integer that ranges from
2000 to 2999.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To ensure the security of an HTTP server, you need to configure an ACL for it to
specify clients that can log in to the current HTTP server.
Precautions
● The HTTP supports the ACL whose number ranges from 2000 to 2999.
● The http acl command takes effect only after you run the rule command to
configure the ACL rule and Indicate the source IP address of packets that
match an ACL rule.
● After an ACL rule is modified, the HTTP server does not forcibly log out an
online user who matches the ACL rule until the user sends the next login
request.
● If the http acl command is configured several times, only the latest
configuration takes effect.
Example
# Set the ACL number to 2000 for the HTTP server.
<Huawei> system-view
[Huawei] acl 2000
[Huawei-acl-basic-2000] rule 1 permit source any
[Huawei-acl-basic-2000] quit
[Huawei] http acl 2000
Function
The http client disable command disabled the HTTP client function.
The undo http client disable command enables the HTTP client function.
Format
http client disable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
As the HTTP client, the device can upload and download files to the server
through HTTP by default. After you run the http client disable command to
disable the HTTP client function, you cannot upload or download files to the
server through HTTP.
Example
# Disable the HTTP client.
<Huawei> system-view
[Huawei] http client disable
Warning: The operation will stop HTTP client. Continue? [Y/N]:y
Function
The http get command detects whether the URL server is reachable.
Format
http get [ -a source-ip-address | -c count | -t timeout | -v http-version ] * url url
Parameters
Parameter Description Value
Views
System view
Default Level
1: Monitoring level
Usage Guidelines
The http get command detects whether the URL server is reachable. You can use
HTTP request packets to detect the following items:
● Whether the HTTP service is enabled on the URL server
● Round-trip delay in communication
● Packet loss
Example
# Check whether the HTTP service is enabled on the URL server with the URL of
http://www.example.com, and set the source IP address of outgoing HTTP packets
to 10.137.147.142, the transmission count to 5, the period for waiting for a
response packet to 100 ms, and the HTTP version number to 1.1.
<Huawei> system-view
[Huawei] http get -a 10.137.147.142 -c 5 -t 100 -v 1.1 url http://www.example.com
Http getting http://www.example.com[10.82.55.199]:
Function
The http server enable command enables the HTTP server function.
The undo http server enable command disables the HTTP server function.
Format
http server enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
After running the http server enable command to enable the HTTP server, you
can use the browser to access the web NMS to manage devices.
If the web page to load does not exist, the HTTP service cannot be enabled.
Prerequisites
Before running this command, you must run the http server permit interface
{ { interface-type interface-number } &<1-5> | all } command to configure
interfaces through which users can access the web platform. Otherwise, the HTTP
server cannot be enabled.
Example
# Enable the HTTP server.
<Huawei> system-view
[Huawei] http server permit interface all
Warning: Allowing access from all interfaces is insecure.
[Huawei] http server enable
Format
http server load file-name
undo http server load
Parameters
Parameter Description Settings
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If you need to manage and maintain devices on the graphical user interface (GUI),
configure the Web network management function. When you need to update web
page file when using the Web network management function, run this command
to load web page file.
Prerequisites
Before loading the web page file using the http server load command, ensure
that the web page file has been stored to the device; otherwise, file loading will
fail.
Example
# Load the web page file web_1.
<Huawei> system-view
[Huawei] http server load web_1
By default, the maximum number of concurrent online users allowed by the web
NMS is 5.
Format
http server max-online-users max-online-users
Parameters
Parameter Description Value
max-online-users Specifies the maximum The value is an integer that
number of concurrent online ranges from 1 to 5. The
users allowed by the web default value is 5.
NMS.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run this command to set the maximum number of concurrent online
users allowed by the web NMS. By doing so, the number of users allowed to
simultaneously access the web NMS is limited.
Precautions
When the number of users that have logged in is larger than the value specified
by this command, extra users will not be forced to go offline. For example, five
users have logged in to the web NMS. If you run this command to set the
maximum number of concurrent online users allowed by the web NMS to 3, two
extra users will not be forced to go offline.
Example
# Set the maximum number of concurrent online users allowed by the web NMS
to 3.
<Huawei> system-view
[Huawei] http server max-online-users 3
Function
The http server permit interface command configures the interfaces through
which users can access the web system.
The undo http server permit interface command deletes configured interfaces so
that users can access the web system through all interfaces on the device.
By default, users can access the web system only through the management
interface on a device.
Format
http server permit interface { interface-type interface-number } &<1-5>
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent unauthorized users from accessing the web system through interfaces
on the device, run the http server permit interface command to configure the
interfaces through which users can access the web system.
Precautions
● This command does not take effect on the MEth management interface. The
device always allows users to access the web system through the MEth
management interface. In the factory default settings of the device, users are
allowed to access the web system through the WLAN-radio interface and
management interface of the device.
● A maximum of five interfaces can be configured using the http server permit
interface { interface-type interface-number } &<1-5> command. If you run
this command multiple times, only the latest configuration takes effect. For
example, if GigabitEthernet 1/0/0, GigabitEthernet 2/0/0, and GigabitEthernet
3/0/0 have been configured using this command and then GigabitEthernet
1/0/0 is configured, users can access the web platform only through
GigabitEthernet 1/0/0.
● If the interfaces through which users can access to the web system are not
configured, the HTTP/HTTPS service cannot be enabled.
● The undo http server permit interface command can be executed only when
the HTTP/HTTPS service function is disabled.
Example
# Allow users to access the web system through all interfaces on the device.
<Huawei> system-view
[Huawei] http server permit interface all
Warning: Allowing access from all interfaces is insecure.
# Configure the interfaces through which users can access the web system.
<Huawei> system-view
[Huawei] http server permit interface GigabitEthernet 1/0/0 GigabitEthernet 2/0/0
Info: Successed in setting web permit interface.
# Delete the configured interfaces so that users can access the web system
through all interfaces on the device.
<Huawei> system-view
[Huawei] undo http server permit interface
The undo http server port command restores the default listening port number
of the HTTP server.
Format
http server port port-number
undo http server port
Parameters
Parameter Description Value
port-number Specifies the listening port The value is 80, or an integer that
number of the HTTP server. ranges from 1025 to 51200. The
default value is 80.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
By default, the listening port number of the security HTTP server is 80. Attackers
may frequently access the default listening port, which wastes bandwidth,
deteriorates server performance, and prevents authorized users from accessing the
HTTP server through the listening port. You can run the http server port
command to specify another listening port number to prevent attackers from
accessing the listening port.
Precautions
If the http server port command is configured several times, only the latest
configuration takes effect.
Example
# Set the listening port number of the HTTP server to 1025.
<Huawei> system-view
[Huawei] http server port 1025
Format
http server-source { -a source-ip-address | -i interface-type interface-number }
undo http server-source
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the HTTP server uses the source IP address
specified by routes to send and receive packets. The source IP address must be
configured for an interface with stable performance, such as the loopback
interface. Using the loopback interface as the source IP address simplifies the ACL
rule and security policy configuration. This shields the IP address differences and
interface status impact, filters incoming and outgoing packets, and implements
security authentication.
Precautions
● After the source IP address is specified for the HTTP server, you must use the
specified IP address to log in to the HTTP server.
● If the HTTP service has been enabled, the HTTP service restarts after the http
server-source command is executed.
Example
# Set the source IP address of the HTTP server to LoopBack0.
<Huawei> system-view
[Huawei] http server-source -i loopback 0
Warning: To make the server source configuration take effect, the HTTP server will be restarted. Continue?
(y/n)[n]:y
Info: Succeeded in setting the source IP or interface of the HTTP server
Format
http timeout timeout
undo http timeout
Parameters
Parameter Description Value
timeout Specifies the idle timeout duration The value is an integer that
of the web server for online users. ranges from 1 to 35791, in
minutes.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
A maximum of five web users are supported at present. When the fifth web user
logs in to the web server, any other user cannot log in to the web server even if
any of the five users does not perform operations for a long time. The idle timeout
duration is configured to release web resources in time. To occupy web channels
for a long time, you must set the idle timeout duration to the maximum value.
Precautions
● After you run the http timeout command, the idle timeout durations are the
same for all web users who log in to the web server. If the idle timeout
duration expires, a user is disconnected from the web server.
● If the http timeout command is configured several times, only the latest
configuration takes effect.
Example
# Set the idle timeout duration of the webHTTP server to 6 minutes.
<Huawei> system-view
[Huawei] http timeout 6
Format
set logo-path subpathname
undo set logo-path
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The device supports customization of the logo image on the web page. You can
create a subdirectory for storing the logo image under the directory logo-path of
the default working directory on the device, and store the logo image to be
displayed in the subdirectory. You can run the set logo-path command to
configure the subdirectory as the storage directory of the logo image on the web
page. The required logo image then can be displayed on the web page.
By default, the current working directory is flash:.
Prerequisites
When setting the storage directory of the logo image on the web page using the
set logo-path command, ensure that a subdirectory for storing the logo image
has been created using the mkdir command under the directory logo-path of the
default working directory.
Precautions
● Store the logo image using the required file name and size in the created
subdirectory. After the storage directory of the logo image on the web page is
set using the set logo-path command, the device automatically reads the file
under the directory and changes the logo image on the web page.
● Store three files with different pixel sizes of the required logo image in the
created subdirectory, and name them as required. Name the image with the
pixel size 16x16 logo1.png, the image with the pixel size 21x22 logo2.png,
and the image with the pixel size 44x44 logo3.png.
Configuration Impact
After the storage directory of the logo image on the web page is set using the set
logo-path command, the logo image on the web page varies depending on the
configuration.
Example
# Set the storage directory of the logo image on the web page to the directory
example_path.
<Huawei> system-view
[Huawei] set logo-path example_path
Info: Set the vendor picture directory: " example_path " successfully.
4.11.2 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 mode.
ASCII mode is used to transfer plain text files, and binary mode is used to transfer
application files, such as system software, images, video files, compressed files,
and database files.
Example
# Set the file transfer mode to ASCII.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User huawei logged in.
[Huawei-ftp] ascii
200 Type set to A.
4.11.3 binary
Function
The binary command sets the file transmission mode to binary on an FTP client.
Format
binary
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Files can be transferred in ASCII or binary mode.
ASCII mode is used to transfer plain text files, and binary mode is used to transfer
application files, such as system software, images, video files, compressed files,
and database files.
Example
# Set the file transmission mode to binary.
<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 huawei logged in.
[Huawei-ftp] binary
200 Type set to I.
4.11.4 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 huawei logged in.
[Huawei-ftp] bye
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye.
<Huawei>
Format
cd remote-directory
Parameters
Parameter Description Value
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.
Example
# Change the working directory to d:/temp.
Format
cd [ remote-directory ]
Parameters
Parameter Description Value
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
● The SFTP server authorizes users to access files in certain directories and their
subdirectories.
● The specified working directory must exist on the SFTP server. If the remote-
directory parameter is not included in the cd command, only the current
working directory of an SSH user is displayed as the command output.
Example
# Change the current working directory of the SFTP server to /bill.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
Function
The cd command changes the current working directory of a user.
Format
cd directory
Parameters
Parameter Description Value
Views
User view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
● slave#flash: root directory of the flash memory on the standby SRU. If the
device has no standby SRU, this drive is unavailable.
● Vhdd0: root directory of the built-in hard disk.
NOTE
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
Example
# Change the current working directory from flash:/temp to flash:.
<Huawei> pwd
flash:/temp
<Huawei> cd flash:
<Huawei> pwd
flash:
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
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
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>
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
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 huawei logged in.
[Huawei-ftp] cd security
250 CWD command successful.
[Huawei-ftp] cdup
250 "C:/" is current directory .
4.11.10 close
Function
The close command terminates the connection with the remote FTP server and
retains the FTP client view.
Format
close
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the bye and quit commands to terminate the connection with the
remote FTP server and enter the user view.
Precautions
To enter the user view from the FTP client view, you can run the bye or quit
command.
Example
# Terminate the connection with the remote FTP server and 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 huawei logged in.
[Huawei-ftp] close
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye.
[Huawei-ftp]
4.11.11 copy
Function
The copy command copies a file.
Format
copy source-filename destination-filename
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The following describes the drive name.
drive is the storage device and is named as follows:
● flash: root directory of the flash memory on the active SRU.
● slave#flash: root directory of the flash memory on the standby SRU. If the
device has no standby SRU, this drive is unavailable.
● Vhdd0: root directory of the built-in hard disk.
NOTE
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
Example
# Copy the file config.cfg from the root directory of the flash memory to flash:/
temp. The destination file name is temp.cfg.
<Huawei> copy flash:/config.cfg flash:/temp/temp.cfg
Info: 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 memory, you can
perform the preceding configuration using the relative path.
<Huawei> pwd
flash:
<Huawei> dir
Directory of flash:/
# Copy the file config.cfg from the root directory of the flash memory to flash:/
temp. The destination file name is config.cfg.
<Huawei> pwd
flash:
<Huawei> dir
Directory of flash:/
# Copy the file backup.zip to backup1.zip in the test directory from the current
working directory flash:/test/.
<Huawei> pwd
flash:/test
<Huawei> copy backup.zip backup1.zip
Info: 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
Format
delete remote-filename
Parameters
Parameter Description Value
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
A file deleted in the FTP client view cannot be restored.
Example
# Delete the file temp.c.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User huawei 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.
Function
The delete command deletes a specified file in the storage device.
Format
delete [ /unreserved ] [ /force ] { filename | devicename }
Parameters
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 as follows:
● flash: root directory of the flash memory on the active SRU.
● slave#flash: root directory of the flash memory on the standby SRU. If the
device has no standby SRU, this drive is unavailable.
● Vhdd0: root directory of the built-in hard disk.
NOTE
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
NOTICE
If you delete a file using the /unreserved parameter, the file cannot be
restored.
● 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, or patch
file, a system prompt is displayed.
Example
# Delete the file test.txt from the flash:/test/ directory.
<Huawei> delete flash:/test/test.txt
Info: Delete flash:/test/test.txt? (y/n)[n]:y
# Delete the file test.txt from the current working directory flash:/selftest.
<Huawei> delete test.txt
Info: Delete flash:/selftest/test.txt? (y/n)[n]:y
Format
dir [ /all ] [ filename | directory ]
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The wildcard character (*) can be used in this command. If no parameter is
specified, this command displays information about files and directories in the
current directory.
The following describes the drive name:
drive is the storage device and is named as follows:
● flash: root directory of the flash memory on the active SRU.
● slave#flash: root directory of the flash memory on the standby SRU. If the
device has no standby SRU, this drive is unavailable.
● Vhdd0: root directory of the built-in hard disk.
NOTE
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
The default directories and files contained in the storage are as follows:
dhcp Directory for storing DHCP address pool data. After the
DHCP data restoration function is configured, the system
stores the lease.txt and conflict.txt files in the dhcp
folder. The lease.txt file stores the lease information of
allocated IP addresses, and the conflict.txt file stores the
address conflict information of allocated IP addresses.
The two files are overwritten periodically; therefore, you
are advised to back up them to other locations.
logfile Directory for storing user and diagnostic logs, which help
you check the device running status, analyze network
health, and locate faults to provide reference information
for system diagnosis and maintenance.
There is a backup directory on the device. To view files in the backup directory, run
the dir backup: command. You can only view files in the backup directory and
cannot perform other operations on the backup directory.
The path can be an absolute path or relative path.
● flash:/my/test/ is an absolute path.
● /selftest/ is a path relative to the root directory and indicates the selftest
directory in the root directory.
● selftest/ is a path relative to the current working directory and indicates the
selftest directory in the current working directory.
You can run the dir /all command to view information about all files and
directories of the storage medium, including those moved to the recycle bin. The
name of a file in the recycle bin is placed in square brackets ([]), for example,
[test.txt].
Precautions
The device can display information about a maximum of 2,000 files and
directories.
Example
# Display information about all files and directories in the current directory.
Item Description
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
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The following describes differences between the dir and ls commands.
● When you run the dir command, detailed file information is displayed,
including the file size, date when the file was created, whether the file is a
directory, and whether the file can be modified. When 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 (*) character 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 huawei logged in.
[Huawei-ftp] cd test
250 CWD command successfully.
[Huawei-ftp] dir
200 Port command okay.
150 Opening ASCII mode data connection for *.
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 complete.
[Huawei-ftp] ls
200 Port command okay.
150 Opening ASCII mode data connection for *.
. ..
yourtest
backup.txt
backup1.txt
226 Transfer complete.
# Display the detailed information for the file temp.c, and save the displayed
information in file temp1.
[Huawei-ftp] dir temp.c temp1
200 Port command okay.
150 Opening ASCII mode data connection for temp.c.
[Huawei-ftp] quit
# 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 huawei logged in.
[Huawei-ftp] ls test.bat test
200 Port command okay.
150 Opening ASCII mode data connection for test.bat.
[Huawei-ftp] quit
Format
dir [ -l | -a ] [ remote-directory ]
ls [ -l | -a ] [ remote-directory ]
Parameters
Parameter Description Value
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 when 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 when you run the dir or ls command.
Example
# Display 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
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
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
-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
4.11.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 huawei logged in.
[Huawei-ftp] disconnect
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye.
[Huawei-ftp]
Format
display ftp-client
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
The default source IP address 0.0.0.0 is used if ftp client-source is not configured.
Example
# Display the source IP address of the FTP client.
<Huawei> display ftp-client
Info: The source address of the FTP client is 10.1.1.1.
Info: The source address of the FTP 10.1.1.1 is the source IP address of the
client is 10.1.1.1. FTP client.
You can run the ftp client-source
command to configure the source IP
address.
If a source IP address has been
configured by using the ftp client-
source command, the message "The
source interface of the FTP client is
LoopBack0" is displayed.
Format
display [ ipv6 ] ftp-server
Parameters
Parameter Description Value
Views
All views
Default Level
3: Management level
Usage Guidelines
You can run this command to display FTP server parameter settings.
Example
# Display FTP server parameter settings.
<Huawei> display ftp-server
FTP server is running
Max user number 5
User count 1
Timeout value(in minute) 30
Listening port 21
Acl number 2010
FTP server's source address 10.1.1.1
FTP server's source address Source IP address for the FTP server to
send packets. The default value is
0.0.0.0.
You can run the ftp server-source
command to configure the source IP
address for the FTP server. Here, the
source IP address 10.1.1.1 is displayed.
If a source interface is configured, this
field displays "FTP server's source
interface LoopBack0."
NOTE
If you run the display ipv6 ftp-server
command, FTP server's source interface
LoopBack0 is not displayed.
Function
The display ftp-users command displays FTP user parameters on the FTP server.
Format
display ftp-users
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
You can check FTP user parameters on the FTP server, such as the FTP user name,
IP address of the client host, port number, idle duration, and the authorized
directories.
Example
# Display FTP user parameters.
<Huawei> display ftp-users
username host port idle topdir
user 10.138.77.41 4028 0 flash:/test
huawei 10.137.217.159 51156 0 flash:
The preceding information indicates that two users are connected to the FTP
server.
Item Description
Item Description
Format
display sftp-client
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
You can run the display sftp-client command to display the source IP address of
the SFTP client. The default source IP address 0.0.0.0 is used if sftp client-source
is not configured.
Example
# Display the source IP address configured for the SFTP client.
<Huawei> display sftp-client
Info: The source address of SFTP client is 10.1.1.1
Item Description
Info: The source address of SFTP client 10.1.1.1 is the source IP address of the
is 10.1.1.1 SFTP client.
You can run the sftp client-source
command to configure the source IP
address for the SFTP client.
If an IP address has been configured
for the source port, the message "The
source interface of the SFTP client is
LoopBack0" is displayed.
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.
Example
# Display the source IP address configured for the TFTP client.
<Huawei> display tftp-client
Info: The source address of TFTP client is 10.1.1.1.
Parameter Description
Info: The source address of TFTP client 10.1.1.1 is the source IP address of the
is 10.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.
Format
display tftp-server status
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
You can run this command to check the TFTP server configuration and
connections with the current TFTP clients.
Example
# Display the TFTP server information.
<Huawei> display tftp-server status
TFTP Server is enabled
Listening port 69
Timeout value(in second) 10
TFTP server's root path flash:
There are 1 clients connected
[1]: ip 10.137.217.163, port 23, op READ
There are 1 clients connected One client has connected to the TFTP
server.
4.11.24 execute
Function
The execute command executes a specified batch file.
Format
execute batch-filename
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If a series of commands are frequently executed, write these commands in a batch
file, and store this file in system. In this way, you can only execute this command
to run multiple commands which were manually entered before. This command
improves maintenance and management efficiency.
NOTE
● The batch file is edited in .txt format. When editing the file, ensure that one command
occupies one line. After editing the file, save the file and change the file name extension
to .bat.
● Transfer the batch file in file transmission mode to the device.
Prerequisites
Before running the execute command, ensure that the batch file to be processed
is in the current directory; otherwise, the system cannot find the batch file.
Precautions
● The commands in a batch file are run one by one. A batch file cannot contain
invisible characters (control characters or escape characters, such as \r, \n, and
\b). If any invisible character is detected, the execute command exits from the
current process and no rollback is performed.
● The execute command does not ensure that all commands can be run. If the
system runs a wrong or immature command, it displays the error and goes to
next command. The execute command does not perform the hot backup
operation, and the command format or content is not restricted.
● In case of interactive commands, batch file execution waits the device to
interact with users before continuing.
Example
# Execute the test.bat file in the directory flash:/. The test.bat file contains three
commands: system-view, aaa, and local-user huawei access-limit max-number.
<Huawei> system-view
[Huawei] execute test.bat
[Huawei] system-view
^
Error: Unrecognized command found at '^' position.
[Huawei] aaa
[Huawei-aaa] local-user huawei access-limit 100
[Huawei-aaa]
When the system runs the first command system-view in current system view, it
displays an error and continues to run the following commands.
The system displays the execution of a batch file in AAA view.
[Huawei-aaa] display this
local-user huawei access-limit 100
Format
file prompt { alert | quiet }
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
NOTICE
If the prompt mode is set to quiet, the system does not provide prompt messages
when operations leading to data loss are executed, such as 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
100% complete
Info: Copied file flash:/test.txt to flash:/test1.txt...Done.
4.11.26 format
Function
The format command formats a storage device.
Format
format drive
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
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.
Configuration Impact
NOTICE
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 flash:
All data(include configuration and system startup file) on flash: will be lost , proceed with format? (y/n)
[n]:y
Info: Format flash: completed, restart the device to make the modification take effect.
4.11.27 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 ] [ public-net | vpn-instance vpn-instance-name ] ]
# Connect the FTP client to the FTP server based on the IPv6 address.
ftp ipv6 host-ipv6 [ vpn6-instance vpn6-instance-name ] [ port-number ]
Parameters
Parameter Description Value
port-number Specifies the port number of the The value is an integer that
FTP server. ranges from 1 to 65535. The
default value is the standard
port number 21.
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, filters
incoming and outgoing packets, and implements security authentication.
● You can run the set net-manager vpn-instance command to configure the
NMS management VPN instance before running the open command to
connect the FTP client and server.
– If public-net or vpn-instance is not specified, the FTP client accesses the
FTP server in the VPN instance managed by the NMS.
– If public-net is specified, the FTP client accesses the FTP server on the
public network.
– If vpn-instance vpn-instance-name is specified, the FTP client accesses
the FTP server in a specified VPN instance.
● 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.
● On an IPv6 network, the IP address of an IPv6 FTP server cannot be set to a
local port address or loopback address (::1).
NOTE
FTP is an insecure protocol. If you have high network security requirements, you are advised
to use SFTP.
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 huawei logged in.
[Huawei-ftp]
[Huawei-ftp]
Function
The ftp acl command specifies an ACL number for the current FTP server so that
the FTP client with the same ACL number can access the FTP server.
The undo ftp acl command deletes an ACL number of the current FTP server.
Format
ftp [ ipv6 ] acl acl-number
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To ensure the security of an FTP server, you need to configure an ACL for it to
specify FTP clients that can access the current FTP server.
Precautions
● The ftp acl command takes effect only after you run the rule command to
configure the ACL rule.
● The FTP only supports the basic ACL whose number ranges from 2000 to
2999.
Example
# Allow the client whose ACL number is 2000 to log in to the FTP server.
<Huawei> system-view
[Huawei] acl 2000
[Huawei-acl-basic-2000] rule permit source 10.10.10.1 0
[Huawei-acl-basic-2000] quit
[Huawei] ftp acl 2000
Function
The ftp client-source command specifies the source IP address for the FTP client
to send packets.
The undo ftp client-source command restores the default source IP address for
the FTP client to send packets.
The default source IP address for the FTP client to send packets is 0.0.0.0.
Format
ftp client-source { -a source-ip-address | -i interface-type interface-number }
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the client uses the source IP address that the
router specifies to send packets. The source IP address must be configured for an
interface with stable performance. The loopback interface is recommended. Using
the loopback interface as the source interface simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, filters incoming and 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.
● If the specified source interface has been bound to a VPN instance, the client
is automatically bound to the same VPN instance.
Example
# Set the source IP address of the FTP client to 10.1.1.1.
<Huawei> system-view
[Huawei] ftp client-source -a 10.1.1.1
Info: Succeeded in setting the source address of the FTP client to 10.1.1.1.
Function
The ftp server enable command enables the FTP server function to allow FTP
users to log in to the FTP server.
The undo ftp server command disables the FTP server function so that FTP users
cannot log in to the FTP server.
Format
ftp [ ipv6 ] server enable
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To remotely manage files on the device through FTP, run this command to enable
the FTP server function to allow FTP users to log in to the device.
Prerequisites
The interfaces on the FTP server to which clients can connect have been specified
by running the ftp server permit interface { { interface-type interface-number }
&<1-5> | all } command. If no interface is specified, the FTP server function cannot
be enabled.
Precautions
If the FTP server function is disabled, no user can log in to the FTP server, and
users who have logged in to the FTP server cannot perform any operation except
logout.
NOTICE
Example
# Enable the FTP server function.
<Huawei> system-view
[Huawei] ftp server permit interface all
Warning: Allowing access from all interfaces is insecure.
[Huawei] ftp server enable
Info: Succeeded in starting the FTP server.
Info: FTP is insecure, recommended to use SFTP with encryption features.
Function
The ftp server permit interface command specifies interfaces on the FTP server
to which clients can connect.
The undo ftp server permit interface command deletes the specified interfaces
and allows clients to connect to all interfaces on the FTP server.
Format
ftp server permit interface { interface-type interface-number } &<1-5>
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent clients from connecting to the FTP server through unauthorized
interfaces, you can run the ftp server permit interface command to specify
interfaces on the FTP server to which clients can connect.
Precautions
● This command does not take effect on the MEth management interface. The
FTP server always allows clients to connect to it through the MEth
management interface.
● By default, clients can connect to all interfaces on the FTP server. Once a
specific interface is specified using this command, a client cannot connect to
the FTP server through any other interface.
● A maximum of five interfaces can be specified using the ftp server permit
interface { interface-type interface-number } &<1-5> command. The latest
configuration overrides the previous one. For example, before you run this
command, clients can connect to three interfaces GigabitEthernet 1/0/0,
GigabitEthernet 2/0/0, and GigabitEthernet 3/0/0 on the FTP server. After you
run the command to specify the interface GigabitEthernet 1/0/0, clients can
only connect to the interface GigabitEthernet 1/0/0.
Example
# Allow clients to connect to all interfaces on the FTP server.
<Huawei> system-view
[Huawei] ftp server permit interface all
Warning: Allowing access from all interfaces is insecure.
# Delete the specified interfaces and allow clients to connect to all interfaces on
the FTP server.
<Huawei> system-view
[Huawei] undo ftp server permit interface
Format
ftp [ ipv6 ] server port port-number
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
By default, the listening port number of the FTP server is 21. Attackers may
frequently access the default listening port, which wastes bandwidth, deteriorates
server performance, and prevents authorized users from accessing the FTP server
through the listening port. You can run the ftp server port command to specify
another listening port number to prevent attackers from accessing the listening
port.
Prerequisites
Before running the ftp server port command to specify the listening port number,
you must first run the undo ftp server command to disable FTP services.
Precautions
● After the ftp server port command is executed, the FTP server disconnects all
FTP connections and uses the new listening port.
● If the current listening port number is 21, FTP client users do not need to
specify the port number for logging in to the FTP server. If the current
listening port number is not 21, FTP client users must use the FTP server's
listening port number to log in to the FTP server.
● After the listening port number is changed, you must run the ftp server
enable command to enable FTP services to make the configuration take
effect.
Example
# Change the port number of the FTP server to 1028.
<Huawei> system-view
[Huawei] undo ftp server
[Huawei] ftp server port 1028
Format
ftp server-source { -a [ ipv6 ] source-ip-address | -i [ ipv6 ] interface-type
interface-number }
undo ftp [ ipv6 ] server-source
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the FTP server uses the source IP address
specified by routes to send packets. The source IP address must be configured for
an interface with stable performance, such as the loopback interface. Using the
loopback interface as the source IP address simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, filters incoming and outgoing packets, and implements security
authentication.
Precautions
● After the source IP address is specified for the FTP server, you must use the
specified IP address to log in to the FTP server.
● If the FTP service has been enabled, the FTP service restarts after the ftp
server-source command is executed.
● If the specified source interface has been bound to a VPN instance, the server
is automatically bound to the same VPN instance.
Example
# Set the source IP address of the FTP server to LoopBack0.
<Huawei> system-view
[Huawei] ftp server-source -i loopback 0
Warning: To make the server source configuration take effect, the FTP server will be restarted. Continue? [Y/
N]: y
Info: Succeeded in setting the source interface of the FTP server to LoopBack0.
Info: Succeeded in starting the FTP server.
Info: FTP is insecure, recommended to use SFTP with encryption features.
Function
The ftp timeout command configures the idle timeout duration of the FTP server.
The undo ftp timeout command restores the default idle timeout duration.
Format
ftp [ ipv6 ] timeout minutes
Parameters
Parameter Description Value
minutes Specifies idle timeout The value is an integer that ranges from
duration. 1 to 35791, in minutes. By default, the
idle timeout duration is 30 minutes.
Views
System view
Default Level
3: Management level
Usage Guidelines
After a user logs in to the FTP server, a connection is set up between the FTP
server and the user's client. The idle timeout duration is configured to release the
connection when the connection is interrupted or when the user performs no
operation for a specified time.
Example
# Set the idle timeout duration to 36 minutes.
<Huawei> system-view
[Huawei] ftp timeout 36
Format
get remote-filename [ local-filename ]
Parameters
Parameter Description Value
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 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
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
sftp-client> get test.txt
Remote file: / test.txt ---> Local file: test.txt
Info: Downloading file successfully ended.
Format
get remote-filename [ local-filename ]
Parameters
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the get command to download system software, backup
configuration files, and patch files from the FTP server to upgrade devices.
Precautions
● If the downloaded file name is not specified on the local device, the original
file name is used.
● If the name of the downloaded file is the same as that of an existing local
file, the system prompts you whether to overwrite the existing file.
Example
# Download the system software devicesoft.cc from the FTP server.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User huawei logged in.
[Huawei-ftp] get devicesoft.cc
200 Port command successful.
150 Opening data connection for devicesoft.cc.
226 File sent ok
FTP: 6482944 byte(s) received in 54.500 second(s) 1117.40byte(s)/sec.
Format
help [ all | command-name ]
Parameters
Parameter Description Value
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 are displayed. This has the same effect as the help all
command or directly entering the question mark (?) in the SFTP client view.
Example
# Display the format of the command get.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
4.11.38 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
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the lcd command to display the local working directory of the FTP
client when uploading or downloading files, and set the upload or download path
to the path of the local working directory.
Precautions
The lcd command displays the local working directory of the FTP client, while the
pwd command displays the working directory of the FTP server. If you specify the
parameter local-directory in the lcd command, you can directly change the local
working directory in the FTP client view.
Example
# Change the local working directory to flash:/test.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User huawei logged in.
[Huawei-ftp] lcd
The current local directory is flash:.
[Huawei-ftp] lcd flash:/test
The current local directory is flash:/test.
Format
mkdir remote-directory
Parameters
Parameter Description Value
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
● You can run the mkdir command to create a subdirectory in a specified
directory, and the subdirectory name must be unique.
● If no path is specified when you create a subdirectory, the subdirectory is
created in the current directory.
● The created directory is stored on the FTP server.
Example
# Create a directory test on the remote FTP server.
<Huawei> ftp 172.16.104.110
Trying 172.16.104.110 ...
Press CTRL+K to abort
Connected to 172.16.104.110.
220 FTP service ready.
User(172.16.104.110:(none)):huawei
331 Password required for huawei
Enter password:
230 User logged in.
[Huawei-ftp] mkdir test
257 "test" new directory created.
Function
The mkdir command creates a directory on the remote SFTP server.
Format
mkdir remote-directory
Parameters
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
● You can run the mkdir command to create a subdirectory in a specified
directory, and the subdirectory name must be unique.
● If no path is specified when you create a subdirectory, the subdirectory is
created in the current directory.
● The created directory is stored on the SFTP server.
● After a directory is created, you can run the dir/ls (SFTP client view)
command to view the directory.
Example
# Create a directory on the SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
sftp-client> mkdir ssh
Info: Succeeded in creating a directory.
Format
mkdir directory
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The following describes the drive name.
drive is the storage device and is named as follows:
● flash: root directory of the flash memory on the active SRU.
● slave#flash: root directory of the flash memory on the standby SRU. If the
device has no standby SRU, this drive is unavailable.
● Vhdd0: root directory of the built-in hard disk.
NOTE
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
Example
# Create the subdirectory new in the flash memory.
<Huawei> mkdir flash:/new
Info: Create directory flashsd1:/new......Done
4.11.42 more
Function
The more command displays the content of a specified file.
Format
more [ /binary ] filename [ offset ] [ all ]
Parameters
Parameter Description Value
offset Specifies the file The value is an integer that ranges from 0 to
offset. 2147483647, in bytes.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the more command to display the file content directly on a device.
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
▪ The total number of file lines is greater than the number of lines
that can be displayed on a terminal screen. (The number of lines that
can be displayed on a terminal screen is set by running the screen-
length command.)
– You can run the more filename offset command to view a specified file.
The content of the specified text file starting from offset is displayed on
multiple screens. You can press the spacebar consecutively on the current
session GUI to display all content of the file.
To display the file content on multiple screens, you must ensure that:
▪ The number of lines starting from offset in the file is greater than
the number of lines that can be displayed on a terminal screen. (The
number of lines that can be displayed on a terminal screen is set by
running the screen-length command.)
– You can run the more file-name all command to view a specified file.
The file content is displayed on one screen.
Example
# Display the content of the file test.bat.
<Huawei> more test.bat
rsa local-key-pair create
user-interface vty 12 14
authentication-mode aaa
protocol inbound ssh
user privilege level 5
quit
ssh user sftpuser authentication-type password
sftp server enable
# Display the content of the file log.txt and set the offset to 100.
<Huawei> more log.txt 100
: CHINA HUAWEI TECHNOLOGY LIMITTED CO.,LTD
# FILE NAME: Product Adapter File(PAF)
# PURPOSE: MAKE VRPV5 SUITABLE FOR DIFFERENT PRODUCT IN LIB
# SOFTWARE PLATFORM: V6R2C00
# DETAIL VERSION: B283
# DEVELOPING GROUP: 8090 SYSTEM MAINTAIN GROUP
# HARDWARE PLATFORM: 8090 (512M Memory)
# CREATED DATE: 2003/05/10
# AUTH: RAINBOW
# Updation History: Kelvin dengqiulin update for 8090(2004.08.18)
# lmg update for R3(2006.11.7)
# fsr update for R5 (2008.1.18)
# qj update for R6 (2008.08.08)
# COPYRIGHT: 2003---2008
#----------------------------------------------------------------------------------
Format
move source-filename destination-filename
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
Precautions
● If the destination file has the same name as an existing file, the system
prompts you whether to overwrite the existing file. The system prompt is
displayed only when file prompt is set to alert.
● This command cannot be used to move files between storage devices.
● The move and copy commands have different effects:
– The move command moves the source file to the destination directory.
– The copy command copies the source file to the destination directory.
Example
# Move a file from flash:/test/sample.txt to flash:/sample.txt.
<Huawei> move flash:/test/sample.txt flash:/sample.txt
Info: Move flash:/test/sample.txt to flash:/sample.txt ?(y/n)[n]: y
Info: Moved file flash:/test/sample.txt to flash:/sample.txt.
4.11.44 open
Function
The open command connects the FTP client and server.
Format
# Connect the FTP client to the FTP server based on the IPv4 address.
# Connect the FTP client to the FTP server based on the IPv6 address.
Parameters
port-number Specifies the port number of the The value is an integer that
FTP server. ranges from 1 to 65535, or
21. The default value is the
standard port number 21.
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, filters
incoming and outgoing packets, and implements security authentication.
● You can run the set net-manager vpn-instance command to configure the
NMS management VPN instance before running the open command to
connect the FTP client and server.
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 fc00:2001:db8::1.
<Huawei> ftp
[Huawei-ftp] open ipv6 fc00:2001:db8::1
Trying fc00:2001:db8::1 ...
Press CTRL+K to abort
Connected to fc00:2001:db8::1
220 FTP service ready.
User(fc00:2001:db8::1:(none)):huawei
331 Password required for huawei
Enter Password:
230 User logged in.
[Huawei-ftp]
4.11.45 partition
Function
The partition command partitions the external storage medium of the device.
Format
partition device-name
Parameters
Parameter Description Value
device-name Specifies the name of the The value is a string of 1 to 64
external storage medium to be case-insensitive characters
partitioned. without spaces.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Partitioning the external storage medium of a device facilitates file differentiation
and management. If the external storage medium is partitioned and a partition is
faulty, data saved in other partitions is not affected.
Precautions
NOTICE
After this command is run, all files and directories are cleared from the specified
external storage medium of the device and cannot be restored. Therefore, exercise
caution when running this command.
If the external storage medium is still unavailable after this command is run, a
physical exception may have occurred.
Example
# Partition the external storage medium of a device.
<Huawei> partition hdd0:
All data(include configuration and system startup file) on hdd0: will be lost ,
proceed with partition? [Y/N]:y
4.11.46 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
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 huawei logged in.
[Huawei-ftp] passive
Info: Succeeded in switching passive on.
Function
The put command uploads a local file to the remote FTP server.
Format
put local-filename [ remote-filename ]
Parameters
Parameter Description Value
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 huawei 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.
Format
put local-filename [ remote-filename ]
Parameters
Parameter Description Value
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
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
sftp-client> put wm.cfg
local file: wm.cfg ---> Remote file: /wm.cfg
Info: Uploading file successfully ended.
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 huawei logged in.
[Huawei-ftp] pwd
257 "/" is current directory.
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
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
sftp-client> pwd
/
sftp-client> cd test
Current directory is:
/test
sftp-client> pwd
/test
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
4.11.52 remotehelp
Function
The remotehelp command displays the help information about an FTP command
when the FTP client and server are connected.
Format
remotehelp [ command ]
Parameters
Parameter Description Value
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
You can run the remotehelp command to display the help information about an
FTP command.
Example
# Display the syntax of the command cdup.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User huawei logged in.
[Huawei-ftp] remotehelp
214-The following commands are recognized (* =>'s unimplemented).
USER PORT STOR MSAM* RNTO NLST MKD CDUP
PASS PASV APPE MRSQ* ABOR SITE* XMKD XCUP
ACCT TYPE MLFL* MRCP* DELE SYST RMD STOU
SMNT* STRU MAIL* ALLO* CWD STAT XRMD SIZE*
REIN MODE MSND* REST* XCWD HELP PWD MDTM*
QUIT RETR MSOM* RNFR LIST NOOP XPWD
214 Direct comments about WFTPD to [email protected].
Function
The remove command deletes specified files from the remote SFTP server.
Format
remove remote-filename &<1-10>
Parameters
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
● You can configure a maximum of 10 file names in the command and separate
them using spaces and delete them at one time.
● 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
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
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.
Function
The remove command removes a storage device safely.
Format
remove drive
Parameters
Parameter Description Value
drive Specifies the name of the storage The value can be usb0:,
device to be removed. usbotg:, or usb1:.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the remove command to safely remove a USB flash drive from the
device to prevent files in the device from being damaged.
Precautions
To safely remove a USB flash drive from the device, run the remove command. If
a USB flash drive is removed and inserted quickly, the device cannot read data
from the USB flash drive. In this case, you need to remove the USB flash drive and
insert it again after several seconds.
Example
# Remove the storage device USB0.
<Huawei> remove usb0:
…
Info: remove device usb0: successfully
Format
rename old-name new-name
Parameters
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
You can run the rename command to rename a file or directory.
Example
# Rename the directory yourtest in the authorized directory test 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
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
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
Function
The rename command renames a file or folder.
Format
rename old-name new-name
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
Precautions
Example
# Rename the directory mytest to yourtest in the directory flash:/test/.
<Huawei> pwd
flash:/test
<Huawei> rename mytest yourtest
Info: Rename flash:/test/mytest to flash:/test/yourtest ?(y/n)[n]:y
Info: Rename file flash:/test/mytest to flash:/test/yourtest ......Done
Format
reset recycle-bin [ filename | devicename ]
Parameters
Parameter Description Value
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.
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
Example
# Delete the file test.txt that is moved to the recycle bin from the directory test in
the root directory of flash:.
<Huawei> reset recycle-bin flash:/test/test.txt
Info: Squeeze flash:/test/test.txt?(y/n)[n]:y
Info: 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
Info: Squeeze flash:/test/backup.zip?(y/n)[n]:y
Info: Cleared file flash:/test/backup.zip.
Info: Squeeze flash:/test/backup1.zip?(y/n)[n]:y
Info: Cleared file flash:/test/backup1.zip.
Format
rmdir remote-directory
Parameters
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the rmdir command to delete a specified directory from the remote
FTP server.
Precautions
● Before running the rmdir command to delete a directory, you must delete all
files and subdirectories from the directory.
● If no path is specified when you delete a subdirectory, the subdirectory is
deleted from the current directory.
● The directory is deleted from the FTP server rather than the FTP client.
Example
# Delete the directory d:/temp1 from the remote FTP server.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User huawei logged in.
[Huawei-ftp] rmdir d:/temp1
250 'D:\temp1': directory removed.
Format
rmdir directory
Parameters
Parameter Description Value
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 as follows:
● flash: root directory of the flash memory on the active SRU.
● slave#flash: root directory of the flash memory on the standby SRU. If the
device has no standby SRU, this drive is unavailable.
● Vhdd0: root directory of the built-in hard disk.
NOTE
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
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
Info: Removing directory flash:/test....Done!
Function
The rmdir command deletes a specified directory from the remote SFTP server.
Format
rmdir remote-directory &<1-10>
Parameters
Parameter Description Value
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
Connected to 10.137.217.201 ...
Enter password:
sftp-client> cd bill
Current directory is:
/bill
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.
Function
The set default ftp-directory command configures the default FTP working
directory.
The undo set default ftp-directory command disables the default FTP working
directory.
Format
set default ftp-directory directory
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the set default ftp-directory command to configure a default FTP
working directory for all FTP users at one time.
Precautions
● The set default ftp-directory command takes effect only when the device
functions as an FTP server and the user function as an FTP client.
● You can run the local-user ftp-directory command to configure an
authorized working directory for a local user.
● If you have configured the FTP working directory by running the local-user
ftp-directory command, you must use this FTP working directory.
● You can run the lcd command to view the working directory of FTP users.
● If no FTP working directory is specified on the device, FTP users cannot log in
to the device.
Example
# Set the default FTP working directory to flash:/.
<Huawei> system-view
[Huawei] set default ftp-directory flash:/
Format
set default tftp-directory directory
undo set default tftp-directory
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
You need to configure a working directory for the TFTP server on the device. After
that, TFTP clients can obtain files from the specified working directory.
Example
# Set the working directory of the TFTP server to flash:.
<Huawei> system-view
[Huawei] set default tftp-directory flash:
Format
set net-manager vpn-instance vpn-instance-name
undo set net-manager vpn-instance
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the NMS manages devices on the VPN network, you need to send the device
information to the NMS using the VPN instance.
You can run the set net-manager vpn-instance command to configure the
default VPN instance for the NMS to manage the device so that the device can
use this VPN instance to communicate with the NMS.
Precautions
● The VPN instance must have been created on the device before this command
is run.
● After this command is run successfully, the configured file transfer commands
based on FTP, SCP, or SFTP take effect only in the default VPN instance.
● If the host has been configured as a log host, the NMS can receive device logs
from the default VPN instance.
Example
# Set the default VPN instance to VPN instance v1.
<Huawei> system-view
[Huawei] set net-manager vpn-instance v1
4.11.64 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 ]
[ [ public-net | -vpn-instance vpn-instance-name ] | [ identity-key { rsa | ecc } ] |
[ user-identity-key { rsa | ecc } ] | [ prefer_kex { dh_group15_sha512 |
dh_group14_sha256 | dh_group14_sha1 | dh_group1 | dh_exchange_group } ] |
[ prefer_ctos_cipher { 3des | aes128 | aes128-ctr | aes192-ctr | aes256-ctr } ] |
[ prefer_stoc_cipher { 3des | aes128 | aes128-ctr | aes192-ctr | aes256-ctr } ] |
[ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 | sha2_256 |
sha2_256_96 } ] | [ prefer_stoc_hmac { sha1 | sha1_96 | md5 | md5_96 |
sha2_256 | sha2_256_96 } ] ] * [ -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 ] [ [ -vpn6-instance vpn-instance-name ] | [ identity-key { rsa | ecc } ] |
[ user-identity-key { rsa | ecc } ] | [ prefer_kex { dh_group15_sha512 |
dh_group14_sha256 | dh_group14_sha1 | dh_group1 | dh_exchange_group } ] |
[ prefer_ctos_cipher { 3des | aes128 | aes128-ctr | aes192-ctr | aes256-ctr } ] |
[ prefer_stoc_cipher { 3des | aes128 | aes128-ctr | aes192-ctr | aes256-ctr } ] |
[ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 | sha2_256 |
sha2_256_96 } ] | [ prefer_stoc_hmac { sha1 | sha1_96 | md5 | md5_96 |
sha2_256 | sha2_256_96 } ] ] * [ -ki aliveinterval [ -kc alivecountmax ] ]
Parameters
Parameter Description Value
-ki aliveinterval Specifies the interval for The value is an integer that
sending keepalive ranges from 1 to 3600, in
packets when no packet seconds.
is received in reply.
-kc alivecountmax Specifies the times for The value is an integer that
sending keepalive ranges from 3 to 10. The
packets when no packet default value is 5.
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, filters incoming and outgoing
packets, and implements security authentication.
● The SSH client can log in to the SSH server with no port number specified
only when the port number of the SSH server is 22. If the SSH server uses
another port, the port number must be specified when SSH clients log in to
the SSH server.
● You can run the set net-manager vpn-instance command to configure the
NMS management VPN instance before running the open command to
connect the FTP client and server.
– If public-net or vpn-instance is not specified, the FTP client accesses the
FTP server in the VPN instance managed by the NMS.
– If public-net is specified, the FTP client accesses the FTP server on the
public network.
– If vpn-instance vpn-instance-name is specified, the FTP client accesses
the FTP server in a specified VPN instance.
● 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.
● For security purposes, you are advised to use the AES128, AES128-CTR,
AES192-CTR, AES256-CTR or SHA2_256 encryption algorithms instead.
Example
# Set the current listening port number of the SSH server to 1025, and specify the
SFTP client on the public network and the SSH server on the private network.
<Huawei> system-view
[Huawei] sftp 10.164.39.223 1025 -vpn-instance ssh
Please input the username: client001
Trying 10.164.39.223 ...
Press CTRL+K to abort
Enter password:
sftp-client>
# 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>
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
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the client uses the source IP address that the
router specifies to send packets. The source IP address must be configured for an
interface with stable performance. The loopback interface is recommended. Using
the loopback interface as the source interface simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, filters incoming and 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.
● If the specified source interface has been bound to a VPN instance, the client
is automatically bound to the same VPN instance.
Example
# Set the source IP address of the SFTP client to 10.1.1.1.
<Huawei> system-view
[Huawei] sftp client-source -a 10.1.1.1
Info: Succeeded in setting the source address of the SFTP client to 10.1.1.1.
Format
sftp server enable
undo sftp server enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
To connect the client to the SSH server to transfer files in SFTP mode, you must
first enable the SFTP server on the SSH server.
Example
# Enable the SFTP service.
<Huawei> system-view
[Huawei] ssh server permit interface all
Warning: Allowing access from all interfaces is insecure.
[Huawei] sftp server enable
Info: Succeeded in starting the SFTP server.
4.11.67 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
[ public-net | vpn-instance vpn-instance-name ] { get | put } source-filename
[ destination-filename ]
# Upload a file to the TFTP server or download a file to the local device based on
the IPv6 address
tftp ipv6 [ -a source-ip-address ] tftp-server-ipv6 [ -oi interface-type interface-
number ] [ vpn6-instance vpn6-instance-name ] { get | put } source-filename
[ destination-filename ]
Parameters
Parameter Description Value
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.
● You can run the set net-manager vpn-instance command to configure the
NMS management VPN instance before running the open command to
connect the FTP client and server.
– If public-net or vpn-instance is not specified, the FTP client accesses the
FTP server in the VPN instance managed by the NMS.
– If public-net is specified, the FTP client accesses the FTP server on the
public network.
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 fc00::1 -oi gigabitethernet 1/0/0 get file1 file2
Format
tftp client-source { -a source-ip-address | -i interface-type interface-number }
undo tftp client-source
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the client uses the source IP address that the
router specifies to send packets. The source IP address must be configured for an
interface with stable performance. The loopback interface is recommended. Using
the loopback interface as the source interface simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, filters incoming and 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.
● If the specified source interface has been bound to a VPN instance, the client
is automatically bound to the same VPN instance.
Example
# Set the source IP address of the TFTP client to 10.1.1.1.
<Huawei> system-view
[Huawei] tftp client-source -a 10.1.1.1
Info: Succeeded in setting the source address of the TFTP client to 10.1.1.1.
Format
tftp-server acl acl-number
undo tftp-server acl
Parameters
Parameter Description Value
acl-number Specifies the number of the The value is an integer that ranges
basic ACL. from 2000 to 2999.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To ensure the security of the local device, you need to run the tftp-server acl
command to specify an ACL to specify TFTP servers that the local device can
access.
Precautions
● The tftp-server acl command takes effect only after you run the rule
command to configure the ACL rule. If no ACL rule is configured, the local
device can access a specified TFTP server in TFTP mode.
● 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> system-view
[Huawei] acl 2000
Function
The tftp server enable command enables the TFTP server function on the device.
The undo tftp server enable command disables the TFTP server function on the
device.
Format
tftp server enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To allow a local client to remotely manage files on the device using TFTP, you
must run this command to enable the TFTP server function on the device.
NOTE
Prerequisite
● The TFTP working directory has been configured by running the set default
tftp-directory directory command.
● The interfaces on the TFTP server to which clients can connect have been
specified by running the tftp server permit interface { { interface-type
interface-number } &<1-5> | all } command. If no interface is specified, the
TFTP server function cannot be enabled.
Example
# Enable the TFTP server function.
<Huawei> system-view
[Huawei] set default tftp-directory flash:
[Huawei] tftp server permit interface all
Warning: Allowing access from all interfaces is insecure.
[Huawei] tftp server enable
Info: Succeeded in starting the TFTP server.
Info: TFTP is insecure, recommended to use SFTP with encryption features.
Function
The tftp server permit interface command specifies interfaces on the TFTP server
to which clients can connect
The undo tftp server permit interface command deletes the specified interfaces
and allows clients to connect to all interfaces on the TFTP server.
By default, clients can connect to all the interfaces on the TFTP server.
Format
tftp server permit interface { { interface-type interface-number } &<1-5> | all }
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent clients from connecting to the TFTP server through unauthorized
interfaces, you can run the tftp server permit interface command to specify the
interfaces on the TFTP server to which clients can connect.
Precautions
● This command does not take effect on the MEth management interface. The
TFTP server always allows clients to connect to it through the MEth
management interface.
● By default, clients can connect to all the interfaces on the TFTP server. Once a
specific interface is specified using this command, a client cannot connect to
the TFTP server through any other interface.
● A maximum of five interfaces can be specified using the tftp server permit
interface { interface-type interface-number } &<1-5> command. The latest
configuration overrides the previous one. For example, before you run this
command, clients can connect to three interfaces GigabitEthernet 1/0/0,
GigabitEthernet 2/0/0, and GigabitEthernet 3/0/0 on the TFTP server. After
you run the command to specify the interface GigabitEthernet 1/0/0, clients
can only connect to the interface GigabitEthernet 1/0/0.
● If no interface is specified on the TFTP server to allow clients to connect to
the server, the TFTP service cannot be enabled.
● The undo tftp server permit interface command can be executed only after
the TFTP service is disabled.
Example
# Allow clients to connect to all interfaces on the TFTP server.
<Huawei> system-view
[Huawei] tftp server permit interface all
Warning: Allowing access from all interfaces is insecure.
# Delete the specified interfaces and allow clients to connect to all interfaces on
the TFTP server.
<Huawei> system-view
[Huawei] undo tftp server permit interface
Format
tftp server port port-number
Parameters
Parameter Description Value
port-number Specifies the port number The value is an integer that ranges
of the TFTP server. from 69 or 1025 to 55535. The
default value is 69.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
By default, the port number of the TFTP server is 69. Users can directly log in to
the device using the default port number. Attackers may access the default port,
consuming bandwidth, deteriorating server performance, and causing authorized
users unable to access the server. You can run this command to configure another
port number for the TFTP server. This can prevent attacks to the TFTP server
because attackers cannot obtain the newly configured port number.
Prerequisite
The TFTP service has been disabled by running the undo tftp server enable
command.
Precautions
● When the port number of the TFTP server is 69, a TFTP client can connect to
the TFTP server without the need to specify a port number. When the port
number of the TFTP server is not 69, you need to specify a port number for
the TFTP client before it can connect to the TFTP server, and the specified
client port number must be the same as the server port number.
● After running this command to configure a new port number, you must run
the tftp server enable command to enable the TFTP server before the
modified port number takes effect.
Example
# Set the port number of the TFTP server to 1028.
<Huawei> system-view
[Huawei] tftp server port 1028
Format
tftp server timeout timeout-second
undo tftp server timeout
Parameters
Parameter Description Value
timeout-second Specifies the packet The value an integer that ranges
timeout period of a TFTP from 1 to 300, in seconds. The
server. default value is 5s.
Views
System view
Default Level
3: Management level
Usage Guidelines
If the server does not receive any response within 5 seconds after sending a packet
to a client, it considers that the packet times out. The TFTP server will resend a
packet twice. If the packet times out three times, the TFTP server disconnects the
TFTP connection.
Example
# Set the packet timeout period of a TFTP server to 10s.
<Huawei> system-view
[Huawei] tftp server timeout 10
4.11.74 undelete
Function
The undelete command restores a file that has been temporally deleted and
moved to the recycle bin.
Format
undelete { filename | devicename }
Parameters
Parameter Description Value
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.
NOTE
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
Precautions
● To display information about a temporally deleted file, run the dir /all
command. The file name is displayed in square brackets ([ ]).
● If the name of a file is the same as an existing directory, the file cannot be
restored. If the destination file has the same name as an existing file, the
system prompts you whether to overwrite the existing file. The system prompt
is displayed only when file prompt is set to alert.
Example
# Restore file sample.bak from the recycle bin.
<Huawei> undelete sample.bak
Info: Undelete flash:/sample.bak ?(y/n)[n]:y
Info: Undeleted file flash:/sample.bak.
# Restore a file that has been moved from the root directory to the recycle bin.
<Huawei> undelete flash:
Info: Undelete flash:/test.txt?(y/n)[n]:y
Info: Undeleted file flash:/test.txt.
Info: Undelete flash:/rr.bak?(y/n)[n]:y
Info: Undeleted file flash:/rr.bak.
4.11.75 unzip
Function
The unzip command decompresses a file.
Format
unzip source-filename destination-filename
Parameters
Parameter Description Value
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.
● slave#flash: root directory of the flash memory on the standby SRU. If the
device has no standby SRU, this drive is unavailable.
● Vhdd0: root directory of the built-in hard disk.
NOTE
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
Precautions
● If the destination file path is specified while the file name is not specified, the
designation file name is the same as the source file name.
● The source file persists after being decompressed.
● The compressed file must be a .zip file. If a file to be decompressed is not a
zip file, the system displays an error message during decompression.
● The source file must be a single file. If you attempt to decompress a directory
or multiple files, the decompression cannot succeed.
Example
# Decompress log file syslogfile-2012-02-27-17-47-50.zip that are stored in the
syslogfile directory and save it to the root directory as file log.txt.
<Huawei> pwd
flash:/syslogfile
<Huawei> unzip syslogfile-2012-02-27-17-47-50.zip flash:/log.txt
Info: Extract flash:/syslogfile/syslogfile-2012-02-27-17-47-50.zip to flash:/log.txt?(y/n)[n]:y
100% complete
Info: Decompressed file flash:/syslogfile/syslogfile-2012-02-27-17-47-50.zip flash:/log.txt.
4.11.76 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
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the user command to change the current user on the FTP server.
Precautions
After you run the user command to change the current user, a new FTP
connection is set up, which is the same as that you specify in the ftp command.
Example
# Log in to the FTP server using the user name tom.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User huawei logged in.
[Huawei-ftp] user tom
331 Password required for tom.
Enter password:
230 User logged in.
4.11.77 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.
<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 huawei 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.
4.11.78 zip
Function
The zip command compresses a file.
Format
zip source-filename destination-filename
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
For the storage device type and specifications supported by the device, see "Technical
Specifications" in the Hardware Description.
Only the AR6300 and AR6300K supports dual SRUs.
Only the AR6300-S supports dual SRUs.
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:/
4.11.79 scp
Function
The scp command uploads files to or downloads files from a remote SCP server.
NOTE
Format
# Transfer files between the local client and the remote SCP server based on IPv4.
scp [ -port port-number | { public-net | vpn-instance vpn-instance-name } |
identity-key { rsa | ecc } | user-identity-key { rsa | ecc } | { -a source-address | -i
interface-type interface-number } | -r | -cipher -cipher | -c ] * sourcefile
destinationfile
# Transfer files between the local client and the remote SCP server based on IPv6.
scp ipv6 [ -port port-number | { public-net | vpn-instance vpn-instance-name } |
identity-key { rsa | ecc } | user-identity-key { rsa | ecc } | -a source-address | -r | -
cipher -cipher | -c ] * sourcefile destinationfile [ -oi interface-type interface-
number ]
Parameters
Parameter Description Value
-port port- Specifies the port number The value is an integer in the
number of the SCP server. range from 1 to 65535. The
default port number is 22.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
SCP is an SSH2.0-based secure file transfer protocol. Compared with SFTP, SCP
allows you to upload or download files when a connection is set up.
● For security purposes, you are advised to set the source address to a loopback
address using -a or set the outbound interface to a loopback interface using -
i.
● If -r is specified, you can use the wildcard (*) to upload or download files in
batches by entering *.txt or huawei.* for example.
● If -c is specified, files are compressed before being transmitted. File
compression takes a long time and delays file transfer; therefore, you are
advised not to use the file compression function.
Prerequisites
The SCP server function has been enabled using the scp server enable command.
Precautions
The number of files in the root directory is limited in the file system. Therefore, if there are
more than 50 files in the root directory, creating new files in this directory may fail.
Example
# Log in through ECC authentication and copy the xxxx.txt file to the flash
memory of the remote SCP server at 10.10.0.114.
<Huawei> system-view
[Huawei] scp identity-key ecc flash:/xxxx.txt [email protected]:flash:/xxxx.txt
Trying 10.10.0.114 ...
Press CTRL+K to abort
Connected to 10.10.0.114 ...
The server's public key does not match the one catched before.
The server is not authenticated.
Continue to access it? [Y/N]:y
Update the server's public key now? [Y/N]: y
Enter password:
flash:/xxxx.txt 100% 12Bytes 1KByte(s)/sec
NOTE
Format
scp client-source { -a source-ip-address | -i interface-type interface-number }
undo scp client-source
Parameters
Parameter Description Value
-a source-ip- Specifies the source address used by the SCP The value is
address client to send packets. You are advised to use in dotted
a loopback interface address as the source decimal
address. notation.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source address is not specified, the device selects a source address according
to routing entries to send packets. The source address to be configured must be
the address of a stable interface. This configuration makes it easier to configure
ACL rules and security policies. You simply need to specify the source or
destination address in an ACL rule as the source address, thereby allowing the
device to filter incoming and outgoing packets for security authentication.
Prerequisites
The loopback source interface specified using this command must exist and have
an IP address configured.
Precautions
The scp command can also configure the source address, which has a higher
priority than the source address specified in the scp client-source command. If
you specify the source address in both the scp client-source and scp commands,
the source address specified in the scp command is used. The source address
specified in the scp client-source command applies to all SCP connections,
whereas the source address specified in the scp command applies only to the
current SCP connection.
Example
# Set the source address used by the SCP client to send packets to 10.1.1.1.
<Huawei> system-view
[Huawei] scp client-source -a 10.1.1.1
Function
The scp server enable command enables the SCP service for the SSH server.
The undo scp server enable command disables the SCP service for the SSH server.
NOTE
Format
scp server enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Before using SCP to transfer files to a remote server, enable the SCP service for the
server. The client can establish an SCP connection with the SSH server only after
the SCP service has been enabled for the SSH server.
Prerequisites
● Before running this command, run the ssh server permit interface
{ { interface-type interface-number } &<1-5> | all } command to configure the
interfaces to which the client can connect. Otherwise, the SSH server function
cannot be enabled.
Example
# Enable the SCP service for the server.
<Huawei> system-view
[Huawei] ssh server permit interface all
Warning: Allowing access from all interfaces is insecure.
[Huawei] scp server enable
Function
The display scp-client command displays the configuration of the current SCP
client.
NOTE
Format
display scp-client
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run this command to check the source parameters of the SCP client.
Example
# Display the source address configured for the SFTP client.
<Huawei> display scp-client
The source of SCP ipv4 client: 10.1.1.1
Hardware Requirements
This section is applicable to all models. For details about differences for specific
models, see the description in the corresponding section.
Function
The autosave interval command sets the interval for automatically saving system
configuration data.
Format
autosave interval { value | time | configuration time }
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Run this command to set configuration data at preset intervals. When the interval
is set, the system automatically saves the configuration data without requiring the
command delivered by the network management system. The modified data can
be saved in the storage device in real time and cannot be lost after system restart.
Precautions
● When the automatic save function is enabled, you can also run the save
command to save the system configuration data manually. When the
automatic save function is disabled, the system does not save data
automatically and you need to run the save command to save the configured
data.
● The automatic save function is disabled by default.
● After you run the autosave interval command, the frequent data save
operation affects system performance. Do not set the automatic save interval
to less than 1 hour. The automatic save interval of 24 hours or greater is
recommended.
● The automatic save function specified by the autosave interval command
cannot be enabled together with that specified by the autosave time
command.
Example
# Enable the automatic save function.
<Huawei> autosave interval on
System autosave interval switch: on
Autosave interval: 1440 minutes
Autosave type: configuration file
Format
autosave time { value | time-value }
Parameters
Parameter Description Value
time-value Indicates the automatic save time after the The value
device is enabled to automatically save system ranges from
configuration data. After this parameter is 00:00:00 to
configured, the system automatically saves the 23:59:59.
configuration data at intervals of the The default
automatic save time. value is
00:00:00.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The system can save configuration data at preset intervals or at the preset time.
Run this command to set the automatic save time. When the time is set, the
system automatically saves the configuration data without requiring the
command delivered by the network management system. The modified data can
be saved in the storage device in real time and cannot be lost after system restart.
Precautions
● When the device is enabled to automatically save system configuration data,
the modified configuration is saved at the preset time. When the device is
disabled from automatically saving system configuration data, the system
does not save data automatically and you need to run the save command to
save the configured data.
● The automatic save function specified by the autosave time command
cannot be used with that specified by the autosave interval command.
● If data is frequently read from or written into the storage device, the lifespan
of the storage medium is reduced. You are advised to disable the automatic
save function immediately after the modified data is saved.
Example
# Enable the device to automatically save system configuration data at intervals
of the automatic save time.
<Huawei> autosave time on
System autosave time switch: on
Autosave time: 00:00:00
Autosave type: configuration file
Item Description
Function
The compare configuration compares whether the current configurations are
identical with the next startup configuration file.
Format
compare configuration [ configuration-file [ current-line-number save-line-
number ] ]
Parameters
current-line- Specifies the line number for The value is an integer that
number comparison in the current ranges from 0 to 65535.
configuration.
save-line-number Specifies the line number for The value is an integer that
comparison in the saved ranges from 0 to 65535.
configuration.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If current-line-number and save-line-number are not specified, the configuration
files are compared from the first lines. The two parameters can be specified to skip
the differences that are found and continue the comparison.
When the difference is found using the compare configuration command, the
different content in the current and saved configuration files is displayed. By
default, 120 characters are displayed. If the different content from the start line to
the end line contains less than 120 characters, only these characters are displayed.
Precautions
● The configuration file name extension must be .cfg or .zip.
● If configuration-file is not specified, the system compares whether the current
configurations are identical with the next startup configuration file.
● If configuration-file is specified, the system compares whether the current
configurations are identical with the specified startup configuration file.
Example
# Compare whether the current configurations are identical with the next startup
configuration file.
<Huawei> compare configuration
The current configuration is not the same as the next startup configuration file.
====== configuration line 14 ======
ftp server permit interface all
ftp server enable
#
drop illegal-mac alarm
#
vlan batch 10 to 11
#
dot1x enable
#
set transceiver-monitoring disable
====== Configuration file line 14 ======
drop illegal-mac alarm
#
vlan batch 10 to 11
#
dot1x enable
#
set transceiver-monitoring disable
NOTE
Format
change default-password
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the change default-password command to enable the function of
changing AAA and Boot passwords when factory settings of a device are restored.
Prerequisites
Precautions
Example
# Enable the function of changing AAA and Boot passwords when factory settings
of a device are restored.
<Huawei> system-view
[Huawei] change default-password
Info : The default password of boot has been changed.
Info : The default password of aaa has been changed.
Info : This operation can only be restored by command:undo change default-password.
Info : The default password of boot After the command is executed, the
has been changed. Boot password is changed.
NOTE
If the Boot password of the device is not
set to the password in the prerequisite
before the change default-password
command is executed, the device does not
display this information after you run this
command.
Info : The default password of aaa has After the command is executed, the
been changed. AAA password is changed.
NOTE
If the AAA password of the device is not
set to the password in the prerequisite
before the change default-password
command is executed, the device does not
display this information after you run this
command.
Info : This operation can only be After running the change default-
restored by command:undo change password command, you can only run
default-password. the undo change default-password
command to disable the function of
changing AAA and Boot passwords
when factory settings of a device are
restored.
NOTE
After running the undo change default-
password command, you must restart the
device using either of the following
methods to make the configuration take
effect. If the device enters the Boot mode
after the undo change default-password
command is executed and the device is
restarted for the first time, the Boot
password is still the password in the
prerequisite.
● Run the factory-configuration reset
command to restore the device to
factory settings after the device is
restarted, and then restart the device
again.
● Hold down the RESET button to restart
the device.
Function
The diagnose verify enable command enables the password authentication
function for users who enter the diagnostic view.
By default, password authentication is not required for users who enter the
diagnostic view.
NOTE
Format
diagnose verify enable
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Password authentication is performed for users who enter the diagnostic view to
ensure security. After the diagnose verify enable command is run in the system
view, the system prompts you to enter the current Boot menu password. After the
entered password is successfully verified, the password authentication function is
successfully enabled for users who enter the diagnostic view. If password
authentication is not required for users who enter the diagnostic view, after the
diagnose verify disable command is run in the system view, the system prompts
you to enter the current Boot menu password. After the entered password is
successfully verified, the password authentication function is successfully disabled
for users who enter the diagnostic view.
Example
# Enable the password authentication function for users who enter the diagnostic
view.
<Huawei> system-view
[Huawei] diagnose verify enable
Please enter password:
Info: Set diagnose verify enable successfully.
Format
display autosave configuration
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Run this command when you want to check whether the function for
automatically saving configuration data is enabled, enable or disable the
automatic save function, and modify the automatic save interval or time.
Precautions
● Run the autosave time command to set the time for automatically saving
system configuration data.
● Run the autosave interval command to set the interval for automatically
saving system configuration data.
● Frequent data save operations affect the lifespan of the system storage
device. Do not set the automatic save interval to less than 1 hour. The
automatic save interval of 24 hours or greater is recommended.
Example
# Display the automatic save parameters configured in the system.
Format
display current-configuration [ configuration [ configuration-type
[ configuration-instance ] related ] | controller [ interface-type [ interface-
number ] ] | interface [ 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
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. For the regular
expression rules, see "Filtering Command Outputs" in the NetEngine AR
Configuration Guide - Basic Configuration.
If the configuration is in the offline state, the offline configuration is marked with
* in the display current-configuration all and display current-configuration
inactive command output.
Example
# Display all configurations that include vlan.
<Huawei> display current-configuration | include vlan
vlan batch 10 77 88
port trunk allow-pass vlan 10
Format
display factory-configuration
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
You can run this command to view the factory configuration of the device,
including the HTTP and HTTPS server status, PKI domain name, SSL policy name
and type, authorization scheme, accounting scheme, authentication mode, user
priority, and allowed access type.
You can configure required basic information as the factory configuration and do
not need to configure the basic information after restoring the factory
configuration.
NOTE
Example
# Display the factory configuration of the Router.
<Huawei> display factory-configuration
#
vlan 1
#
dhcp enable
#
http secure-server ssl-policy default_policy
http secure-server enable
http server permit interface GigabitEthernet0/0/0 Wlan-Radio 0/0/0
#
ssl policy default_policy type server
pki-realm default
version tls1.2
ciphersuite rsa_aes_128_sha256 rsa_aes_256_sha256 rsa_aes_128_cbc_sha ecdhe_rsa_aes128_gcm_sha256
ecdhe_rsa_aes256_gcm_sha384
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
local-aaa-user password policy administrator
domain default
domain default_admin
local-user admin password irreversible-cipher $1a$l/ee<QKJ`1$aPb2.&;1m0F.R-CHp_};.,#v)1A_gH=rau~tev,#$
local-user admin privilege level 15
local-user admin service-type terminal http
#
interface Vlanif1
ip address 192.168.1.1 255.255.255.0
dhcp select interface
#
snmp-agent trap enable
#
user-interface con 0
authentication-mode aaa
user privilege level 15
#
user-interface vty 0
authentication-mode aaa
user privilege level 15
#
return
Format
display factory-configuration operate-mode
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
You can run the display factory-configuration operate-mode command to check
the operation performed when the factory configuration is restored.
Example
# Display the operation performed when the factory configuration is restored.
<Huawei> display factory-configuration operate-mode
OperaMode Reserved.
Format
display reset-reason [ slot slot-id ]
Parameters
Parameter Description Value
Views
All views
Default Level
3: Management level
Usage Guidelines
You can run the display reset-reason command to view the reset reasons of cards
for fault location. When no slot ID is specified, the display reset-reason command
output displays reset reasons of all cards.
Precautions
Currently, the reset reasons of all LPUs are stored in the same storage space. The
storage space can store a maximum of 200 reset reasons. When the number of
reset reasons exceeds 200, new reset reasons will overwrite the earliest ones. Each
LPU can display the latest 10 reset reasons.
Example
# Display reset reasons of all cards.
<Huawei> display reset-reason
The LPU frame[0] board[1]'s reset total 10, detailed information:
-- 1. 03/10 10:58:08, Reset No.: 10
Reason: Reset by user command
-- 2. 03/10 10:31:02, Reset No.: 9
Reason: Reset by user command
-- 3. 03/08 15:27:39, Reset No.: 8
Reason: Reset by user command
-- 4. 03/07 15:43:28, Reset No.: 7
Reason: Reset by user command
-- 5. 03/06 17:11:21, Reset No.: 6
Reason: Reset by user command
-- 6. 03/06 12:04:46, Reset No.: 5
Reason: Reset by user command
-- 7. 03/06 11:25:46, Reset No.: 4
Reason: Reset by user command
-- 8. 03/05 18:49:12, Reset No.: 3
Reason: Reset by user command
-- 9. 03/05 11:31:18, Reset No.: 2
Reason: Reset by user command
-- 10. 03/04 22:09:33, Reset No.: 1
Reason: A link fault fails to be rectified.
The LPU frame[0] board[2] has no reset records.
The LPU frame[0] board[3] has no reset records.
The LPU frame[0] board[4] has no reset records.
The LPU frame[0] board[5] has no reset records
The LPU frame[0] board[6] has no reset records.
The LPU frame[0] board[7] has no reset records.
The LPU frame[0] board[8] has no reset records.
The LPU frame[0] board[9] has no reset records.
The LPU frame[0] board[10] has no reset records.
The MPU frame[0] board[13] has no reset records.
The MPU frame[0] board[14]'s reset total 10, detailed information:
-- 1. 03/10 10:58:12, Reset No.: 10
Reason: Reset by user command
-- 2. 03/10 10:31:21, Reset No.: 9
Reason: Reset by user command
-- 3. 03/08 15:28:15, Reset No.: 8
Reason: Reset by user command
-- 4. 03/07 15:43:46, Reset No.: 7
Reason: Reset by user command
-- 5. 03/06 17:11:53, Reset No.: 6
Reason: Reset by user command
-- 6. 03/06 12:05:05, Reset No.: 5
Reason: Reset by user command
-- 7. 03/06 11:25:51, Reset No.: 4
Reason: Reset by user command
-- 8. 03/05 18:49:22, Reset No.: 3
Reason: Reset by user command
-- 9. 03/05 11:31:39, Reset No.: 2
Reason: Reset by user command
-- 10. 02/29 18:33:41, Reset No.: 1
Reason: Reset by user command
Item Description
Table 4-55 lists the common reset reasons displayed in the display reset-reason
command output and troubleshooting methods.
VRP HA Module
reset board,
maybe use slave
restart command
VRP reset
selfboard because
of command
Reset board by
vrp cmd
Reset by autostart
Reset by snmp
mib
Reset by MANO
inject config
Reset by app
Reason: Reset by
pressing the
power button for
a long while
Reset device by ac
Reset by timing
shutdown device
Reset by SMS
config
Reset board by
snmp
Reset board by
vrp schedule
Reset by user
schedule
Reset selfboard by
UMS
Reset by
autoconfig
Reset for FSU card The FSU does not Replace the FSU
type mismatch match the chassis. with a matching
one. If the fault
persists, contact
technical support.
Reset for sfu type The SFU type Replace the SFU
disaccord with does not match with a matching
chassis the chassis. one. If the fault
persists, contact
technical support.
Reset by Configurations
configuration were damaged
damage and rolled back.
Format
display saved-configuration [ last | time ]
Parameters
Parameter Description Value
time Displays the recent time when the configurations are saved -
manually or automatically.
Views
All views
Default Level
3: Management level
Usage Guidelines
If the device has been started and is not working properly, run the display saved-
configuration command to check the device startup configuration in the file
specified by running the startup saved-configuration command.
Run the display saved-configuration last command to check the system
configurations saved last time in the configuration file loaded during the current
startup.
Run the display saved-configuration time command to check the last time when
the system configurations are saved.
The command output is relevant to user configuration. The command does not
display the default configuration.
Example
# Display the configuration file for the next startup.
<Huawei> display saved-configuration
[V300R021]
#
sysname Router
...
#
interface GigabitEthernet0/0/0
ip address 192.168.200.182 255.255.255.0
...
#
user-interface maximum-vty 15
user-interface con 0
user-interface vty 0 14
idle-timeout 0 0
#
return
Format
display schedule reboot
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
After using the schedule reboot command to configure a scheduled restart, you
can use this command to view the configuration of the scheduled restart.
Example
# Display the configuration of the scheduled restart of the device.
<Huawei> display schedule reboot
Info:System will reboot at 22:00:00 2013/09/17 (in 1 hours and 43 minutes).
Item Description
in hours and minutes Time span between the restart time and the current
time.
Function
The display snmp-agent trap feature-name configuration all command displays
all trap messages of the Configuration module.
Format
display snmp-agent trap feature-name configuration all
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
After the alarm function is enabled, the display snmp-agent trap feature-name
configuration all command can be used to display the status of all alarms about
configuration management.
Example
# Display all trap messages of the configuration module.
<Huawei> display snmp-agent trap feature-name configuration all
------------------------------------------------------------------------------
Feature name: CONFIGURATION
Trap number : 1
------------------------------------------------------------------------------
Trap name Default switch status Current switch status
hwCfgManEventlog off on
Item Description
Item Description
Format
display startup
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
Before upgrading or degrading a device, run this command to check whether the
files for next startup have been loaded. If the files have been loaded, the device
can be upgraded or degraded successfully after it is restarted. You can also run the
command to view the system software and files for current startup.
Precautions
Run this command to check whether the backup system software exists. If the
backup system software and current startup system software are in the same
storage device, save backup system software in another storage device to ensure
that the system can still restart when the storage device is damaged.
Example
# Display the names of system software for current and next startup.
<Huawei> display startup
MainBoard:
Startup system software: flash:/basicsoftware.cc
Next startup system software: flash:/basicsoftware.cc
Backup system software for next startup: null
Startup saved-configuration file: flash:/vrpcfg.zip
Next startup saved-configuration file: flash:/vrpcfg.zip
Startup license file: null
Next startup license file: null
Startup patch package: null
Next startup patch package: null
Startup voice-files: null
Next startup voice-files: null
Item Description
Item Description
Next startup license file License file that is configured for the
next startup.
If no license file is configured, null is
displayed.
Next startup patch package Patch package file that is configured for
the next startup by running the startup
patch command.
If no patch package file is configured,
NULL is displayed.
Format
display system { file-md5 | file-sha256 } filename
Parameters
Parameter Description Value
filename Specifies the name of the file whose The value is a string of 1 to
MD5 or SHA256 value needs to be 64 case-sensitive characters
calculated. without spaces.
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
After downloading a file from the server to the device, you can check whether the
file is damaged during the download process, for example, whether the file is
completely downloaded. You can use a piece of third-party software (for example,
HashMyFiles) on the server to calculate the MD5 or SHA256 value of the file, run
the display system command on the device to calculate the MD5 or SHA256
value of the downloaded file, and compare the two values calculated on the
server and device. If the two values are the same, the file is not damaged. If the
two values are different, the file is damaged, and you need to download the file
again.
Precautions
If the size of a file exceeds 200 MB, the device displays the output of the display
system command after a period of time. Wait until the command output is
displayed.
Example
# Display the MD5 value of the file arxx00.cc
<Huawei> system-view
[Huawei] display system file-md5 arxx00.cc
File Name:
arxx00.cc
MD5:
06d12eb350e428605e062a4392455dec
Item Description
Function
The factory-configuration prohibit command disables the function of restoring
the factory settings of a device by holding down reset.
By default, you can hold down reset to restore the factory configuration.
Format
factory-configuration prohibit
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
If you hold down reset on a device for more than 5 seconds, the device restarts
with the factory settings and all user-defined configurations are lost after the
restart. To retain user-defined configurations after you hold down reset, run the
factory-configuration prohibit command to disable this function.
If you want to restore the factory settings of a device by holding down reset, run
the undo factory-configuration prohibit command to enable this function.
Example
# Disable the function of restoring the factory configuration of a device by
holding down reset.
<Huawei> system-view
[Huawei] factory-configuration prohibit
Function
The factory-configuration reset command configures the device to restore
factory settings after restart.
Format
factory-configuration reset
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
If the configuration file is not specified for factory settings, the device uses default
configuration parameters for initialization after the factory-configuration reset
command is executed.
Example
# Configure the device to restore factory settings after restart.
<Huawei> factory-configuration reset
Warning: It will clean the configuration which you have saved. If you have set the factory-configuration by
hand, it will start from the modified factory-configuration, else it will start from the original one, when you
restart the device.
Continue? [y/n]:y
Info: Successfully set factory config!
4.12.19 reboot
Function
The reboot command restarts the device.
Format
reboot [ fast ]
Parameters
Parameter Description Value
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, the system displays a message asking you
whether to save the configuration before restarting
● When the reboot fast command is run, the system restart quickly without
displaying any message and the configuration is lost.
Precautions
● If you do not respond to the displayed message within the timeout period
after running this command, the system will return to the user view and the
device will not be restarted.
● This command interrupts services on the entire device. Therefore, do not use
this command when the device is running properly.
● Before restarting the device, ensure that the configuration file has been saved.
Example
# Restart the device.
<Huawei> reboot
Format
reset saved-configuration
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
● If the configuration file on the device is incompatible with the upgraded
software, run the reset saved-configuration command to clear the
configuration file and run the startup saved-configuration command to
specify a new configuration file.
● If the device in use is applied to another scenario and the original
configuration file of the device does not meet requirements in the scenario,
run the reset saved-configuration command to clear the existing
configuration file and restart the device to restore its factory configurations.
Precautions
● After you run the reset saved-configuration command, the next startup
configuration file is cleared and the file is not used for next startup. If the
current startup configuration file is the same as the next startup configuration
file, the current startup configuration file is also cleared.
● If you do not use the startup saved-configuration command to specify a
new configuration file containing correct configurations or do not save the
configuration file after running the reset saved-configuration command, the
device uses factory configurations for startup. If the device does not have
factory configurations, it uses default configurations for startup.
● If the next startup configuration file is empty, the device displays a message
indicating that the file does not exist.
Example
# Clear the next startup configuration file in the storage device and cancel the
configuration file used for next startup.
<Huawei> reset saved-configuration
This will delete the configuration in the flash memory.
The device configurations will be erased to reconfigure.
Are you sure? (y/n)[n]:y
Clear the configuration in the device successfully.
4.12.21 save
Function
The save command saves the configurations to the default directory.
Format
save [ all ] [ configuration-file ]
Parameters
Parameter Description Value
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run commands to modify the current configuration of the device, but the
modified configuration will be lost after the device restarts. To enable the new
configuration to take effect after a restart, save the current configuration in the
configuration file before restarting the device.
When a series of configurations are complete and take effect, you must save the
current configuration file to the storage device.
Run the save all command to save all the current configurations, including the
configurations of the boards that are not running, to the default directory.
Precautions
● If the configuration file to be saved using this command has the same name
with the existing configuration file, the existing configuration file is rewritten.
● If the current configuration is saved to the default directory, the maximum
length of the relative path of the configuration-file is 64 bytes. If the
configuration file is used as the factory configuration file or the configuration
file for the next startup, the maximum length of the relative path of the
configuration-file is 64 bytes minus the length of the default storage name.
● The configuration file name extension must be .zip or .cfg.
– .cfg: The file is saved in plain text mode. After the file is specified as the
configuration file, all commands in the file are recovered one by one
during startup.
– .zip: The .cfg file is compressed to a .zip file that occupies less space. After
being specified as the configuration file, the .zip file is decompressed to
the .cfg file and all commands in the .cfg file are recovered one by one
during startup.
● Exercise caution when you run the save command if a device is connected to
the Agile Controller. Once the save command conflicts with the configuration
of the Agile Controller, the configuration of the Agile Controller becomes
invalid.
Example
# Save the current configuration file to the default directory.
<Huawei> save
Warning: The current configuration will be written to the device.
Are you sure to continue? (y/n):y
It will take several minutes to save configuration file, please wait........
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
Format
schedule reboot { at time | delay interval }
undo schedule reboot
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When upgrading or restarting the device, you can configure the device to restart
at time when few services are running to minimize the impact on services.
Precautions
● If a specific date is set in the schedule reboot command and the date is a
future date, the device will be restarted at the specified time and there may
be a time difference within 1 minute. If no date is set, two situations may
occur: If the specified time is later than the current time, the device is
restarted at the specified time of the day. If the specified time is earlier than
the current time, the device is restarted at the specified time of the next day.
● When at time or delay interval is used, the time difference between the
specified date and the current date cannot be greater than 720 hours. If the
scheduled restart has been configured, the latest configuration overrides the
previous one.
● The scheduled restart function becomes invalid when you use the clock
datetime command to set the system time to over 10 minutes later than the
restart time set by the schedule reboot command. If the time difference is
equal to or less than ten minutes, the device immediately restarts and does
not save the configuration.
● This command restarts the device at the specified time, interrupting all
services on the 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
# Configure the device to restart at 22:00.
Function
The set factory-configuration command configures the current configuration,
existing configuration file, or default factory settings as the factory configuration.
Format
set factory-configuration from { current-configuration | filename | default }
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If you need to change the factory configuration based on requirements, an
unknown problem occurs on the device, or the device operations are slow or
unstable after the device has been running for a long time, you can run the set
factory-configuration command to specify a new factory configuration.
Follow-up Procedure
After running the set factory-configuration command to specify a new factory
configuration, you can hold down the Reset button at least 5s to restore the
factory configuration.
Precautions
The new configuration file is not greater than 100 KB. If the file is over 100 KB,
the system fails to specify new factory configuration and displays the following
information:
Error: Local file is too large!
NOTICE
Hold down the RESET button for more than 5s to restart the device. The device
will use the new factory configuration after it restarts.
Press the RESET button to restart the device. The configuration is the latest one.
Example
# Override the factory configuration with the current configuration.
<Huawei> set factory-configuration from current-configuration
Warning: The current factory configuration will be replaced, and it's irreversible. Are you sure to set the
factory configuration?[Y/N]:y
Info: Successfully set factory config!
factory configuration?[Y/N]:y
Info: Successfully set factory config!
Format
set factory-configuration operate-mode { reserve-configuration | delete-
configuration | delete-user-configuration }
NOTE
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
When you use the set factory-configuration command to specify factory settings,
run the set factory-configuration operate-mode delete-configuration
command to specify the operation as delete-configuration for restoring factory
settings. This prevents user information leak when the device is lost.
Follow-up Procedure
Example
# Set the mode of restoring the factory configuration to delete.
<Huawei> set factory-configuration operate-mode delete-configuration
Warning: It may delete your configuration file when execuating factory configuration,are you sure to set
the operation mode?(Y/N)y
Successfully set factory operation mode
For details about whether the trap function for the Configuration module is
enabled or disabled by default, see display snmp-agent trap feature-name
configuration all.
Format
snmp-agent trap enable feature-name configuration [ trap-name
hwcfgmaneventlog ]
undo snmp-agent trap enable feature-name configuration [ trap-name
hwcfgmaneventlog ]
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
The Configuration module is not configured with the function of excessive traps.
To enable the trap function of one or more events, you can specify trap-name.
You can run the display snmp-agent trap feature-name configuration all
command to check the configuration result.
Example
# Enables the device to send a trap when the system event is changed.
<Huawei> system-view
[Huawei] snmp-agent trap enable feature-name configuration trap-name hwcfgmaneventlog
Format
startup saved-configuration configuration-file [ slave-board | all ]
NOTE
Only the AR6300 and AR6300K support the slave-board and all parameters.
Only the AR6300-S support the slave-board and all parameters.
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When the original configuration file cannot be used due to the software upgrade,
run the startup saved-configuration command to specify another configuration
file for next startup. The startup configuration file must be saved in the root
directory of the storage device.
Follow-up Procedure
Run the reboot or the schedule reboot command to restart the device.
Precautions
● The configuration file specified for the next startup must exist.
● The configuration file specified for the next startup cannot be too large.
Otherwise, some configurations are likely to be lost after the device is
restarted.
● The configuration file name extension must be .zip or .cfg.
– A configuration file with the file name extension .cfg is a text file, and
you can view the file content in the text file. After the file is specified as
the configuration file for next startup, the system restores all commands
in the file one by one during a startup.
– A .cfg file is compressed to a .zip file that occupies less space. After being
specified as the configuration file, the .zip file is decompressed to the .cfg
file and the system restores all commands in the .cfg file one by one
during startup.
Example
# Specify the system configuration file for the next startup.
<Huawei> startup saved-configuration vrpcfg.cfg
Format
startup system-software system-file [ slave-board | all ] [ verify | signature
sign-filename ]
NOTE
Only the AR6300 and AR6300K support the slave-board and all parameters.
Only the AR6300-S support the slave-board and all parameters.
Parameters
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
During a system software upgrade or downgrade, you can run this command to
specify the system software for the next startup.
Follow-up Procedure
Run the reboot command or the schedule reboot command to restart the device.
Precautions
● The digital signature file of the system software must use .asc as the file
name extension and be saved to the root directory of the storage device.
● If the system software for the next startup of the slave MPU has been
specified using slave-board or the system software for the next startup of all
MPUs has been specified using all, the device automatically copies the system
software from the master MPU to the slave MPU, removing the need to run
the copy source-filename destination-filename command. If the specified
system software exists on the slave MPU, the system displays a message
asking you whether to use the system software of the slave MPU. If the
system software of the slave MPU will not be used, the system displays a
message asking you whether to overwrite the existing system software.
However, the system software specified for the next startup cannot be
overwritten. The device will not automatically copy the system software.
● When you run the startup system-software command to specify the system
software for the next startup of the slave MPU, the device displays a failure
message if the storage space of the slave MPU is insufficient.
● If the device has dual MPUs, specify the system software for next startup on
both the master and slave MPUs.
● The system software package cannot be started using an external hard disk.
● If the storage device of the system software is a USB flash drive, do not
remove the USB flash drive or power off the device during the upgrade.
Otherwise, the USB flash drive may be damaged. You are advised to copy the
system software to the default storage device and configure the system to
start from the default storage device.
● When configuring the system software for next startup, do not remove or
restart the slave MPU.
Example
# Specify the system software for next startup.
<Huawei> startup system-software basicsoft.cc
Format
startup system-software filename backup
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When the specified startup software package is damaged, the system uses the
backup software package to start.
Precautions
● The file name extension of the system software package must be .cc and the
package must be stored in the root directory.
● The backup startup software package can be the same as or different from
the current startup software package, but it must ensure a successful system
start.
Example
# Specify the backup system startup software for the system.
<Huawei> startup system-software basicsoft.cc backup
This operation will take several minutes, please wait........
Info: Succeeded in setting the backup file for booting system
Function
The startup patch command specifies the patch file for next startup.
Format
startup patch patch-name [ slave-board | all ]
NOTE
Only the AR6300 and AR6300K support the slave-board and all parameters.
Only the AR6300-S support the slave-board and all parameters.
Parameters
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 or the schedule 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.
● After the patch file is specified for next startup, run the display patch-
information 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.
● After the device restarts, the system loads and runs the patch. If you do not
want the system to load the patch file after startup, use the patch delete all
command to delete the patch file.
Example
# Specify the patch file for next startup.
<Huawei> startup patch patch.pat
NOTE
Format
bootloader startup menu enable
undo bootloader startup menu enable
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
You can run the bootloader startup menu enable command to display the Boot
menu on the device.
Example
# Display the Boot menu.
<Huawei> system-view
[Huawei] bootloader startup menu enable
Warning: The operation will save all configuration to the next startup configuration.
And the WorkMode Change will be activated after board reboot. Continue? [y/n]:y
It will take several minutes to save configuration file, please wait..........
...
Jun 14 2018 08:43:17+09:00 Huawei %%01LOAD/4/ENT_CONFIG_SET(l)[0]:Succeeded in setting
flash:/vrpcfg.zip for config file by device.
[Huawei]......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
Function
The display bootloader startup menu command displays whether the Boot menu
is hidden.
NOTE
Format
display bootloader startup menu
Parameters
None
Views
All views
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
You can run the display bootloader startup menu command to check whether
the Boot menu is hidden.
Example
# Display whether the Boot menu is hidden.
<Huawei> system-view
[Huawei] display bootloader startup menu
BootLoader Startup Menu Config = Disable
Item Description
Format
display license
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
A license file dynamically controls the availability of some features. Only one
license file is active in the system. Run this command to view detailed information
about the active license in the system, including license file name, version, validity
period, and control item. Based on the information, you can determine whether to
upgrade the system version to support more features.
NOTE
In current version, the encoding format in displaying license information is the same as that
of the license file used by the device. If different terminals are used for login, adjust the
encoding formats of the terminals according to that of the license file to prevent garbled
characters.
Example
# Display information about the active license file of the SRU.
<Huawei> display license
Active License on master board: flash:/LICAR6200_all_202005113KSE50.dat
Product name : AR
Product version : all
License file ESN : 2102115641DMKC000909
License Serial No : LIC202005113KSE50
Creator : Huawei Technologies Co., Ltd.
Created Time : 2020-05-11 17:09:47
Country : China
Custom : No relevant customer information
Office : UNKNOWN
Used value :0
Item state : Normal
Item expired date : 2020-10-11
Item trial days : 60
Description : IPS Upgrade Controller
Active License on master board Name and path of the active license
file on the MPU.
Item Description
Item Description
Item Description
Format
display license accept agreement [ history ]
Parameters
Parameter Description Value
Views
All views
Default Level
3: Management level
Usage Guidelines
After the display license accept agreement history command is executed, either
of the following situations occurs:
● If function licenses are activated, the display license accept agreement
history command output is the same as the display license accept
agreement command output.
● If resource licenses are activated, the message "Maximum control value"
indicating the maximum activation count of a resource item is displayed.
If the control item is in Enable state, the function has been activated. The control
item name corresponding to the same function on different product models may
be different.
Example
# Display information about functions activated through commands.
<Huawei> display license accept agreement history
Active license Accept Agreement: yes
Table 4-62 Description of the display license accept agreement history command
output
Item Description
Item Description
Item used time Time elapsed since the control item has
been used after the control item is
activated.
Function
The display license esn command displays the equipment serial number (ESN)
used for applying a license.
Format
display license esn
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
When you need to use licensed resource items or function items, apply to Huawei
for a license file. When applying for a license, you need to provide the device ESN.
ESN is the only identifier of device components (such as MPU and interface
board), run the display license esn command to display the ESN of the current
device, and then use the ESN to apply a license file for the device.
The ESN of the chassis must be the same as the ESN in the license to be activated.
If they are different, the license file cannot be activated.
Example
# Display the ESN used for applying a license.
<Huawei> display license esn
Master ESN is: 2102113374P0B4000046.
Item Description
Function
The display license resource usage command displays the usage of the resource
items defined in a license file.
Format
display license resource usage
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
You can use the display license resource usage command to check the usage of
the resource items defined in the license file.
Resource usage refers to the percentage of resources used out of resources defined
by the license file.
Example
# Display the usage of licensed resources.
<Huawei> display license resource usage
Activated License: flash:/LIC_ON179007_A1BB9D41960_all.dat
FeatureName | ConfigureItemName | ServiceExpireTime
Table 4-64 Description of the display license resource usage command output
Item Description
Format
display license revoke-ticket
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The display license revoke-ticket command enables you to check the revocation
code of a license file that has become invalid on the device. This code proves that
the current license file is invalid and is used to apply for a new license.
Precautions
This command displays information only when the license file in current device
system is invalid. Otherwise, no command output is displayed.
Example
# Display the revocation code of the current invalid license file.
<Huawei> display license revoke-ticket
Info: The revoke ticket is: LIC20091103006100:27C1B773ED11D9F877855CDAEE74ABFE60E07126.
Format
display license state
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To check the status of the running license, run this command. The command
displays the current status of the license and the number of days before the
license in this status will expire.
The system supports the following license states:
This command helps you locate license problems and verify the license status on
the device.
Prerequisites
A license file has been stored on the SRU of the device and has been activated.
This ensures that valid entries are displayed after the execution of the command.
If the license file is not activated, no command output is displayed.
Example
# Display the status of the license on the SRU.
<Huawei> display license state
Info: Master board license state: Trial. The remain days is 44.
Function
The display paf command displays information about the product adaptive file
(PAF) in the system.
Format
display paf { all | { resource | service } item-name }
Parameters
Parameter Description Value
Views
All views
Default Level
1: Monitoring 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.
<Huawei> display paf resource PAF_LCS_NQA_SPECS_NUM_ENTRY
PAF_LCS_NQA_SPECS_NUM_ENTRY = 0, 128, 128, 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
Item Description
Item Description
Item Description
1 Service status.
● 1: enabled
● 0: disabled
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, including its version, name.
Example
# Display information about the patch in the current system.
<Huawei> display patch-information
Patch version :ARV300R009C10
Patch package name :flash:/patch_arxx0.pat
The state of the patch state file is:Running
The current state is:Running
******************************************************************
* The patch information,as follows *
******************************************************************
Type State Count Time(YYYY-MM-DD HH:MM:SS)
------------------------------------------------------------------
exe Running 1 2017-12-31 09:23:46+00:00
Item Description
The state of the patch state file is Status of the patch file.
Function
The display rollback state command displays the rollback status of the system.
Format
display rollback state
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
This command enables you to:
● Check whether the rollback function is enabled.
● Preview the files used after a version rollback to avoid an unexpected
rollback.
● The rollback status can be displayed only if the rollback command can be
used. Therefore, the display rollback state command can display the rollback
status only when the following conditions are met: the system software for
rollback exists, the current software package is different from the previous
system software package, and no new package is specified for next startup
using the startup system-software command.
● If no rollback system software exists, a message "Rollback function is disabled
in current state" will be displayed when you run the display rollback state
command.
Example
# Preview the files used after a version rollback. The names and paths of various
startup files used in the rollback version are displayed if the rollback function is
enabled in the system.
<Huawei> display rollback state
Info: Rollback function is enabled in current state
The booting parameters for rollback are as follows:
Rollback system software: flash:/software.cc
Rollback saved-configuration file: flash:/iascf_autobackup.zip
Rollback license file: null
Rollback patch package: null
Rollback voice-files: null
Format
license active file-name
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Change or upgrade the license file when the current license file is outdated or
needs higher specifications and more features. The initial state of a license file is
inactive and the license file does not take effect in the system. Run this command
to activate the new or updated license file.
The license active command can be used to activate a license file in the following
situations:
● The license needs to be activated for the first time.
You can directly run this command to activate a license.
● The current license file needs to be updated.
If the specifications of the new license file are lower than those of the current
license file, the system displays a message asking you whether to continue. If
you choose No, the system retains the current license file. If you choose Yes,
the master MPU activates the current license file and the system uses the new
license file.
Prerequisites
The new license file has been uploaded to the device.
Follow-up Procedure
When the system restarts, the system activates the license file that was activated
last time to ensure the license files are the same before and after restart.
Precautions
● The license file must use .dat as file name extension and be saved to the
default root directory in the storage of the device.
● If no path is specified, the license file in the working path is activated by
default.
● If the specifications of the new license file are lower than those of the current
license file (some functions are authorized in the current license file, but not
in the new license file, or the new license file allows fewer resources than the
current one), the system displays a message asking you whether to continue.
● When applying for a license, ensure that the ESN is case sensitive. If the case
of the device ESN is different from that of the ESN in the license file, the
license file cannot be activated.
Example
# Activate license.dat in the storage of the device.
<Huawei> license active license.dat
Function
The license active accept agreement command activates the ETU license.
The undo license active accept agreement command deactivates the ETU
license.
Format
license active accept agreement
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
After the license active accept agreement command is executed, the system asks
you whether to sign the agreement:
● If you enter yes, the agreement is signed and this event is logged.
● If you enter no, the ETU license is deactivated.
Example
# Activate the ETU license.
<Huawei> license active accept agreement
Dear Customer,
You will active the interim ETU (Easy to Use) license for featured functions of the AR, please read the
followings carefully.
After the activation of the interim ETU license for featured functions of the AR, you can conduct evaluation
of the featured functio
ns for a period of sixty (60) days.After the sixty (60) days evaluation period, the interim license will
automatically convert to th
e perpetual license. Continuing use of the featured functions of the product after the evaluation period
requires the perpetual lice
nse, together with the additional payment. Otherwise please close the ETU license for featured functions,
and stop using the feature
d functions.
Without purchasing the perpetual license from Huawei, the continuing use of the product will constitute
the inappropriate use beyond
the interim license and infringement of rights of Huawei. The activation of the software command line
interface will be evidence of
your acceptance of the perpetual license. Huawei will reserve all necessary rights to prosecute and to seek
all remedies at law and
in equity.
Format
license emergency
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When you run the license emergency command to enable the emergency state
for the license, the system is free from license control. In this case, the system can
run with the maximum configuration of dynamic resources and the license-
defined configuration of static resources and functions. When the validity period
of the emergency state expires, dynamic resources are controlled by the license
again. One version is provided with three validity periods of emergency state, each
lasting for seven days.
The purpose for enabling the emergency state for the GTL license is disaster
tolerance. If an earthquake takes place, for example, this mechanism protects
users' services from being affected.
Precautions
Example
# Enable the license emergency state.
<Huawei> license emergency
Warning: This operation will cause LCS into the EMERGENCY state. Continue? [Y/N]:y
Info: Emergency started cannot be stopped.
Format
license function name
undo license function name
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The license function command activates the license of a function item through
the ETU license.
Prerequisites
The ETU license has been activated using the license active accept agreement
command.
Precautions
Example
# Activate the data service.
<Huawei> license function datae
INFO: Succeeded in activating the feature.
Format
license resource name value
undo license resource name
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Prerequisites
The ETU license has been activated using the license active accept agreement
command.
Precautions
Example
# Activate the license of a resource item.
<Huawei> license resource cm 10
INFO: Succeeded in activating the feature.
<Huawei> license resource ips 1
INFO: Succeeded in activating the feature.
Function
The license revoke command revokes a license file.
Format
license revoke
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
License is an authorization file. You can apply for, upgrade, or activate the license
file to get corresponding user rights.
If new devices are deployed, you can purchase new licenses as needed to enable
license-controlled features and functions on the devices. This reduces purchase
costs. If the capacities of the existing devices need to be expanded, you can
update the licenses used on the devices to enable more license-controlled features
and functions.
You can upgrade a license file to:
● Add new features.
● Optimizes device performance.
● Fix bugs in the current version.
Before updating a license file, run the license revoke command to revoke the
existing license. The system then returns a license revocation code. This code is the
evidence for license invalidation and is used to apply for a new license.
NOTE
A license revocation code is a character string generated after a license file becomes invalid.
You can determine that a license file is invalid based on the corresponding revocation code.
Precautions
● When the existing license is going to expire, apply for a new license, upgrade,
and activate the license. If the license has expired, the service modules are
disabled and services are interrupted.
● After you run the license revoke command, the license file enters the Trial
state and cannot be activated again regardless of how long the license file
will expire.
Example
# Revoke the current license file.
<Huawei> license revoke
Format
patch delete all
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
● If you find errors in patches that have been loaded to the system, run this
command to delete the patches to prevent patch errors from affecting system
operating.
● Before loading a non-incremental patch, run this command to delete the
existing patches (if any). Otherwise, the non-incremental patch cannot be
loaded.
Example
# Delete all patches.
<Huawei> patch delete all
Format
patch load filename all run
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When you load a patch to the current system, the system searches the patch
package for a matching patch file according to the attributes of the patch file.
● If a matching patch file is found in the patch package, the system loads the
patch.
● If no matching patch file is found in the patch package, the system does not
load any patch.
Prerequisites
The patch package has been uploaded to the root directory of the storage device.
Before loading a patch, the system must resolve the patch package, check the
validity of the patch files in the patch package, and obtain the attributes such as
the patch type and version of the patch file.
Precautions
The patch file cannot be reloaded. When you reload a patch, the system displays
an error message.
Example
# Load the patches to the patch area of the device and run the patches directly.
<Huawei> patch load patch.pat all run
4.13.19 rollback
Function
The rollback command rolls back the system to the previous version.
Format
rollback
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If an error occurs during an upgrade, cancel the current upgrade and run the
rollback command to roll back the system to the previous version. After the
rollback, the configuration of the device is the same as the previous configuration
before upgrading.
You can delete the rollback software using the delete (user view) command.
After the rollback software is deleted, a message will be displayed saying that the
rollback function is unavailable if you run the rollback and display rollback state
commands.
Prerequisites
The device has the rollback software. The current software package is different
from the previous software package, and no new package is configured for next
startup using the startup system-software system-file command.
Example
# Roll back the system to the previous version. After you run the command, a
message will be displayed ask you whether to continue. If you choose y, the
system rolls back to its previous version. If you choose n, no operation will be
performed.
<Huawei> rollback
Warning: One or multiple of the following files do not exist: configuration file
flash:/aaa.cfg
Check whether you have deleted the file(s). Are you sure you want to continue? (
y/n):y
After rollback, active board will reboot automatically. Please check if data has
been saved
Are you sure to rollback? (y/n)[n]:y
Format
upgrade slot slot-id startup bootrom
Parameters
Parameter Description Value
Views
User view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
Boards do not support automatic loading of the corresponding BootROM.
Generally, the BootROM does not need to be upgraded. However, if an exception
occurs due to a fault in the BootROM, you need to run this command to manually
upgrade the BootROM.
If the main control board cannot automatically upgrade the BootROM during a
system software upgrade, you need to run this command to manually upgrade the
BootROM.
Precautions
The 9ES2, 4ES2G-S, 1GEC, 4GECS, 2X10GL, 3G-HSPA+7, 1LTE-L, 1LTE-Lo, 1LTE-Lc,
1STM1, 4STM1, 16FXS, 32FXS, 1GBIS4W, 1NDE, and DGP cards do not support this
command.
NOTICE
Ensure normal power supply to the device when you are manually upgrading the
BootROM. The component whose BootROM is upgraded may be permanently
damaged once the device is powered off during manual upgrade of the BootROM.
Example
# Upgrade the BootROM in slot 1 using the current system software package.
<Huawei> upgrade slot 1 startup bootrom
Info:You can not reset, remove, or power off the board when upgrade is being per
formed.
Info: Prepare to upgrade slot <1>, item <BootRom>, mode:online. waiting......
Info: Online upgrade slot <1>, item <BootRom>, ok.
Info: Please reset to take effect.
Format
display smart-upgrade information
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
After smart upgrade is enabled, you can run the display smart-upgrade
information command to check details about smart upgrade. When smart
upgrade is enabled on the device, the device is not in the progress of requesting
for the latest version information from the HOUP, and this command is run on the
device, then the device proactively requests for the latest version information.
Prerequisites
Smart upgrade has been enabled using the smart-upgrade enable command.
Precautions
After this command is run, the device is triggered to exchange information with
the HOUP. If this command is run frequently to query upgrade information, smart
upgrade will be affected.
Example
# Display details about smart upgrade.
<Huawei> system-view
[Huawei] smart-upgrade enable
Info: Operation succeeded.
[Huawei] quit
<Huawei> display smart-upgrade information
Info:Loading the information.Please wait for a few minutes.
Scheduled upgrade: Enable
Next upgrade time: 2019-07-17 23:00:00
Item Description
Item Description
Last startup voice package Voice package for the last startup.
Function
The smart-upgrade enable command enables smart upgrade.
Format
smart-upgrade enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
To facilitate software upgrade management and reduce manual maintenance
costs of the device, you can run the smart-upgrade enable command to enable
smart upgrade. Smart upgrade achieves automatic new version detection, system
file download, and device upgrade by connecting devices to the HOUP through
the Internet.
Example
# Enable smart upgrade.
<Huawei> system-view
[Huawei] smart-upgrade enable
Function
The smart-upgrade information command sets the contact phone number and
email address for smart upgrade.
The undo smart-upgrade information command cancels the contact number and
email address configured for smart upgrade.
Format
smart-upgrade information telephone telephonenum email emailaddress
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
You can run the smart-upgrade information command to configure the contact
number and email address for smart upgrade. If a smart upgrade-enabled device
fails to be upgraded, the device can notify the user of the upgrade result based on
the configured contact number and email address.
NOTE
The contact number and email address are used only for emergency contact upon an
upgrade failure.
Prerequisites
Smart upgrade has been enabled using the smart-upgrade enable command.
Example
# Configure the contact number and email address for smart upgrade.
<Huawei> system-view
[Huawei] smart-upgrade enable
Info: Operation succeeded.
[Huawei] smart-upgrade information telephone 111111111 email [email protected]
Privacy Policy
Your privacy is important to us.
When enabling the automatic upgrade function for Huawei devices, you may, at your discretion, provide
your personal information such as the telephone number,
mobile number, and email address on the Command Line Interface (CLI).
This information will be used to notify you immediately of the upgrade result after the automatic upgrade
function is enabled.
By agreeing to these terms and conditions, you are authorizing Huawei to collect and process the
aforementioned personal information provided by you for the stated purpose.
Your information may be transferred to a third party of Huawei or affiliated company of Huawei for the
purpose of providing the aforementioned service for you.
The information you provide will be stored on the servers of Huawei and its affiliates.
The information may be transmitted outside your country or region and accessed, stored, and processed in
another country or region, including China.
Huawei is committed to protecting your personal information and preventing the information from being
used without authorization.
For more details, please refer to the full privacy policy at https://www.huawei.com/en/privacy-policy.
Do you agree to these terms and conditions? (Y/N)[N]:y
Info: Operation succeeded.
Format
smart-upgrade right-now
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
When a device figures out that there is a new version available for upgrade on the
HOUP, that is, the Check for new version field displays Upgrade required in the
display smart-upgrade information command output, you can run the smart-
upgrade right-now command to perform smart upgrade on the device
immediately. The device then obtains the new version file from the HOUP and
starts an upgrade.
Prerequisites
Smart upgrade has been enabled using the smart-upgrade enable command.
Precautions
● After this command is run, the device automatically obtains the version file
from the HOUP and starts an upgrade immediately. During the upgrade,
original upgrade configurations will be deleted, and the current upgrade
configurations are used. In addition, when the device restarts, it automatically
saves and backs up configurations to the file named vrpcfg_auto_backup.zip
or vrpcfg_auto_backup.cfg. However, to avoid unexpected configuration loss,
you are advised to save the current configuration and export the
configuration file in advance.
● After the device obtains the version file, the system prompts the user whether
to restart the device. By default, if the user does not perform any operation
within 30 seconds, the device is automatically restarted.
Example
# Perform smart upgrade immediately.
<Huawei> system-view
[Huawei] smart-upgrade enable
Info: Operation succeeded.
[Huawei] smart-upgrade right-now
Info: Connecting to the smart upgrade platform...Please wait for a few minutes.
Info: Starting to download file AR6000-V300R021C10SPC100.cc
100%
Info: Downloading file AR6000-V300R021C10SPC100.cc succeeded.
smart-upgrade: 155944876 byte(s) received in 433 second(s) 355.71Kbyte(s)/sec.
Info: Starting to download file AR6000-V300R021C10SPC100.cc.asc
Info: Verifying the system software package using the signature file ....................
........
Info: Verification succeeded.
Info: The device needs to be reboot to proceed with the upgrade. Continue? (Y will be selected by default
30 seconds later)(Y/N)[Y]:Y
Format
smart-upgrade time HH:MM:SS { weekly | monthly | yearly }
undo smart-upgrade time
Parameters
Parameter Description Value
Views
System view
Default Level
2: Configuration level
Usage Guidelines
When a device figures out that there is a new version available for upgrade on the
HOUP, that is, the Check for new version field displays Upgrade required in the
display smart-upgrade information command output, you can run the smart-
upgrade time command to configure a scheduled smart upgrade policy. After the
configuration is completed, once the specified time arrives, the device is triggered
to obtain the new version file from the HOUP and starts an upgrade.
Prerequisites
Smart upgrade has been enabled using the smart-upgrade enable command.
Precautions
● The HH:MM:SS parameter must be in 24-hour format. If you do not specify
MM:SS, their values are 0. You must enter at least one digit to specify HH. For
example, when you enter 0, the time is 00:00:00.
● After this operation is performed, once the specified time arrives, the device is
triggered to obtain the new version file and starts an upgrade. During the
upgrade, original upgrade configurations will be deleted, and the current
upgrade configurations are used. In addition, when the device restarts, it
automatically saves and backs up configurations to the file named
vrpcfg_auto_backup.zip or vrpcfg_auto_backup.cfg. However, to avoid
unexpected configuration loss, you are advised to save the current
configuration and export the configuration file in advance.
● When an upgrade policy is configured, the time for triggering smart upgrade
depends on the device time. If the configuration is completed, and the device
time is changed and is later than the next automatic upgrade time, smart
upgrade is triggered immediately on the device. During the upgrade, the
device may be automatically restarted multiple times. Exercise caution when
deciding to change the device time. In addition, remember to save the device
configuration in a timely manner.
Example
# Configure the device to be upgraded at an interval of seven days after an
upgrade is triggered at 23:00:00.
<Huawei> system-view
[Huawei] smart-upgrade enable
Info: Operation succeeded.
[Huawei] smart-upgrade time 23:00:00 weekly
Info: Operation succeeded.
Format
smart-upgrade url host
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the device resides on the intranet and cannot directly connect to the HOUP at
houp.huawei.com, you can run this command to configure the URL of the proxy
server so that the device can connect to the HOUP through the proxy server.
If the device resides on the intranet and cannot directly connect to the HOUP at
houp.huawei.cn, you can run this command to configure the URL of the proxy
server so that the device can connect to the HOUP through the proxy server.
Prerequisites
Smart upgrade has been enabled using the smart-upgrade enable command.
Example
# Configure the proxy server URL.