01-03 Basic Configurations Commands
01-03 Basic Configurations Commands
01-03 Basic Configurations Commands
Function
The assistant task command creates an assistant task.
Format
assistant task task-name
undo assistant task task-name
Parameters
Parameter Description Value
task-name The value is a string of 1 to 15 characters. It
Specifies the name of
can consist of underscores (_), letters, and
an assistant task.
digits only, and must start with a letter.
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.
Example
# Create an assistant task.
<Huawei> system-view
[Huawei] assistant task test
Related Topics
3.1.5 display assistant task history
3.1.12 if-match timer cron
3.1.13 perform batch-file
3.1.2 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.
Format
command-privilege level level view view-name command-key
Parameters
Parameter Description Value
level level Specifies the command level. The value is an
integer that
ranges from 0 to
15.
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 3-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 user save
Related Topics
3.8.24 user privilege
3.1.4 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
task-name The value is a string of 1 to 15 characters
Specifies the name of an
consisting only of underscores (_), letters,
existing assistant task.
and digits, and must start with a letter.
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: sd1:/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: sd1:/reboottest.bat
Start time : 2012-07-16 09:25:00
End time : 2012-07-16 09:25:00
State : Finished
--------------------------------------------------------------------------------
Table 3-2 Description of the display assistant task history command output
Item Description
Item Description
Related Topics
3.1.1 assistant task
3.1.12 if-match timer cron
3.1.13 perform batch-file
Format
display command-view command-key
Parameters
Parameter Description Value
command- Specifies the command word of the The value is a string of
key command to be queried. Currently, the 1 to 200 case-insensitive
command word cannot be characters that can
automatically displayed through the include spaces.
question mark help function, and needs
to be entered manually.
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
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
----------------
Related Topics
3.1.3 command-privilege level
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.
● 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.
● To view the previous historical command, press the Up arrow key or Ctrl+P.
If there is an earlier historical command, the earlier historical command is
displayed.
● To view the next historical command, press the Down arrow key or Ctrl+N.
If there is a new historical command, the new historical command is
displayed.
Example
# Display the historical commands that have been executed on the current
terminal.
<Huawei> display history-command
quit
user privilege level 15
user-interface vty 0 4
system-view
Related Topics
3.8.14 history-command max-size
Function
The display hotkey command displays the status of the defined, undefined, and
system hotkeys.
Format
display hotkey
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
After you understand the defined, undefined, and system hotkeys in the system,
you can use hotkeys to quickly enter commands. To redefine hotkeys for a
command, run the hotkey command.
The system allows hotkeys in places where commands can be entered, and
displays the commands corresponding to hotkeys. You can run the display hotkey
command to view the commands corresponding to hotkeys.
Example
# Display defined, undefined, and system hotkeys.
<Huawei> display hotkey
----------------- HOTKEY -----------------
=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L undo idle-timeout
CTRL_O undo debugging all
=Undefined hotkeys=
Hotkeys Command
CTRL_U NULL
=System hotkeys=
Hotkeys Function
CTRL_A Move the cursor to the beginning of the first line
CTRL_B Move the cursor one character left
CTRL_C Stop current command function
CTRL_D Erase current character
CTRL_E Move the cursor to the end of the Last line
CTRL_F Move the cursor one character right
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
Item Description
Related Topics
3.1.11 hotkey
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
3.1.10 header
Function
The header command configures the header information displayed on a terminal
when users log in to a connected device.
The undo header command deletes the header information displayed on a
terminal when users log in to a connected device.
By default, no header information is displayed on terminals when users log in to a
connected device.
Format
header { login | shell } { information text | file file-name }
undo header { login | shell }
Parameters
Parameter Description Value
login Indicates header -
information displayed on
a terminal when a user
logs in to the device and a
connection between the
terminal and the device is
activated.
shell Indicates the header -
displayed on a terminal
when the session is set up
after the user logs in to
the connected device.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To provide some prompts or alarms to users, you can use the header command to
configure a title on the device. If a user logs in to the device, the title is displayed.
Procedure
If information is specified, the header text starts and ends with the same
character. You can set the header text in either of the following modes:
● Non-interactive: enter the header text behind the start character.
Use the same character at the beginning and end of the header and press
Enter. If the start and end characters are inconsistent, the system prompts an
error message.
● Interactive: enter the start character and press Enter.
The system displays a message prompting the correct header information.
Then enter the required information and enter the same character at the
beginning and end of the header, and press Enter. The system quits the
interactive process.
During interaction, you can press Enter at any time to enter information in
the next line.
Precautions
● Before setting the login parameter, you must set login authentication
parameters; otherwise, no header information about authentication is
displayed.
● Before setting the file parameter, ensure that the file containing the header
exists; otherwise, the file name cannot be obtained.
● If the file parameter is set, save the file containing the header in the root
directory of the default storage media. To save the file to another directory,
you must use a full path.
● If you use SSH1.X to log in to the device, the shell header rather than the
login header is displayed.
● If you use SSH2.0 to log in to the device, both login and shell headers are
displayed in the login process.
● If the header command is configured several times, only the latest
configuration takes effect.
● After the login title is configured, any user that logs in to the system can view
the title.
● The start and end characters in the header text can be double quotation
marks (""). However, the header text content cannot contain double
quotation marks ("").
Example
# Configure a shell header. (non-interactive process)
<Huawei> system-view
[Huawei] header shell information &Hello! Welcome to system!& # Enter the header text behind the
start character '&' and enter '&' at the end of the header text, and press Enter.
# Press Enter. The shell header is displayed when the user logs in again.
Hello!
Welcome to system!
<Huawei>
3.1.11 hotkey
Function
The hotkey command sets a shortcut key for a command.
The undo hotkey restores the system shortcut keys to the default values.
By default, the system sets the default values for three shortcut keys CTRL+G,
CTRL+L, and CTRL+O, while does not set default value for CTRL+U.
Format
hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_U } command-text
undo hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_U }
Parameters
Parameter Description Value
CTRL_G Specifies the shortcut key Ctrl+G for a -
command.
CTRL_L Specifies the shortcut key Ctrl+L for a -
command.
CTRL_O Specifies the shortcut key Ctrl+O for a -
command.
CTRL_U Specifies the shortcut key Ctrl+U for a -
command.
command-text Specifies the associated command line for The value is a string
shortcut keys. of 1 to 240
characters.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
You can set a shortcut key for a command that is often used; you can also change
the default value of the shortcut key that is defined by the system according to
your requirements.
Precautions
Four shortcut keys are customized by users: CTRL+G, CTRL+L, CTRL+O, and CTRL
+U.
● By default, the shortcut key CTRL+G corresponds to the display current-
configuration command which displays current configuration.
● By default, the shortcut key CTRL+L corresponds to the undo idle-timeout
command which restores the default timeout period.
● By default, the shortcut key CTRL+O corresponds to the undo debugging all
command which stops the output of all debugging information.
After you use the hotkey command to set a shortcut key for a command, you can
run the command by pressing the shortcut key or entering a command.
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] commit
[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
Related Topics
3.1.8 display hotkey
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
seconds Sets second. The value is a string of characters in the cron format.
A cron time string consists of digits (0 to 9) and
special characters asterisk (*), hyphen (-), slash (/),
and comma (,). The value ranges from 1 to 127.
Currently, the device supports asterisk (*) only,
indicating that the value is accurate to minute but
not second.
minutes Sets minute. The value is a string of characters in the cron format.
A cron time string consists of digits (0 to 9) and
special characters asterisk (*), hyphen (-), slash (/),
and comma (,). The value ranges from 1 to 127.
hours Sets hour The value is a string of characters in the cron format.
A cron time string consists of digits (0 to 9) and
special characters asterisk (*), hyphen (-), slash (/),
and comma (,). The value ranges from 1 to 127.
days-of- Sets date. The value is a string of characters in the cron format.
month A cron time string consists of digits (0 to 9) and
special characters asterisk (*), hyphen (-), slash (/),
and comma (,). The value ranges from 1 to 127. This
parameter is exclusive with the days-of-week
parameter. At least one of the two contains asterisk
(*).
months Sets month. The value is a string of characters in the cron format.
A cron time string consists of digits (0 to 9) and
special characters asterisk (*), hyphen (-), slash (/),
and comma (,). The value ranges from 1 to 127.
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:
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
Related Topics
3.1.1 assistant task
3.1.5 display assistant task history
3.1.13 perform batch-file
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
Related Topics
3.1.1 assistant task
3.1.5 display assistant task history
3.1.12 if-match timer cron
3.1.14 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
Related Topics
3.1.17 system-view
3.1.15 return
3.1.15 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>
Related Topics
3.1.17 system-view
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
3.1.17 system-view
Function
The system-view command enables you to enter the system view from the user
view.
Format
system-view
Parameters
None
Views
User view
Default Level
2: Configuration level
Usage Guidelines
You must configure the device in the system view. Run this command in the user
view to enter the system view.
Example
# Enter the system view.
<Huawei> system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]
Related Topics
3.1.14 quit
3.1.15 return
● AR100 series, AR120 series (except AR129 and AR129GW-L), AR150 series (except
AR156, AR156W, AR157, AR157G-HSPA+7, AR157VW, AR157W, AR158E, and
AR158EVW), AR160 series (except AR161FW-P-M5), AR201, AR1200 series, AR2200
series, and AR3200 series support Auto-Config function.
● The management interfaces of the AR1200, AR2200, AR3200, and AR3600 series do not
support the Auto-Config function.
Format
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 3.2.5 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
command to disable the Auto-Config function. After Auto-Config stops, run
the autoconfig enable command to enable Auto-Config again. You can use
the 3.2.6 display autoconfig-status command to check whether Auto-Config
is enabled.
Example
# Enable Auto-Config.
<Huawei> system-view
[Huawei] autoconfig enable
Info: Enable autoconfig successfully.
Related Topics
3.2.2 autoconfig getting-file restart
3.2.3 display autoconfig activating-config delay
3.2.4 display autoconfig activating-config remanent-time
3.2.5 display autoconfig enable
3.2.6 display autoconfig-status
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 3.2.6 display autoconfig-status command displays
whether the Auto-Config process is suspended.
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
Related Topics
3.2.1 autoconfig enable
3.2.5 display autoconfig enable
3.2.6 display autoconfig-status
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.
Related Topics
3.2.4 display autoconfig activating-config remanent-time
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.
Related Topics
3.2.3 display autoconfig activating-config delay
Function
The display autoconfig enable command displays whether Auto-Config is
enabled.
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.
<Huawei> display autoconfig enable
Autoconfig is enabled.
Related Topics
3.2.1 autoconfig enable
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 : --
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
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
Related Topics
3.2.1 autoconfig enable
3.2.2 autoconfig getting-file restart
3.2.4 display autoconfig activating-config remanent-time
3.3.1 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 :***
Related Topics
3.3.1 autostart
3.3.7 servertype
3.3.6 ipaddress
3.3.8 username
Function
The display autostart status command displays the running status of Auto-Start.
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.
Related Topics
3.3.2 autostart enable
3.3.3 autostart run
3.3.6 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.
Related Topics
3.3.1 autostart
3.3.7 servertype
3.3.8 username
3.3.4 display autostart config
3.3.7 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 is an FTP server.
Format
servertype { FTP | SFTP }
undo servertype
Parameters
Parameter Description Value
FTP Sets the type of the file server to FTP. -
SFTP Sets the type of the file server to SFTP. -
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.
Related Topics
3.3.1 autostart
3.3.6 ipaddress
3.3.8 username
3.3.4 display autostart config
3.3.8 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.
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.
Related Topics
3.3.1 autostart
3.3.7 servertype
3.3.6 ipaddress
3.3.4 display autostart config
Function
The autoupdate enable command enables the USB-based deployment function.
Format
autoupdate enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Use Scenario
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 password
Parameters
None
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.
Example
# Delete the authentication password for USB-based deployment.
<Huawei> system-view
[Huawei] clear usb autoupdate password
Related Topics
3.4.7 set usb autoupdate password
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
Function
The display usb autoupdate state command displays the USB-based deployment
status.
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 3-9 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.
Item Description
Related Topics
3.4.7 set usb autoupdate password
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 by the 3.4.7 set usb autoupdate password command as the
key to calculate an HMAC based on the HMAC-SHA256 algorithm for a specific
file. 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
password command.
Precautions
If HMAC check is enabled for USB-based deployment, the clear usb autoupdate
password command disables the HMAC function while deleting the
authentication password for USB-based deployment.
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.
Format
set usb autoupdate password password
Parameters
Parameter Description Value
password Sets the The value is a string of 8 to 64 characters in
authentication plain text without spaces, or a string of 8 to
password used in 108 characters in cipher text without spaces.
USB-based The string must contain at least two types of
deployment. the following: uppercase letters, lowercase
letters, digits, and special characters.
Views
System view
Default Level
3: Management level
Usage Guidelines
The authentication password configured by this command is used in the following
scenarios:
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 this password to decrypt the configuration file.
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
Related Topics
3.4.5 display usb autoupdate state
Format
usb autoupdate generate encrypted boot-password
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
In a scenario where USB-based deployment is performed and Boot passwords are
set in a batch using configuration files, no password in plain text is allowed in the
configuration files. Therefore, you can run the usb autoupdate generate
encrypted boot-password command to generate an encrypted Boot password.
Precautions
You can run the usb autoupdate generate encrypted boot-password command
on a device and then enter a password in plain text as prompted. The password is
a string of 6 to 19 characters and must contain at least two types of the following:
uppercase letters, lowercase letters, digits, and special characters.
Example
# Enter a Boot password in plain text and then a password in cipher text is
generated.
<Huawei> system-view
[Huawei] usb autoupdate generate encrypted boot-password
Enter Password(<6-19>):
Confirm password:
Info:The encrypted boot password is:
%^%#NUWg5b|rB(.Z7'T5Yee:|3Z[Pl|32>)D,g8T8j5P%^%#
The undo sms config autodeploy enable command disables the SMS-based
deployment function.
By default, SMS-based deployment is enabled.
Format
sms config autodeploy enable
undo 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.
Related Topics
3.5.2 sms config caller
Format
sms config caller tel-number
Parameters
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.
Related Topics
3.5.1 sms config autodeploy enable
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 3-10 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 3-11 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, GE
sub-interface view
Default Level
2: Configuration level
Usage Guidelines
Use Scenario
When the fast provisioning function is enabled on an interface using the 3.6.5
fast-provisioning enable (interface view) 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
3.6.5 fast-provisioning enable (interface view) 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, GE 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 3.6.3 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, Ethernet sub-
interface view, serial sub-interface view, GE interface view, GE 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
HH:MM:SS Specifies the current HH specifies the hour, which is an integer
time on the router. ranging from 0 to 23. MM specifies the
minute, which is an integer ranging from 0
to 59. SS specifies the second, which is an
integer ranging from 0 to 59.
YYYY-MM- Specifies the current YYYY specifies the year, which is an integer
DD date (year, month, ranging from 2000 to 2037. MM specifies
and day) on the the month, which is an integer ranging
router. 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 router.
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 2012-9-1, the
time is 2012-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.
Example
# Set the current time and date of the system to 0:0:0 2012-01-01.
<Huawei> clock datetime 0:0:0 2012-01-01
Related Topics
3.7.4 display clock
Function
The clock daylight-saving-time command sets the name, start time, and end
time of the daylight saving time (DST).
Format
clock daylight-saving-time time-zone-name one-year start-time start-date end-
time end-date offset
Parameters
Parameter Description Value
time-zone- Specifies the name The value is a string of 1 to 32 characters.
name of the DST zone.
one-year Specifies absolute -
DST.
repeating Specifies periodic -
DST.
start-time Specifies the DST The start time is in 24-hour format HH:MM.
start time. HH specifies the hour, which is an integer
ranging from 0 to 23. MM specifies the
minute, which is an integer ranging from 0
to 59. If MM is not specified, DST starts on
the hour. You must enter at least one digit
to specify HH. For example, when you enter
0, the start time is 00:00.
start-date Specifies the DST The start date is in the format YYYY-MM-
start date. DD. YYYY specifies the year, which is an
integer ranging from 2000 to 2037, MM
specifies the month, which is an integer
ranging from 1 to 12, and DD specifies the
day, which is an integer ranging from 1 to
31.
end-time Specifies the DST The end time is in 24-hour format HH:MM.
end time. HH specifies the hour, which is an integer
ranging from 0 to 23. MM specifies the
minute, which is an integer ranging from 0
to 59. If MM is not specified, DST starts on
the hour. You must enter at least one digit
to specify HH. For example, when you enter
0, the start time is 00:00.
end-date Specifies the DST The end date is in the format YYYY-MM-
end date. DD. YYYY specifies the year, which is an
integer ranging from 2000 to 2037, MM
specifies the month, which is an integer
ranging from 1 to 12, and DD specifies the
day, which is an integer ranging from 1 to
31.
fifth Specifies the fifth -
week in a month.
first Specifies the first -
week in a month.
second Specifies the second -
week in a month.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
DST, also referred to as summer time, is a convention intended to save resources.
In high latitude areas, sunrise time is earlier in summer than in winter. To reduce
use of incandescent lighting in the evenings and save energy, clocks are adjusted
forward one hour.
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
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 2009 2009
Related Topics
3.7.3 clock timezone
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
undo clock timezone
Parameters
Parameter Description Value
time-zone- Specifies the time zone name. The name is a string of 1 to 32
name case-sensitive characters without
spaces.
add Specifies the offset from the -
UTC for the time zone
specified by time-zone-name.
That is, the sum of the default
UTC time zone and offset is
equal to the time zone
specified by time-zone-name.
minus Specifies the offset from the -
UTC for the time zone
specified by time-zone-name.
That is, the remainder
obtained by subtracting offset
from the default UTC time
zone is equal to the time zone
specified by time-zone-name.
offset Specifies the offset from the Format: HH:MM:SS
UTC.
● HH specifies the hour.
– If the local time is earlier
than the UTC, the value is an
integer ranging from 0 to 14.
– If the local time is later than
the UTC, the value is an
integer ranging from 0 to 12.
● MM and SS specify the minute
and second respectively, and
both range from 0 to 59.
● When HH is set to the
maximum value, the MM and
SS values must be 0.
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 2012-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 2012-12-01
<Huawei> clock timezone BJ add 08:00:00
Related Topics
3.7.2 clock daylight-saving-time
Function
The display clock command displays the current date and clock setting.
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 3-12 lists the formats of the configured time.
The table assumes that the original system time is 08:00:00 on January 1, 2010.
● 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
2012-05-15 20:34:53
Tuesday
Time Zone(Default Zone Name) : UTC+00:00
Daylight saving time :
Name : BJ
Repeat mode : one-year
Start year : 2012
End year : 2012
Start time : 08-01 06:00:00
End time : 10-01 06:00:00
Saving time : 01:00:00
Item Description
Related Topics
3.7.1 clock datetime
3.7.2 clock daylight-saving-time
3.7.5 sysname
Function
The sysname command sets the device host name.
The undo sysname command restores the default device host name.
Format
sysname host-name
undo sysname
Parameters
Parameter Description Value
host-name Specifies the host The value is a string of 1 to 246 case-
name. sensitive characters with spaces, "?" not
supported.
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]
Related Topics
3.1.17 system-view
Function
The acl command uses an ACL to restrict login rights of users on a terminal.
Format
acl [ ipv6 ] acl-number { inbound | outbound }
Parameters
Parameter Description Value
ipv6 Indicates an ACL6 number. -
Views
User interface view
Default Level
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
Related Topics
3.8.25 user-interface
3.8.2 authentication-domain
Function
The authentication-domain command configures an authentication domain for a
type of users.
The undo authentication-domain command restores the default authentication
domain configuration.
By default, the authentication domain is default.
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.
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
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
aaa Indicates the AAA authentication mode. -
password Indicates the password authentication mode. -
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
Function
The auto-execute command command configures auto-run commands.
Format
auto-execute command command
Parameters
Views
User interface view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the auto-execute command command to make the device run a
command automatically on the corresponding interface.
You can run the auto-execute command command to enable automatic
execution for the Telnet command.
Precautions
● The auto-execute command command is applicable to the VTY user
interface.
● When you log in to the device, the device automatically runs the commands
that are configured by the auto-execute command command. The user's
terminal disconnects from the device.
● Before saving the configuration of the auto-execute command command,
ensure that you can log in to the device in other ways so that you can cancel
the command configuration.
● If you use the auto-execute command command, you cannot configure the
device in the user interface view. Therefore, use this command with caution.
Example
# Configure the telnet 10.110.100.1 command to automatically run after a user
logs in to the device using the VTY0 interface.
<Huawei> system-view
[Huawei] user-interface vty 0
[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
3.8.5 databits
Function
The databits command sets the number of data bits of the user interface.
The undo databits command restores the default number of data bits.
By default, the number of data bits of the user interface is 8.
Format
databits { 5 | 6 | 7 | 8 }
undo databits
Parameters
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
Putty used for login.
The setting is valid only when the serial port is configured to work in
asynchronous mode.
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
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
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, or
specified user interface. TTY.
ui-number1 Displays information about a The minimum value is 0. The
user interface with a specified maximum value is smaller by 1
relative number. than the number of user interfaces
the system supports.
ui-number Displays information about a The value is an integer ranging
user interface with a specified from 0 to 177. The value varies
absolute number. according to the device type.
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.
Parameter Description
A AAA authentication.
P Password authentication.
Related Topics
19.1.34 display access-user (All views)
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
Related Topics
3.8.27 user-interface maximum-vty
Function
The display users command displays login information for each user interface.
Format
display users [ all ]
Parameters
Views
All views
Default Level
3: Management level
Usage Guidelines
You can run this command to view information about users who are connected to
the device. The information includes the user name, IP address, and authentication
and authorization information.
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.
Function
The display vty mode command displays the current VTY mode.
Format
display vty mode
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
VTY modes are classified into the man-to-machine mode and machine-to-machine
mode.
Example
# Display the VTY mode.
<Huawei> display vty mode
current VTY mode is Human-Machine interface
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.
Related Topics
3.8.18 screen-length
3.8.12 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.
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
Format
free user-interface { ui-number | ui-type ui-number1 }
Parameters
Parameter Description Value
ui-number Specifies the absolute The value is an integer ranging from 0
number of a user to 177. The value varies according to
interface. the device type.
ui-type Specifies the type of a user The value can be TTY, Console, or VTY.
interface.
ui-number1 Specifies the relative The minimum value is 0. The maximum
number of a user value is smaller by 1 than the number
interface. of user interfaces the system supports.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If a user logs in to the device and does not perform an operation or you want to
forbid a user from performing operations on the device, you can run the free
user-interface command to disconnect a specified user's terminal from the device.
After the command is executed, the device logs out the user.
Precautions
The free user-interface command cannot be executed on the current user
interface. For example, if the current user interface is VTY 2, the free user-
interface vty 2 command fails to be executed on VTY 2 and an error message is
displayed.
Example
# Disconnect the device from user-interface 0.
Related Topics
3.1.14 quit
3.8.15 idle-timeout
Format
history-command max-size size-value
undo history-command max-size
Parameters
Parameter Description Value
size-value Specifies the size of the historical The value is an integer ranging
command buffer. from 0 to 256.
Views
User interface view
Default Level
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
Related Topics
3.1.7 display history-command
3.8.15 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.
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
Related Topics
3.8.13 free user-interface
19.1.57 local-user
3.8.16 parity
Function
The parity command sets the parity bit of a user interface.
Format
parity { even | none | odd
undo parity
Parameters
Parameter Description Value
even Specifies even parity check. -
none Specifies no parity check. -
odd Specifies odd parity check. -
Views
User interface view
Default Level
3: Management level
Usage Guidelines
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 no parity.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] parity none
Function
The protocol inbound command specifies the protocols that the VTY user
interface supports.
Format
protocol inbound { all | ssh | telnet }
Parameters
Parameter Description Value
all Indicates that all protocols including SSH and Telnet are -
supported.
ssh Indicates that only SSH is supported. -
telnet Indicates that only Telnet is 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
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
Related Topics
3.8.3 authentication-mode (user interface view)
3.8.18 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
screen-length Specifies the number of lines The value is an integer that
displayed on a terminal screen. ranges from 0 to 512. The value
0 indicates that all command
output is displayed on one
screen.
temporary Specifies the number of lines -
temporarily displayed on a
terminal screen.
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.
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
3.8.19 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
screen-width Specifies the width of a The value is an integer ranging
terminal screen. from 60 to 512.
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
cipher Indicates a password in cipher text. -
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
● 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]
Related Topics
3.8.3 authentication-mode (user interface view)
3.8.21 shell
Function
The shell command enables 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
speed-value Specifies the data The value is expressed in bit/s.
transfer rate of a
user interface. The asynchronous serial interface supports the
following data transfer rates:
● 600 bit/s
● 1200 bit/s
● 4800 bit/s
● 9600 bit/s
● 19200 bit/s
● 38400 bit/s
● 57600 bit/s
● 115200 bit/s
NOTE
● The console user interface does not support 600
bit/s and 1200 bit/s.
Views
User interface view
Default Level
3: Management level
Usage Guidelines
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
3.8.23 stopbits
Function
The stopbits command sets the stop bit of a user interface.
The undo stopbits command restores the default stop bit of a user interface.
Format
stopbits { 1.5 | 1 | 2 }
undo stopbits
Parameters
Parameter Description Value
1.5 Sets the stop bit to 1.5. -
1 Sets the stop bit to 1. -
2 Sets the stop bit to 2. -
Views
User interface view
Default Level
3: Management level
Usage Guidelines
If the stop bit is 1, the corresponding data bit is 7 or 8.
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.
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
Format
user privilege level level
undo user privilege level
Parameters
Parameter Description Value
level level Specifies the user level. The value is an integer
NOTE ranging from 0 to 15.
The larger the value, the higher the
priority.
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 3-18.
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
Related Topics
3.12.5 display current-configuration
3.12.8 display saved-configuration
3.8.7 display user-interface
3.8.25 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,
interface. or vty.
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, 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
Only users at level 15 can use this command.
The user interface varies according to the login mode. The user interface views can
be numbered using absolute numbers or relative numbers. Table 3-20 describes
absolute and relative numbers of user interfaces.
● 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
NOTE numbers TTY 1 to TTY
The AR150&160&200&510 128.
series does not support the
TTY user interface.
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.
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]
[Huawei-ui-vty1-3]
Related Topics
3.8.7 display user-interface
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
Only users at level 15 can use this command.
The user interface varies according to the login mode. The user interface views can
be numbered using absolute numbers or relative numbers. Table 3-20 describes
absolute and relative numbers of user interfaces.
● 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]
Related Topics
3.8.25 user-interface
3.8.7 display user-interface
Format
user-interface maximum-vty number
Parameters
Parameter Description Value
number Specifies the maximum number of The value is an integer ranging
Telnet and SSH users. from 0 to 15.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
● If the maximum number that you set is smaller than the number of current
online users, the system displays a configuration failure message.
● The maximum number of login users set by the user-interface maximum-vty
command is the total number of Telnet and SSH users.
● If the maximum number of login users is set to 0, no user is allowed to log in
to the device using Telnet or SSH.
Example
# Set the maximum number of Telnet users to 7.
<Huawei> system-view
[Huawei] user-interface maximum-vty 7
Related Topics
3.8.8 display user-interface maximum-vty
3.9.1 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
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
The system config is locked
Related Topics
3.9.4 display config lock
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]
The system config is unlocked
Related Topics
3.9.2 config lock
3.9.4 display config lock
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
------------------------------------------------------------------------------
automatically unlocked interval(minute): 5
locked state: unlocked
------------------------------------------------------------------------------
Item Description
Item Description
locked user type Type of the user who locks the system
configuration. The user can be any of
the following types: NMS user, serial
port user, Telnet user, and web user.
locked user name Name of the user who locks the system
configuration.
Related Topics
3.9.2 config lock
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:
Table 3-23 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.
Related Topics
3.9.13 ecc local-key-pair
Format
display ecc peer-public-key [ brief | name key-name ]
Parameters
Views
All views
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the display ecc peer-public-key command on a client to check
information about the public key configured on the remote end. The public key
enables a server to authenticate users and ensures the login of authorized users.
Example
# Display 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
Encoding type: OPENSSH
=====================================
Key Code:
ecdsa-sha2-nistp256
AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBHYuJAsMAHPFT53pXNlXAE1YjXvjhdultL
zcDcrzJLqvPxhKALn1WXGPaNfQ
sAFQnsHzUYgICcBz/Cpxb5atVeg= ecdsa-key
Item Description
Related Topics
3.9.14 ecc peer-public-key
Function
The display rsa local-key-pair public command displays the public key in the
local key pair.
Format
display rsa local-key-pair public
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
You can run this command on the client and configure the client public key in the
command output to the SSH server, which ensures that the SSH client validity
check by the SSH server is successful and enables the secure data exchange
between the SSH server and client.
Example
# Display the public key in the local key pair.
<Huawei> display rsa local-key-pair public
=====================================================
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 3-25 Description of the display rsa local-key-pair public command output
Item Description
Time of Key pair created Time and date when the public key is
created.
Related Topics
3.9.25 rsa local-key-pair create
Format
display rsa peer-public-key [ brief | name key-name ]
Parameters
Parameter Description Value
brief Displays the brief information -
about all peer public keys.
name key-name Specifies the key name. The value is a string of 1 to 30
case-insensitive characters
without spaces.
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
Usage Scenario
You can run this command to check detailed information about the RSA public key
and whether the local and peer public keys are the same.
Precautions
You must complete the RSA public key configuration before running this
command.
Example
# Display the brief information about all RSA public keys.
<Huawei> display rsa peer-public-key brief
Name Bits
-------------------------------------
rsakey001 780
Table 3-26 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 3-27 Description of the display rsa peer-public-key name command output
Item Description
Related Topics
3.9.27 rsa peer-public-key
Function
The display ssh server command displays the SSH server information.
Format
display ssh server { status | session }
Parameters
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
Table 3-28 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. The default value is 60. The unit is
second.
Run the ssh server timeout command to set this
item.
SSH server key generating Key updating period of the SSH server. The default
interval value is 0. The unit is hour.
Run the ssh server rekey-interval command to
set this item.
Table 3-29 Description of the display ssh server session command output
Item Description
Item Description
Related Topics
3.11.64 sftp server enable
3.9.37 ssh server port
3.9.44 stelnet server enable
Function
The display ssh user-information command displays the configuration of all SSH
users.
Format
display ssh user-information [ username ]
Parameters
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
This command displays the SSH user name, bound RSA public key name, and
service type.
Example
# Display the configuration of all SSH users.
<Huawei> display ssh user-information
-------------------------------------------------------------------------------
Username Auth-type User-public-key-name
-------------------------------------------------------------------------------
a password null
-------------------------------------------------------------------------------
Item Description
Related Topics
3.9.27 rsa peer-public-key
3.9.42 ssh user authentication-type
Function
The display telnet server status command displays the status and configuration
of the Telnet server.
Format
display telnet server status
Parameters
None
Views
All views
Default Level
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 3-31 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 the security. The
length of the server key pair can be 256 bits, 384 bits and 521 bits. By default, the
length of the key pair is 256 bits.
If you no longer need the local ECC key pairs, run the ecc local-key-pair destroy
command to delete them.
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 the Router
name_Host_ECC, such as HUAWEI_Host_ECC.
● The ecc local-key-pair create and ecc local-key-pair destroy commands are
not saved in the configuration file. They only need to be run once and take
effect even after the 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: HUAWEI_Host_ECC.
Info: The ECC host key named HUAWEI_Host_ECC already exists.
Warning: Do you want to replace it ? [Y/N]: Y
Info: The key modulus can be any one of the following : 256, 384, 521.
Info: If the key modulus is greater than 512, it may take a few minutes.
Please input the modulus [default=256]:256
Info: Generating keys...
Info: Succeeded in creating the ECC host keys.
Related Topics
3.9.5 display ecc local-key-pair public
Function
The ecc peer-public-key command generates an ECC public key and enters the
ECC public key view.
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
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
A maximum of 20 ECC public keys can be configured.
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
Related Topics
3.9.20 public-key-code begin
3.9.15 exline-breaker
Function
The exline-breaker enable command enables the function of adding a line break.
Format
exline-breaker { enable | disable }
Parameters
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
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
3.9.17 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.
– 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
[Huawei] matched upper-view
[Huawei] interface gigabitethernet1/0/1
[Huawei-GigabitEthernet1/0/1] undo ftp server
Info: Succeeded in closing the FTP server.
[Huawei]
# 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]
Related Topics
3.1.14 quit
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-keycommand 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]
Related Topics
3.9.20 public-key-code begin
3.9.21 public-key-code end
3.9.27 rsa peer-public-key
Function
The public-key-code begin command displays the public key editing view.
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]
Related Topics
3.9.7 display rsa local-key-pair public
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]
Related Topics
3.9.20 public-key-code begin
3.9.27 rsa peer-public-key
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
Related Topics
3.9.23 redirect enable
Function
The redirect enable command enables the redirection function on a TTY user
interface.
The undo redirect enable command disables the redirection function on a TTY
user interface.
Format
redirect [ ssh ] enable
Parameters
Parameter Description Value
ssh Enables the SSH-based redirection function on a serial port. -
Views
User interface view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
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
Related Topics
3.9.24 redirect listen-port
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
Related Topics
3.9.23 redirect enable
Function
The rsa local-key-pair create command generates the local RSA host and server
key pairs.
By default, the local RSA host and server key pairs are not configured.
Format
rsa local-key-pair create
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To implement secure data exchange between the server and client, run this
command to generate a local key pair.
Precautions
If the RSA key pair exists, the system prompts you to confirm whether to replace
the original key pair.
After you run this command, the system prompts you to enter the number of bits
in the host key. The difference between the bits in the server and host key pairs
must be at least 128 bits. For a server or host key pair, the minimum length is 512
bits, the maximum length is 2048 bits, and the default length is 2048 bits.
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.
This command is not saved in a configuration file.
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
RSA keys defined for Host already exist.
Confirm to replace them? (y/n)[n]:y
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...
......................................................................................+++
....+++
.......................................++++++++
..............++++++++
Related Topics
3.9.26 rsa local-key-pair destroy
Format
rsa local-key-pair destroy
Parameters
None
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
To delete the local key pair, run rsa local-key-pair destroy command. If the host
key pair and the service key pair of an SSH server are deleted, run the rsa local-
key-pair create command to create the new host key pair and service key pair for
the SSH server.
After you run this command, verify that all local RSA keys are deleted. This
command is not saved in a configuration file.
Prerequisite
The local RSA keys that can be deleted exist.
Example
# Delete all RSA server keys.
<Huawei> system-view
[Huawei] rsa local-key-pair destroy
% The name for the keys which will be destroyed is Host.
% Confirm to destroy these keys? (y/n)[n]:y
Related Topics
3.9.25 rsa local-key-pair create
Format
rsa peer-public-key key-name [ encoding-type { der | openssh | pem } ]
undo rsa peer-public-key key-name
Parameters
Parameter Description Value
key-name Specifies the rsa public key name. The value is a string of
1 to 30 case-
insensitive characters
without spaces.
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.
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]
Related Topics
3.9.8 display rsa peer-public-key
3.9.20 public-key-code begin
3.9.21 public-key-code end
3.9.19 peer-public-key end
3.9.28 send
Function
The send command sends messages to all user interfaces.
Format
send { all | ui-number | ui-type ui-number1 }
Parameters
Parameter Description Value
all Specifies that the system sends -
messages to all user interfaces.
ui-number Specifies the absolute number of the The minimum value is 0. The
user interface. maximum value is smaller by
1 than the number of the
user interfaces that the
system supports.
ui-type Specifies the type of the user -
interface.
ui-number1 Specifies the relative number of the -
user interface.
Views
User view
Default Level
1: Monitoring level
Usage Guidelines
After you run the send command, the system prompts you to enter the message
to send. After you confirm to send this message, the user who logs in to the
system from the specified user interface can receive this message.
Example
# Send a message to the user interface VTY 0.
<Huawei> send vty 0
Enter message, end with CTRL+Z or Enter; abort with CTRL+C:Hello, good morning!^Z
Warning: Send the message? [Y/N]: y
# After you confirm to send the message, the user who logs in to the Huawei
from VTY 0 can receive this message.
<Huawei>
Info: Receive a message from VTY2:Hello, good morning!
Format
ssh client servername assign { rsa-key | ecc-key } keyname
undo ssh client servername assign { rsa-key | ecc-key }
Parameters
Parameter Description Value
servername Specifies the host name or IP The value is a string of 1 to
address of the SSH server. 64 characters without spaces.
rsa-key Specifies the RSA public key. -
ecc-key Specifies the ECC public key. -
keyname Specifies the SSH server public key The value is a string of 1 to
name that has been configured on 64 case-insensitive characters
the SSH client. without spaces.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the SSH client connects to the SSH server for the first time and the first
authentication is not enabled on the SSH client using the ssh client first-time
enable command, the SSH client rejects the access from unauthorized SSH
servers. You need to specify the host public key of the SSH server and the
mapping between the key and SSH server on the SSH client. After that, the client
will determine whether the server is reliable using the correct public key based on
the mapping.
Precautions
The 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
Related Topics
3.9.30 ssh client first-time enable
Function
The ssh client first-time enable command enables the first authentication on the
SSH client.
The undo ssh client first-time enable command disables the first authentication
on the SSH client.
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
Related Topics
3.9.29 ssh client assign
Format
ssh server authentication-retries times
Parameters
Parameter Description Value
times Specifies the maximum number of The value is an integer that
authentication retries for an SSH ranges from 1 to 5.
connection.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run this command to configure the maximum number of authentication
retries for an SSH connection, which prevents server overload due to malicious
access.
Precautions
The configured number of retries takes effect upon the next login.
The total number of RSA and password authentication retries on the SSH client
cannot exceed the maximum number that is set using this command.
Example
# Set the maximum number of times for retrying login authentication to 4.
<Huawei> system-view
[Huawei] ssh server authentication-retries 4
Related Topics
3.9.9 display ssh server
Format
ssh server compatible-ssh1x enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
An SSH server needs to be configured with backward compatibility for the version
negotiation between the client and the server. When a TCP connection is set up
between the client and server, the client negotiates with the server on the version
of which the client and the server can work together.
The server compares the version of its own with that sent by the client, and
determines whether it can work with the client.
● If the protocol version on the client is earlier than 1.3 or later than 2.0,
version negotiation fails and the server disconnects from the client.
● If the protocol version on the client is equal to or later than 1.3 and earlier
than 1.99, the SSH1.5 server module is invoked and the SSH1.X process is
performed when the SSH1.X-compatible mode is configured. When the
SSH1.X-incompatible mode is configured, version negotiation fails and the
server disconnects from the client.
● If the protocol version on the client is 1.99 or 2.0, the SSH2.0 server module is
invoked and the SSH2.0 process is performed.
Precautions
Example
# Enable the SSH server's compatibility with earlier versions.
<Huawei> system-view
[Huawei] ssh server compatible-ssh1x enable
Related Topics
3.9.9 display ssh server
Function
The ssh server cipher command configures the encryption algorithm list of the
SSH server.
The undo ssh server cipher command restores default encryption algorithms of
the SSH server.
Format
ssh server cipher { 3des_cbc | aes128_cbc | aes128_ctr | aes192_ctr | aes256_ctr
| blowfish_cbc | des_cbc } *
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The server and client negotiate the algorithm for encrypting packets transmitted
between them. You can run the ssh server cipher command to configure the
encryption algorithm list of the SSH server. The server compares the encryption
algorithm list sent from the client with its own encryption algorithm list, and
selects the first matched encryption algorithm for encrypting transmitted packets.
If the encryption algorithm lists of the server and client have no common
encryption algorithm, the encryption algorithm negotiation fails.
For example, run the ssh server cipher { aes256_ctr | aes192_ctr | aes128_ctr } *
command to add the high-security aes256_ctr, aes192_ctr, and aes128_ctr
encryption algorithms to the encryption algorithm list of the SSH server, improving
device security.
Precautions
You are advised not to add the following encryption algorithms to the encryption
algorithm list of the SSH server because they provide low security: 3des_cbc,
aes128_cbc, blowfish_cbc, and des_cbc.
Example
# Add aes256_ctr to the encryption algorithm list of the 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
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
Format
ssh server key-exchange { dh_group_exchange_sha1 | dh_group1_sha1 } *
Parameters
Parameter Description Value
dh_group_exchange_sha1 Adds the Diffie-hellman-group-exchange- -
sha1 algorithm to the key exchange
algorithm list of the SSH server.
dh_group1_sha1 Adds the Diffie-hellman-group1-sha1 -
algorithm to the key exchange algorithm list
of the SSH server.
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_group_exchange_sha1 and dh_group1_sha1. The
dh_group_exchange_sha1 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
Function
The ssh server permit interface command specifies physical interfaces on the
SSH server to which clients can connect.
The undo ssh permit interface command restores the default physical interfaces
on the SSH server to which clients can connect.
By default, clients can connect to all the physical interfaces on the SSH server.
Format
ssh server permit interface { interface-type interface-number } &<1-5>
Parameters
Parameter Description Value
interface-type interface-type: specifies the interface type. -
interface-number
interface-number: specifies the interface number.
interface-number and interface-type specify an
interface.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent a client from connecting to the SSH server through an unauthorized
physical interface, you can run the ssh server permit interface command to
specify physical interfaces on the SSH server to which the client can connect.
Precautions
● By default, the client can connect to all the physical interfaces on the SSH
server. When you run this command to specify one physical interface on the
SSH server, the client cannot connect to the other physical interfaces on the
SSH server.
● You can specify a maximum of five interfaces each time you run the ssh
server permit interface command. The latest configuration overrides the
previous one. For example, before you run the command, clients can connect
to three physical 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.
Example
# Specify physical interfaces on the SSH server to which clients can connect.
<Huawei> system-view
[Huawei] ssh server permit interface gigabitethernet 1/0/0 gigabitethernet 2/0/0
Info: Succeeded in setting ssh permit interface.
# Restore the default physical interfaces on the SSH server to which clients can
connect.
<Huawei> system-view
[Huawei] undo ssh server permit interface
Format
ssh server port port-number
undo ssh server port
Parameters
Parameter Description Value
port-number Specifies the listening port The value is 22 or an integer
number of the SSH server. ranging from 1025 to 55535.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Configure the listening port number of the SSH server to prevent from malicious
access to the SSH service standard port and ensure security.
Precautions
The SSH client can log in successfully with no port specified only when the server
is listening on port 22. If the server is listening on another port, the port number
must be specified upon login.
Before changing the current port number, disconnect all devices from the port.
After the port number is changed, the server starts to listen on the new port.
Example
# Set the listening port number of the SSH server is 1025.
<Huawei> system-view
[Huawei] ssh server port 1025
Related Topics
3.9.9 display ssh server
3.11.62 sftp
3.9.43 stelnet
Function
The ssh server rekey-interval command sets the interval for updating the SSH
server key pair.
The undo ssh server rekey-interval command restores the default interval for
updating the SSH server key pair.
The default interval for updating the SSH server key pair is 0, indicating that the
key pair is never updated.
Format
ssh server rekey-interval hours
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If the server key pair is not updated for a long time, the key is easy to decrypt and
the server is insecure. After the interval for updating the SSH server key pair is set
using this command, the system will automatically update the key pair at
intervals.
Precautions
If the client is connected to the server, the server public key on the client is not
updated immediately. This key is updated only when the client is reconnected to
the server.
Example
# Set the interval for updating the SSH server key pair to 2 hours.
<Huawei> system-view
[Huawei] ssh server rekey-interval 2
Related Topics
3.9.9 display ssh server
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
Related Topics
3.9.9 display ssh server
Format
ssh server-source { -a [ ipv6 ] source-ip-address | -i [ ipv6 ] interface-type
interface-number }
undo ssh [ ipv6 ] server-source
Parameters
Parameter Description Value
ipv6 Configures the SSH server to support an IPv6 -
source address.
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
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.
Related Topics
3.9.43 stelnet
3.9.44 stelnet server enable
3.9.37 ssh server port
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.
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
Related Topics
3.9.10 display ssh user-information
Format
ssh user [ user-name ] authentication-type { password | rsa | password-rsa |
ecc | password-ecc | all }
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When you configure the authentication mode for an SSH user, the system
automatically creates an SSH user named user-name if the user-name user does
not exist.
Table 3-33 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
Related Topics
3.9.10 display ssh user-information
3.9.43 stelnet
Function
The stelnet command enables you to use the STelnet protocol to log in to another
device from the current device.
Format
# IPv4 address
stelnet [ -a source-address ] host-ip [ port-number ] [ [ -vpn-instance vpn-
instance-name ] | [ identity-key { rsa | ecc } ] | [ user-identity-key { rsa | ecc } ] |
[ prefer_kex { 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 ] ]
# IPv6 address
stelnet ipv6 [ -a source-address ] host-ipv6 [ -oi interface-type interface-
number ] [ port-number ] [ [ -vpn6-instance vpn-instance-name ] | [ identity-
key { rsa | ecc } ] | [ user-identity-key { rsa | ecc } ] | [ prefer_kex { 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
ipv6 Specifies an IPv6 address. -
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.
● 3DES, MD5, MD5_96, SHA1, and SHA1_96 encryption algorithm cannot
ensure security. sha2_256, sha2_256_96, AES128, AES128-CTR, AES192-CTR or
AES256-CTR encryption algorithm is recommended.
Example
# Set keepalive parameters when the client logs in to the server through STelnet.
<Huawei> system-view
[Huawei] stelnet 10.164.39.209 -ki 10 -kc 4
Related Topics
3.9.44 stelnet server enable
3.9.37 ssh server port
Function
The stelnet server enable command enables the STelnet service on the SSH
server.
The undo stelnet server enable command disables the STelnet service on the
SSH server.
Format
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.
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] stelnet server enable
Related Topics
3.9.43 stelnet
3.9.45 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.
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
Related Topics
3.9.46 super password
Format
super password [ level user-level ] cipher
undo super password [ level user-level ]
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
● AR3200 series routers do not support this command in active/standby
switchover scenarios.
● 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.
– 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:
Related Topics
3.9.45 super
3.9.47 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
vpn-instance Specifies the VPN4 instance The value is a string of 1 to
vpn-instance- name of the device to log in 31 case-sensitive characters,
name through Telnet. spaces not supported. When
double quotation marks are
used around the string,
spaces are allowed in the
string.
-a source-ip- By specifying a source IP -
address address, you can use this
address to communicate with
the server for high network
security. If no source address is
specified, the system will use
the IP address of the local
outbound interface to initiate a
Telnet connection.
Views
User view
Default Level
0: Visit level
Usage Guidelines
Usage Scenario
If one or multiple devices on the network need to be configured and managed,
you do not need to connect each device to your terminal for local maintenance. If
you have learned the IP address of the device, you can run this command to log in
to the device from your terminal for remote device configuration. By doing this,
you can use one terminal to maintain multiple devices on the network.
You can press Ctrl_] 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
Related Topics
3.9.51 telnet server enable
3.9.52 telnet server port
Format
telnet client-source { -a source-ip-address | -i interface-type interface-number }
undo telnet client-source
Parameters
Parameter Description Value
-a source-ip-address Specifies the IPv4 address of the local -
router.
-i interface-type interface- Specifies the outbound interface of the -
number local router.
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
Related Topics
3.9.47 telnet
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 }
Parameters
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.
Related Topics
3.9.47 telnet
3.9.51 telnet server enable
3.9.52 telnet server port
Format
telnet server permit interface { interface-type interface-number } &<1-5>
undo telnet server permit interface
Parameters
Parameter Description Value
interface-type interface-type: specifies the interface type. -
interface-number
interface-number: specifies the interface number.
interface-number and interface-type specify an
interface.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent a client from connecting to the Telnet server through an unauthorized
physical interface, you can run the telnet server permit interface command to
specify physical interfaces on the Telnet server to which the client can connect.
Precautions
● By default, the client can connect to all the physical interfaces on the Telnet
server. When you run this command to specify one physical interface on the
Telnet server, the client cannot connect to the other physical interfaces on the
Telnet server.
● You can specify a maximum of five interfaces each time you run the telnet
server permit interface command. The latest configuration overrides the
previous one. For example, before you run the command, clients can connect
Example
# Specify physical interfaces on the Telnet server to which clients can connect.
<Huawei> system-view
[Huawei] telnet server permit interface gigabitethernet 1/0/0 gigabitethernet 2/0/0
Info: Succeeded in setting telnet permit interface.
# Restore the default physical interfaces on the Telnet server to which clients can
connect.
<Huawei> system-view
[Huawei] undo telnet server permit interface
Format
telnet [ ipv6 ] server enable
undo telnet [ ipv6 ] server enable
Parameters
Parameter Description Value
ipv6 Specifies a Telnet IPv6 server. -
Views
System view
Default Level
3: Management level
Usage Guidelines
You can run this command to enable and disable the Telnet server. A Telnet server
can be connected only when it is enabled.
When the undo telnet server enable command is executed to disable the Telnet
server, an online Telnet user goes offline because the Telnet service is disabled.
When a Telnet server stops, you can log in to the device only through the console
port or SSH.
NOTICE
The Telnet protocol poses a security risk, and therefore the STelnet V2 mode is
recommended.
Example
# Enable a Telnet server.
<Huawei> system-view
[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
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
Related Topics
3.9.23 redirect enable
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 : Disabled (default: disable)
HTTPS server port : 443 (default: 443)
HTTPS server manager port :
HTTPS SSL Policy :
Item Description
Related Topics
3.10.12 http timeout
3.10.6 http server enable
3.10.10 http server port
Format
display http user [ username username ]
Parameters
Parameter Description Value
username Specifies the name The value is a string of 1 to 64 case-
username of the current online insensitive characters, with no space or
user. wildcard. When double quotation marks
are used around the string, spaces are
allowed in the string.
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
Item Description
Related Topics
3.10.12 http timeout
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
The undo http acl command deletes the ACL on the HTTP server.
By default, no ACL is configured on the HTTP server.
Format
http acl acl-number
undo http acl
Parameters
Parameter Description Value
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.
● 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
Related Topics
3.10.1 display http server
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
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://w3.huawei.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://w3.huawei.com
Http getting http://w3.huawei.com[10.82.55.199]:
Item Description
Item Description
Related Topics
21.16.1 ping
21.16.3 tracert
Format
http server enable
undo http server enable
Parameters
None
Views
System view
Default Level
3: Management level
Usage Guidelines
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.
Example
# Enable the HTTP server.
<Huawei> system-view
[Huawei] http server enable
Related Topics
3.10.1 display http server
3.10.7 http server load
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
Related Topics
3.10.1 display http server
Function
The http server max-online-users command sets the maximum number of
concurrent online users allowed by the web NMS.
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
Format
http server permit interface { interface-type interface-number } &<1-5>
undo http server permit interface
Parameters
Parameter Description Value
interface-type interface-type specifies the interface type. -
interface-number
interface-number specifies the number of an
interface. interface-number and interface-type
specify an interface.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent unauthorized users from accessing the web platform through interfaces
on the device, run the http server permit interface command to configure
interfaces through which users can access the web platform.
Precautions
You can only run the http server permit interface command to configure physical
interfaces and VLANIF interfaces.
In the factory default settings of the device, users can only access the web
platform through management interfaces. For example, when the management
interface of the device is GE0, the http server permit interface
GigabitEthernet0/0/0 command is contained in the factory default settings of the
device.
A maximum of five interfaces can be configured. If you run the http server
permit interface 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 has been configured, and then run the http server permit
interface command to configure GigabitEthernet 1/0/0, users can access the web
platform only through GigabitEthernet 1/0/0.
Example
# Configure the interfaces through which users can access the web platform.
<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 platform using
all interfaces on the device.
<Huawei> system-view
[Huawei] undo http server permit interface
Function
The http server port command sets the listening port number of the HTTP server.
The undo http server port command restores the default listening port number
of the HTTP server.
Format
http server port port-number
Parameters
Parameter Description Value
port-number Specifies the listening The value is an integer that ranges from
port number of the The value is 80, or an integer that
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
Related Topics
3.10.1 display http server
Format
http server-source { -a source-ip-address | -i interface-type interface-number }
undo http server-source
Parameters
Parameter Description Value
-a source-ip-address Specifies the source IP address for the HTTP -
server. The loopback IP address is recommended.
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
Related Topics
3.10.6 http server enable
3.10.10 http server port
Function
The http timeout command sets the idle timeout duration of the web server.
The undo http timeout command restores the default idle timeout duration of
the webHTTP server.
Format
http timeout 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 and the web
server notifies the user only after the user sends the next login request.
● 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
Related Topics
3.10.1 display http server
Format
set fast-configuration state disable
undo set fast-configuration state disable
Parameters
None
Views
Web view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
When a user has configured the Internet access wizard function and logs in to the
web system of the EasyOperation edition again, if the Internet access wizard
popup notification is not required, run the set fast-configuration state disable to
disable the Internet access wizard popup notification. If the Internet access wizard
popup notification is required, run the undo set fast-configuration state disable
command.
Precautions
The models must support the web system of the EasyOperation edition.
Example
# Disable the Internet access wizard popup notification of the web system of the
EasyOperation edition.
<Huawei> system-view
[Huawei] web
[Huawei-web] set fast-configuration state disable
Function
The set logo-path command sets the storage directory of the logo image on the
web page.
The undo set logo-path command cancels the configured storage directory of the
logo image on the web page.
Format
set logo-path subpathname
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.
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.
Format
set web login-style { professional | simple }
Parameters
Parameter Description Value
Views
System view
Default Level
3: Management level
Usage Guidelines
By default, the EasyOperation edition is used for web platform login to the
AR100&AR120&AR150&AR160&AR200 series routers. To log in to the Classics web
platform, run the set web login-style professional command to set the web
platform edition. To restore the EasyOperation edition, run the set web login-
style simple command.
Example
# Set the Classics edition for web platform login to the router.
<Huawei> system-view
[Huawei] set web login-style professional
3.11.1 ascii
Function
The ascii command sets the file transfer mode to ASCII on an FTP client.
The default file transfer mode is ASCII.
Format
ascii
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Files can be transferred in ASCII or binary 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 logged in.
[Huawei-ftp] ascii
200 Type set to A.
Related Topics
3.11.2 binary
3.11.2 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 logged in.
[Huawei-ftp] binary
200 Type set to I.
Related Topics
3.11.1 ascii
3.11.3 bye
Function
The bye command terminates the connection with the remote FTP server and
enters the user view.
Format
bye
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
This command is equivalent to the quit command.
You can use the close and disconnect commands to terminate the connection
with the remote FTP server and retain the FTP client view.
Example
# Terminate the connection with the remote FTP server and enter the user view.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] bye
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye.
<Huawei>
Related Topics
3.11.9 close
3.11.16 disconnect
3.1.14 quit
Function
The cd command changes the working directory of the FTP server.
Format
cd remote-directory
Parameters
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.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] cd d:/temp
250 "D:/temp" is current directory.
Related Topics
3.11.14 dir/ls (FTP client view)
3.11.47 pwd (FTP client view)
Function
The cd command changes the working directory of the SFTP server.
Format
cd [ remote-directory ]
Parameters
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
Related Topics
3.11.15 dir/ls (SFTP client view)
Format
cd directory
Parameters
Parameter Description Value
directory Specifies the The value is a string of 1 to 64 case-insensitive
current working characters without spaces in the [ drive ] path
directory of a format.
user.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
You are advised to add : and / between the
storage device name and directory. Characters ~,
*, /, \, :, ', " cannot be used in the directory name.
For example, a directory name is flash:/selftest/
test/.
Views
User view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
The following describes the drive name.
● drive is the storage device and is named as follows:
– sd1: root directory of the Micro SD card on the master SRU.
– flash: root directory of the flash memory on the master SRU.
– slave#sd1: root directory of the Micro SD card on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
– slave#flash: root directory of the flash memory on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
Precautions
● The directory specified in the cd command must exist; otherwise, the error
messages will displayed:
You can perform the following operations to rectify faults:
a. Run the pwd command to view the current working directory.
b. Run the dir command to view the current working directory and verify
that the directory specified in the cd command exists.
Example
# Change the current working directory from flash:/temp to flash:.
<Huawei> pwd
flash:/temp
<Huawei> cd flash:
<Huawei> pwd
flash:
Related Topics
3.11.49 pwd (user view)
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 dhcp
Current directory is:
/dhcp
sftp-client> cdup
Current directory is:
/
sftp-client> cdup
Error: Failed to change the current directory.
sftp-client>
Format
cdup
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To exit from the current directory and return to the upper-level directory, run the
cdup command.
Precautions
Example
# Exit from the current directory and return to the upper-level directory.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] cd security
250 CWD command successful.
[Huawei-ftp] cdup
250 "C:/" is current directory .
Related Topics
3.11.14 dir/ls (FTP client view)
3.11.47 pwd (FTP client view)
3.11.9 close
Function
The close command terminates the connection with the remote FTP server and
retains the FTP client view.
Format
close
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the bye and quit commands to terminate the connection with the
remote FTP server and enter the user view.
Precautions
To enter the user view from the FTP client view, you can run the bye or quit
command.
Example
# Terminate the connection with the remote FTP server and enter the FTP client
view.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] close
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye.
[Huawei-ftp]
Related Topics
3.11.3 bye
3.11.10 copy
Function
The copy command copies a file.
Format
copy source-filename destination-filename
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Example
# Copy the file config.cfg from the root directory of the flash card to flash:/temp.
The destination file name is temp.cfg.
<Huawei> copy flash:/config.cfg flash:/temp/temp.cfg
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 card, you can perform
the preceding configuration using the relative path.
<Huawei> pwd
flash:
<Huawei> dir
Directory of flash:/
# Copy the file config.cfg from the root directory of the flash card to flash:/temp.
The destination file name is config.cfg.
<Huawei> pwd
flash:
<Huawei> dir
Directory of flash:/
# Copy the file backup.zip to backup1.zip in the test directory from the current
working directory flash:/test/.
<Huawei> pwd
flash:/test
<Huawei> copy backup.zip backup1.zip
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
Related Topics
3.11.42 move
Function
The delete command deletes a file from the FTP server.
Format
delete remote-filename
Parameters
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
A file deleted in the FTP client view cannot be restored.
Example
# Delete the file temp.c.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] delete temp.c
Warning: The contents of file temp.c cannot be recycled. Continue? (y/n)[n]:y
250 File deleted from remote host.
Related Topics
3.11.14 dir/ls (FTP client view)
Format
delete [ /unreserved ] [ /force ] { filename | devicename }
Parameters
Parameter Description Value
/unreserved Deletes a specified file. -
The deleted file cannot
be restored.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The following describes the drive name.
● drive is the storage device and is named as follows:
– sd1: root directory of the Micro SD card on the master SRU.
– flash: root directory of the flash memory on the master SRU.
– slave#sd1: root directory of the Micro SD card on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
– slave#flash: root directory of the flash memory on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
the AR2240 and AR3260 using SRU40, SRU60, SRU80, and is named sd1: on
the AR2240 and AR3260 using SRU200, SRU400, SRU100E, and SRU200E.
Precautions
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
filer, a system prompt is displayed.
● You cannot delete a directory by running the delete command. To delete a
directory, run the rmdir (user view) command.
Example
# Delete the file test.txt from the flash:/test/ directory.
<Huawei> delete flash:/test/test.txt
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
Related Topics
3.11.55 reset recycle-bin
3.11.71 undelete
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:
– sd1: root directory of the Micro SD card on the master SRU.
– flash: root directory of the flash memory on the master SRU.
– slave#sd1: root directory of the Micro SD card on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
– slave#flash: root directory of the flash memory on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
Example
# Display information about all files and directories in the current directory.
<Huawei> dir /all
Directory of flash:/
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
Parameter Description Value
remote- Specifies the name and The value is a string of 1 to 64
filename directory of a file stored on the case-insensitive characters
FTP server. without spaces.
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 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
# 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 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
-l Displays detailed information about -
all files and directories in a specified
directory.
-a Displays names of all files and -
directories in a specified directory.
remote-directory Specifies the name of a directory on The value is a string of
the SFTP server. 1 to 64 case-insensitive
characters without
spaces.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
The dir and ls commands are equivalent.
● If -l and -a parameters are not specified, detailed information about all files
and directories in a specified directory is displayed 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 ...
3.11.16 disconnect
Function
The disconnect command terminates the connection with the remote FTP server
and displays the FTP client view.
Format
disconnect
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
This command is equivalent to the close command.
You can run the bye and quit commands to terminate the connection with the
remote FTP server and enter the user view.
To enter the user view from the FTP client view, you can run the bye or quit
command.
Example
# Terminate the connection with the remote FTP server and enter the FTP client
view.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] disconnect
221 Windows FTP Server (WFTPD, by Texas Imperial Software) says goodbye.
[Huawei-ftp]
Related Topics
3.11.3 bye
3.11.9 close
3.11.43 open
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.
Item Description
Info: The source IP address of FTP client 10.1.1.1 is the source IP address of the
is 10.1.1.1. FTP client.
You can run the ftp client-source
command to configure the source IP
address.
If 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.
Related Topics
3.11.26 ftp
3.11.28 ftp client-source
Format
display [ ipv6 ] ftp-server
Parameters
Parameter Description Value
ipv6 Specifies the IPv6 FTP server. -
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
Item Description
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, the FTP server's source
interface LoopBack0 is not displayed.
Related Topics
3.11.27 ftp acl
3.11.29 ftp server enable
3.11.31 ftp server port
3.11.32 ftp server-source
3.11.33 ftp timeout
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
Related Topics
3.11.33 ftp timeout
19.1.57 local-user
Function
The display sftp-client command displays the source IP address configured for
the SFTP client.
Format
display sftp-client
Parameters
None
Views
All views
Default Level
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.
Related Topics
3.11.62 sftp
3.11.63 sftp client-source
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.
Related Topics
3.11.65 tftp
3.11.66 tftp client-source
Function
The display tftp-server status command displays the TFTP server information.
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
Item Description
Item Description
There are 1 clients connected One client has connected to the TFTP
server.
3.11.23 execute
Function
The execute command executes a specified batch file.
Format
execute batch-filename
Parameters
Parameter Description Value
batch-filename The value is a string of 5 to 64 case-
Specifies the name of a
insensitive characters without spaces.
batch file.
The file name extension is .bat.
Views
System view
Default Level
2: Configuration level
Usage Guidelines
Usage Scenario
● 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 password irreversible-
cipher Helloworld@6789.
<Huawei> system-view
[Huawei] execute test.bat
[Huawei] system-view
^
Error: Unrecognized command found at '^' position.
[Huawei] aaa
[Huawei-aaa] local-user huawei password irreversible-cipher Helloworld@6789
[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.
Function
The file prompt command changes the prompt mode when you perform
operations on files.
Format
file prompt { alert | quiet }
Parameters
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.
3.11.25 format
Function
The format command formats a storage device.
Format
format drive
Parameters
Parameter Description Value
drive Specifies the name of the storage device to format. -
If a storage device contains the system software package, the
storage device cannot be formatted using the format
command. To format the storage device, perform the
operation in the BootROM menu.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When the file system fault cannot be rectified or the data on the storage device is
unnecessary, the storage device can be formatted. When you run the format
command, all files and directories are cleared from the storage device.
Configuration Impact
NOTICE
After a storage device is formatted, the data it saves is deleted. If the
configuration file for the next startup is saved on the storage device,
configurations are lost after the device is restarted. If the software package for the
next startup is saved on the storage device, device restart is affected.
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.
3.11.26 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
-a source-ip- Specifies the source IP address The value is in dotted
address for connecting to the FTP client. decimal notation.
You are advised to use the
loopback interface IP address.
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.
public-net Specifies the FTP server on the -
public network.
You must set the public-net
parameter when the FTP server
IP address is a public network IP
address.
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.
Example
# Connect to the FTP server whose IP address is 10.137.217.201.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp]
[Huawei-ftp]
Related Topics
3.11.3 bye
3.11.16 disconnect
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
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
Related Topics
3.11.18 display ftp-server
Format
ftp client-source { -a source-ip-address | -i interface-type interface-number }
undo ftp client-source
Parameters
Parameter Description Value
-a source-ip- The value is
Specifies the source IP address. You are
address in dotted
advised to use the loopback interface IP
decimal
address.
notation.
-i interface-type Specifies the source interface. You are -
interface-number advised to use the loopback interface.
The IP address configured for the source
interface is the source IP address for sending
packets. If no IP address is configured for
the source interface, the FTP connection
cannot be set up.
Views
System view
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
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.
Related Topics
3.11.26 ftp
3.11.32 ftp server-source
3.11.17 display ftp-client
Format
ftp [ ipv6 ] server enable
undo ftp [ ipv6 ] server
Parameters
Parameter Description Value
ipv6 Specifies the IPv6 FTP server. -
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To manage FTP server files on a client, you must run the ftp server enable
command to enable the FTP server function to allow FTP users to log in to the
FTP server.
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 enable
Info: Succeeded in starting the FTP server.
Info: FTP is insecure, recommended to use SFTP with encryption features.
Related Topics
3.11.18 display ftp-server
Format
ftp server permit interface { interface-type interface-number } &<1-5>
Parameters
Parameter Description Value
interface-type interface-type: specifies the interface type. -
interface-number
interface-number: specifies the interface number.
interface-number and interface-type specify an
interface.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
To prevent a client from connecting to the FTP server through an unauthorized
physical interface, you can run the ftp server permit interface command to
specify physical interfaces on the FTP server to which the client can connect.
Precautions
● By default, the client can connect to all the physical interfaces on the FTP
server. When you run this command to specify one physical interface on the
FTP server, the client cannot connect to the other physical interfaces on the
FTP server.
● You can specify a maximum of five interfaces each time you run the ftp
server permit interface command. The latest configuration overrides the
previous one. For example, before you run the command, clients can connect
to three physical 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
# Specify physical interfaces on the FTP server to which clients can connect.
<Huawei> system-view
[Huawei] ftp server permit interface gigabitethernet 1/0/0 gigabitethernet 2/0/0
Info: Succeeded in setting ftp permit interface.
# Restore the default physical interfaces on the FTP server to which clients can
connect.
<Huawei> system-view
[Huawei] undo ftp server permit interface
Format
ftp [ ipv6 ] server port port-number
Parameters
Parameter Description Value
ipv6 Specifies the IPv6 FTP server. -
port port-number Specifies the listening port The value is 21 or an
number of the FTP server. integer that ranges from
1025 to 55535.
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
Related Topics
3.11.29 ftp server enable
Function
The ftp server-source command specifies the source IP address for an FTP server
to send packets.
The undo ftp server-source command restores the default source IP address for
an FTP server to send packets.
The default source IP address for the FTP server to send packets is 0.0.0.0.
Format
ftp 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 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.
Related Topics
3.11.26 ftp
3.11.29 ftp server enable
3.11.28 ftp client-source
Format
ftp [ ipv6 ] timeout minutes
Parameters
Parameter Description Value
ipv6 Specifies the IPv6 FTP -
server.
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
Related Topics
3.11.18 display ftp-server
Function
The get command downloads a file from the SFTP server and saves the file to the
local device.
Format
get remote-filename [ local-filename ]
Parameters
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> get test.txt
Remote file: / test.txt ---> Local file: test.txt
Info: Downloading file successfully ended.
Related Topics
3.11.46 put (SFTP client view)
Format
get remote-filename [ local-filename ]
Parameters
Parameter Description Value
remote- Specifies the name of the file The value is a string of 1 to 64
filename to be downloaded from the case-insensitive characters
FTP server. without spaces.
local-filename Specifies the name of a The value is a string of 1 to 64
downloaded file to be saved to case-insensitive characters
the local device. without spaces.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the get command to download system software, backup
configuration files, and patch files from the FTP server to upgrade devices.
Precautions
● If the downloaded file name is not specified on the local device, the original
file name is used.
● If the name of the downloaded file is the same as that of an existing local
file, the system prompts you whether to overwrite the existing file.
Example
# Download the system software devicesoft.cc from the FTP server.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
Related Topics
3.11.45 put (FTP client view)
Format
help [ all | command-name ]
Parameters
Parameter Description Value
all Displays all commands in the SFTP client view. -
command-name Displays the format and parameters of a specified -
command in the SFTP client view.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
In the SFTP view, you can only enter the question mark (?) to obtain all
commands in the SFTP client view. If you enter a command keyword and the
question mark (?) to query command parameters, an error message is displayed,
as shown in the following:
sftp-client> dir ?
Error: Failed to list files.
You can run the help command to obtain the help information and display all
commands or a command format in the SFTP client view.
Precautions
If you specify no parameter when running the help command, all commands in
the SFTP client view 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
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> help get
get Remote file name STRING<1-64> [Local file name STRING<1-64>] Download file
Default local file name is the same with remote file.
Related Topics
3.11.62 sftp
3.11.37 lcd
Function
The lcd command displays and changes the local working directory of the FTP
client in the FTP client view.
Format
lcd [ local-directory ]
Parameters
Parameter Description Value
local-directory Specifies the local working The value is a string of 1 to 64
directory of the FTP client. case-insensitive characters without
spaces.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the lcd command to display the local working directory of the FTP
client when uploading or downloading files, and set the upload or download path
to the path of the local working directory.
Precautions
The lcd command displays the local working directory of the FTP client, while the
pwd command displays the working directory of the FTP server. If you specify the
parameter local-directory in the lcd command, you can directly change the local
working directory in the FTP client view.
Example
# Change the local working directory to flash:/test.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] lcd
The current local directory is flash:.
[Huawei-ftp] lcd flash:/test
The current local directory is flash:/test.
Related Topics
3.11.47 pwd (FTP client view)
Function
The mkdir command creates a directory on the remote FTP server.
Format
mkdir remote-directory
Parameters
Parameter Description Value
remote- Specifies the The value is a string of case-insensitive
directory directory to be characters without spaces. The absolute
created. path length ranges from 1 to 64, while the
directory name length ranges from 1 to 15.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
● You can run the mkdir command to create a subdirectory in a specified
directory, and the subdirectory name must be unique.
● If no path is specified when you create a subdirectory, the subdirectory is
created in the current directory.
● The created directory is stored on the FTP server.
Example
# Create a directory test on the remote FTP server.
<Huawei> ftp 172.16.104.110
Trying 172.16.104.110 ...
Press CTRL+K to abort
Connected to 172.16.104.110.
220 FTP service ready.
User(172.16.104.110:(none)):huawei
331 Password required for huawei
Enter password:
230 User logged in.
[Huawei-ftp] mkdir test
257 "test" new directory created.
Related Topics
3.11.14 dir/ls (FTP client view)
3.11.56 rmdir (FTP client view)
Format
mkdir remote-directory
Parameters
Parameter Description Value
remote- Specifies the The value is a string of case-insensitive
directory directory to be characters without spaces. The absolute
created. path length ranges from 1 to 64, while the
directory name length ranges from 1 to 15.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
● You can run the mkdir command to create a subdirectory in a specified
directory, and the subdirectory name must be unique.
● If no path is specified when you create a subdirectory, the subdirectory is
created in the current directory.
● The created directory is stored on the SFTP server.
● After a directory is created, you can run the dir/ls (SFTP client view)
command to view the directory.
Example
# Create a directory on the SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201 ...
Enter password:
sftp-client> mkdir ssh
Info: Succeeded in creating a directory.
Related Topics
3.11.15 dir/ls (SFTP client view)
3.11.58 rmdir (SFTP client view)
Format
mkdir directory
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The following describes the drive name.
● drive is the storage device and is named as follows:
– sd1: root directory of the Micro SD card on the master SRU.
– flash: root directory of the flash memory on the master SRU.
– slave#sd1: root directory of the Micro SD card on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
– slave#flash: root directory of the flash memory on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
Precautions
Example
# Create the subdirectory new in the flash card.
<Huawei> mkdir flash:/new
Info: Create directory flash:/new......Done
Related Topics
3.11.13 dir (user view)
3.11.41 more
Function
The more command displays the content of a specified file.
Format
more [ /binary ] filename [ offset ] [ all ]
Parameters
offset Specifies the file The value is an integer that ranges from 0 to
offset. 2147483647, in bytes.
all Displays all the file -
content on one
screen.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the more command to display the file content directly on a device.
● The following describes the drive name.
– drive is the storage device and is named as follows:
▪ 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
#----------------------------------------------------------------------------------
3.11.42 move
Function
The move command moves the source file from a specified directory to a
destination directory.
Format
move source-filename destination-filename
Parameters
Parameter Description Settings
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
Precautions
● If the destination file has the same name as an existing file, the system
prompts you whether to overwrite the existing file. The system prompt is
displayed only when file prompt is set to alert.
● This command cannot be used to move files between storage devices.
● The move and copy commands have different effects:
– The move command moves the source file to the destination directory.
– The copy command copies the source file to the destination directory.
Example
# Move a file from flash:/test/sample.txt to flash:/sample.txt.
<Huawei> move flash:/test/sample.txt flash:/sample.txt
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.
Related Topics
3.11.10 copy
3.11.43 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
Parameter Description Value
-a source-ip- Specifies the source IP address for -
address connecting to the FTP client. You
are advised to use the loopback
interface IP address.
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.
public-net Specifies the FTP server on the -
public network.
You must set the public-net
parameter when the FTP server IP
address is a public network IP
address.
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.
– 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 the port number that the FTP server uses is non-standard, you must specify
a standard port number; otherwise, the FTP server and client cannot be
connected.
● When you run the open command, the system prompts you to enter the user
name and password for logging in to the FTP server. You can log in to the FTP
client and enter the FTP client view if the user name and password are
correct.
Example
# Connect the FTP client with the FTP server whose IP address is 10.137.217.204.
<Huawei> ftp
[Huawei-ftp] open 10.137.217.204
Trying 10.137.217.204 ...
Press CTRL+K to abort
Connected to 10.137.217.204.
220 FTP service ready.
User(10.137.217.204:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp]
# Connect the FTP client with the FTP server whose IP address is 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]
Related Topics
3.11.26 ftp
3.11.16 disconnect
3.11.44 passive
Function
The passive command sets the data transmission mode to passive.
The undo passive command sets the data transmission mode to active.
Format
passive
undo passive
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
The device supports the active and passive data transmission modes. In active
mode, the server initiates a connection request, and the client and server need to
enable and monitor a port to establish a connection. In passive mode, the client
initiates a connection request, and only the server needs to monitor the
corresponding port. This command is used together with the firewall function.
When the client is configured with the firewall function, FTP connections are
restricted between internal clients and external FTP servers if the FTP transmission
mode is active. If the FTP transmission mode is passive, FTP connections between
internal clients and external FTP servers are not restricted.
Example
# Set the data transmission mode to passive.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] passive
Info: Succeeded in switching passive on.
Function
The put command uploads a local file to the remote FTP server.
Format
put local-filename [ remote-filename ]
Parameters
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the put command to upload a local file to the remote FTP server for
further check and backup. For example, you can upload the local log file to the
FTP server for other users to check, and upload the configuration file to the FTP
server as a backup before upgrading the device.
Precautions
● If the file name is not specified on the remote FTP server, the local file name
is used.
● If the name of the uploaded file is the same as that of an existing file on the
FTP server, the system overwrites the existing file.
Example
# Upload the configuration file vrpcfg.zip to the remote FTP server as a backup,
and save it as backup.zip.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] put vrpcfg.zip backup.zip
200 Port command successful.
150 Opening BINARY mode data connection for file transfer.
226 Transfer complete
FTP: 1098 byte(s) sent in 0.131 second(s) 8.38Kbyte(s)/sec.
Related Topics
3.11.35 get (FTP client view)
Format
put local-filename [ remote-filename ]
Parameters
Parameter Description Value
local-filename Specifies a local file The value is a case-insensitive
name on the SFTP client. character string without spaces. The
file name (including the absolute
path) contains 1 to 64 characters.
remote- Specifies the name of the The value is a case-insensitive
filename file uploaded to the character string without spaces. The
remote SFTP server. file name (including the absolute
path) contains 1 to 64 characters.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
This command enables you to upload files from the local device to a remote SFTP
server to view the file contents or back up the files. For example, you can upload
log files of a device to an SFTP server and view the logs in the server. During an
upgrade, you can upload the configuration file of the device to the SFTP server for
backup.
Precautions
● If remote-filename is not specified, the uploaded file is saved on the remote
SFTP server with the original file name.
● If the specified remote-filename is the same as an existing file name on the
SFTP server, the uploaded file overwrites the existing file on the server.
Example
# Upload a file to the SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201 ...
Enter password:
sftp-client> put wm.cfg
local file: wm.cfg ---> Remote file: /wm.cfg
Info: Uploading file successfully ended.
Related Topics
3.11.34 get (SFTP client view)
Function
The pwd command displays the FTP client's working directory on the remote FTP
server.
Format
pwd
Parameters
None
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
After logging in to the FTP server, you can run the pwd command to display the
FTP client's working directory on the remote FTP server.
If the displayed working directory is incorrect, you can run the cd command to
change the FTP client's working directory on the remote FTP server.
Example
# Display the FTP client's working directory on the remote FTP server.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] pwd
257 "/" is current directory.
Related Topics
3.11.26 ftp
Function
The pwd command displays the SFTP client's working directory on the remote FTP
server.
Format
pwd
Parameters
None
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
After logging in to the SFTP server, you can run the pwd command to display the
SFTP client's working directory on the remote SFTP server.
If the displayed working directory is incorrect, you can run the cd command to
change the SFTP client's working directory on the remote SFTP server.
Example
# Display the SFTP client's working directory on the remote SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201 ...
Enter password:
sftp-client> pwd
/
sftp-client> cd test
Current directory is:
/test
sftp-client> pwd
/test
Related Topics
3.11.5 cd (SFTP client view)
Function
The pwd command displays the current working directory.
Format
pwd
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
You can run the pwd command in any directory to display the current working
directory. To change the current working directory, you can run the cd command.
Example
# Display the current working directory.
<Huawei> pwd
flash:/test
Related Topics
3.11.13 dir (user view)
3.11.6 cd (user view)
3.11.50 remotehelp
Function
The remotehelp command displays the help information about an FTP command
when the FTP client and server are connected.
Format
remotehelp [ command ]
Parameters
Parameter Description Value
command Specifies the FTP The value is a string of 1 to 16
command. characters.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
You can run the remotehelp command to display the help information about an
FTP command.
Example
# Display the syntax of the command cdup.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] remotehelp
214-The following commands are 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
Parameter Description Value
remote- Specifies the name of the file The value is a string of 1 to 64
filename to be deleted from the remote case-insensitive characters
SFTP server. without spaces.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
● You can configure a maximum of 10 file names in the command and separate
them using spaces and delete them at one time.
● If the file to be deleted is not in the current directory, you must specify the file
path.
Example
# Delete the file 3.txt from the server and backup1.txt from the test directory.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201 ...
Enter password:
sftp-client> remove 3.txt test/backup1.txt
Warning: Make sure to remove these files? [y/n][n]:y
Info: Succeeded in removing the file /3.txt.
Info: Succeeded in removing the file /test/backup1.txt.
Related Topics
3.11.15 dir/ls (SFTP client view)
Format
remove drive
Parameters
Parameter Description Value
drive Specifies the name of the storage The value can be usb0:, usb1:,
device to be removed. sd0:, or usbotg:.
Views
User view
Default Level
3: Management level
Usage Guidelines
You can run the remove command to safely remove a USB disk or an SD card
from the device to prevent files in the device from being damaged.
Example
# Remove the storage device USB0.
<Huawei> remove usb0:
…
Info: remove device usb0: successfully
Format
rename old-name new-name
Parameters
Parameter Description Value
old-name Specifies the name of a file The value is a string of 1 to 64 case-
or directory. insensitive characters without spaces.
Views
SFTP client view
Default Level
3: Management level
Usage Guidelines
You can run the rename command to rename a file or directory.
Example
# Rename the directory yourtest on the SFTP server.
<Huawei> system-view
[Huawei] sftp 10.137.217.201
Please input the username:admin
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201 ...
Enter password:
sftp-client> rename test/yourtest test/test
Warning: Rename /test/yourtest to /test/test? [y/n][n]:y
Info: Succeeded in renaming file.
sftp-client> cd test
Current directory is:
/test
sftp-client> dir
drwxrwxrwx 1 noone nogroup 0 Mar 29 22:44 .
drwxrwxrwx 1 noone nogroup 0 Mar 29 22:39 ..
drwxrwxrwx 1 noone nogroup 0 Mar 24 00:04 test
-rwxrwxrwx 1 noone nogroup 5736 Mar 24 18:38 backup.txt
Related Topics
3.11.51 remove (SFTP client view)
Format
rename old-name new-name
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:
– sd1: root directory of the Micro SD card on the master SRU.
– flash: root directory of the flash memory on the master SRU.
– slave#sd1: root directory of the Micro SD card on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
– slave#flash: root directory of the flash memory on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
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
Related Topics
3.11.49 pwd (user view)
Format
reset recycle-bin [ filename | devicename ]
Parameters
Parameter Description Value
filename Specifies the The value is a string of 1 to 64 case-insensitive
name of a file to characters without spaces in the [ drive ]
be deleted. [ path ] file name format. When quotation
marks are used around the string, spaces are
allowed in the string.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
You are advised to add : and / between the
storage device name and directory. Characters ~,
*, /, \, :, ', " cannot be used in the directory
name.
The wildcard (*) character is supported.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If you run the delete command without specifying the /unreserved parameter,
the file is moved to the recycle bin and still occupies the memory. To free up the
space, you can run the reset recycle-bin command to permanently delete the file
from the recycle bin.
The following describes the drive name.
Example
# Delete the file test.txt that is moved to the recycle bin from the directory test.
<Huawei> reset recycle-bin flash:/test/test.txt
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.
Related Topics
3.11.12 delete (user view)
Format
rmdir remote-directory
Parameters
Parameter Description Value
remote- Specifies a directory or The value is a string of 1 to 64
directory path on the FTP server. case-insensitive characters
without spaces.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the rmdir command to delete a specified directory from the remote
FTP server.
Precautions
● Before running the rmdir command to delete a directory, you must delete all
files and subdirectories from the directory.
● If no path is specified when you delete a subdirectory, the subdirectory is
deleted from the current directory.
● The directory is deleted from the FTP server rather than the FTP client.
Example
# Delete the directory d:/temp1 from the remote FTP server.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] rmdir d:/temp1
250 'D:\temp1': directory removed.
Related Topics
3.11.14 dir/ls (FTP client view)
3.11.38 mkdir (FTP client view)
Format
rmdir directory
Parameters
Parameter Description Value
directory Specifies a The value is a string of case-insensitive characters
directory or in the [ drive ] [ path ] directory format. The
directory and its absolute path length ranges from 1 to 64, while
path. the directory name length ranges from 1 to 15.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
Characters such as ~, *, /, \, :, ', " cannot be used
in the directory name.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
The following describes the drive name.
● drive is the storage device and is named as follows:
– sd1: root directory of the Micro SD card on the master SRU.
– flash: root directory of the flash memory on the master SRU.
– slave#sd1: root directory of the Micro SD card on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
– slave#flash: root directory of the flash memory on the slave SRU. If the
device has no slave SRU, this drive is unavailable.
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!
Related Topics
3.11.40 mkdir (User view)
Format
rmdir remote-directory &<1-10>
Parameters
Parameter Description Value
remote- Specifies the name of a file The value is a string of 1 to 64
directory on the SFTP server. case-insensitive characters
without spaces.
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> rmdir 1 test/2
Warning: Make sure to remove these directories? [Y/N]:y
Info: Succeeded in removing the directory /test/1.
Info: Succeeded in removing the directory /test/test/2.
Related Topics
3.11.51 remove (SFTP client view)
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:/
Function
The set default tftp-directory command configures a working directory for the
TFTP server.
The undo set default tftp-directory command deletes the working directory of
the TFTP server.
Format
set default tftp-directory directory
Parameters
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:
Related Topics
3.11.68 tftp server enable
Format
set net-manager vpn-instance vpn-instance-name
undo set net-manager vpn-instance
Parameters
Parameter Description Value
vpn-instance- Specifies the name of The value is a string of 1 to 31 case-
name the default VPN sensitive characters, spaces not
instance. supported. When double quotation
marks are used around the string, spaces
are allowed in the string.
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
● Before running the set net-manager vpn-instance command, you must
create VPN instances.
● After running this command, you can successfully run file transfer commands
that you have configured based on the FTP, SFTP commands 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 v1.
<Huawei> system-view
[Huawei] set net-manager vpn-instance v1
Related Topics
3.11.26 ftp
3.11.62 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.
Parameters
Parameter Description Value
ipv6 Specifies an IPv6 address. -
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
SFTP is short for SSH FTP that is a secure FTP protocol. SFTP is on the basis of
SSH. It ensures that users can log in to a remote device securely for file
management and transmission, and enhances the security in data transmission. In
addition, you can log in to a remote SSH server from the device that functions as
an SFTP client.
When the connection between the SFTP server and client fails, the SFTP client
must detect the fault in time and disconnect from the SFTP server. To ensure this,
before being connected to the server in SFTP mode, the client must be configured
with the interval and times for sending the keepalive packet when no packet is
received in reply. If the client receives no packet in reply within the specified
interval, the client sends the keepalive packet to the server again. If the maximum
number of times that the client sends keepalive packets exceeds the specified
value, the client releases the connection. By default, when no packet is received,
the function for sending keepalive packets is not enabled.
Precautions
● You can set the source IP address to the source or destination IP address in
the ACL rule when the -a or -i parameter is specified. This shields the IP
address differences and interface status impact, 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.
● 3DES, MD5, MD5_96, SHA1, and SHA1_96 encryption algorithm cannot
ensure security. AES128, AES128-CTR, AES192-CTR sha2_256, sha2_256_96 or
AES256-CTR encryption algorithm is recommended.
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>
Related Topics
3.11.64 sftp server enable
3.9.37 ssh server port
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 }
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the client uses the source IP address that the
router specifies to send packets. The source IP address must be configured for an
interface with stable performance. The loopback interface is recommended. Using
the loopback interface as the source interface simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, 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.
Related Topics
3.11.62 sftp
3.11.20 display sftp-client
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] sftp server enable
Info: Succeeded in starting the SFTP server.
Related Topics
3.11.62 sftp
3.11.65 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
-a source-ip- Specifies the source IP -
address address for connecting to the
TFTP client. You are advised
to use the loopback interface
IP address.
-i interface-type Specifies the source interface -
interface- used by the TFTP client to set
number up connections. It consists of
the interface type and
number. It is recommended
that you specify a loopback
interface.
The IP address configured for
this interface is the source IP
address for sending packets.
If no IP address is configured
for the source interface, the
TFTP connection cannot be
set up.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When upgrading the system, you can run the tftp command to upload an
important file to the TFTP server or download a system software to the local
device.
Precautions
● When you run the tftp command to upload a file to the TFTP server in TFTP
mode, files are transferred in binary mode by default. The tftp does not
support the ASCII mode for file transfer.
● After specifying a source IP address, you can use this IP address to
communicate with the server and implement packet filtering to ensure data
security.
● 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.
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
Related Topics
3.11.67 tftp-server acl
Format
tftp client-source { -a source-ip-address | -i interface-type interface-number }
undo tftp client-source
Parameters
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
If no source IP address is specified, the client uses the source IP address that the
router specifies to send packets. The source IP address must be configured for an
interface with stable performance. The loopback interface is recommended. Using
the loopback interface as the source interface simplifies the ACL rule and security
policy configuration. This shields the IP address differences and interface status
impact, 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.
Related Topics
3.11.65 tftp
3.11.21 display tftp-client
Function
The tftp-server acl command specifies the ACL number for the local device so
that the device can access TFTP servers with the same ACL number.
The undo tftp-server acl command deletes the ACL number from the local device.
Format
tftp-server acl acl-number
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
[Huawei-acl-basic-2000] rule permit source 10.10.10.1 0
[Huawei-acl-basic-2000] quit
[Huawei] tftp-server acl 2000
Related Topics
3.11.65 tftp
Format
tftp server enable
undo 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.
The TFTP protocol has security risks; therefore, SFTPv2 is recommended for file
management.
Prerequisite
The TFTP working directory has been configured by running the set default tftp-
directory directory command.
Example
# Enable the TFTP server function.
<Huawei> system-view
[Huawei] set default tftp-directory flash:
[Huawei] tftp server enable
Related Topics
3.11.60 set default tftp-directory
Function
The tftp server port command configures the port number of the TFTP server.
The undo tftp server port command restores the default port number of the TFTP
server.
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
Related Topics
3.11.68 tftp server enable
Function
The tftp server timeout command configures a packet timeout period for a TFTP
server.
The undo tftp server timeout command restores the default packet timeout
period for a TFTP server.
Format
tftp server timeout timeout-second
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
Related Topics
3.11.68 tftp server enable
3.11.71 undelete
Function
The undelete command restores a file that has been has been temporally deleted
and moved to the recycle bin.
Format
undelete { filename | devicename }
Parameters
Parameter Description Value
filename Specifies the The value is a string of 1 to 64 case-insensitive
name of a file to characters without spaces in the [ drive ]
be restored. [ path ] file name format. When quotation
marks are used around the string, spaces are
allowed in the string.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
You are advised to add : and / between the
storage device name and directory. Characters
~, *, /, \, :, ', " cannot be used in the directory
name.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the undelete command to restore a file that has been temporally
deleted and moved to the recycle bin. However, files that are permanently deleted
by running the delete or reset recycle-bin command with the /unreserved
parameter cannot be restored.
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.
Related Topics
3.11.12 delete (user view)
3.11.13 dir (user view)
3.11.24 file prompt
3.11.55 reset recycle-bin
3.11.72 unzip
Function
The unzip command decompresses a file.
Format
unzip source-filename destination-filename
Parameters
Parameter Description Value
source- Specifies the name The value is a string of 1 to 64 case-
filename of a source file to insensitive characters without spaces in the
be decompressed. [ drive ] [ path ] file name format. When
quotation marks are used around the string,
spaces are allowed in the string.
In the preceding parameter, drive specifies
the storage device name, and path specifies
the directory and subdirectory.
You are advised to add : and / between the
storage device name and directory. Characters
~, *, /, \, :, ', " cannot be used in the directory
name.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can decompress files, especially log files that are stored on the storage device
and run the more command to query the file.
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.
Related Topics
3.11.13 dir (user view)
3.11.49 pwd (user view)
3.11.73 user
Function
The user command changes the current FTP user when the local device is
connected to the FTP server.
Format
user user-name [ password ]
Parameters
Parameter Description Value
user-name Specifies the name of a The value is a string of 1 to 64 case-
login user. insensitive characters without space.
password Specifies the login The value is a string of 1 to 16 case-
password. sensitive characters without space, single
quotation mark, or question mark.
Views
FTP client view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can run the user command to change the current user on the FTP server.
Precautions
After you run the user command to change the current user, a new FTP
connection is set up, which is the same as that you specify in the ftp command.
Example
# Log in to the FTP server using the user name tom.
<Huawei> ftp 10.137.217.201
Trying 10.137.217.201 ...
Press CTRL+K to abort
Connected to 10.137.217.201.
220 FTP service ready.
User(10.137.217.201:(none)):huawei
331 Password required for huawei.
Enter password:
230 User logged in.
[Huawei-ftp] user tom
331 Password required for tom.
Enter password:
230 User logged in.
Related Topics
3.11.26 ftp
3.11.74 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 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.
Related Topics
3.11.35 get (FTP client view)
3.11.45 put (FTP client view)
3.11.75 zip
Function
The zip command compresses a file.
Format
zip source-filename destination-filename
Parameters
Parameter Description Value
source- Specifies the The value is a string of 1 to 64 case-insensitive
filename name of a characters without spaces in the [ drive ]
source file to be [ path ] file name format. When quotation
compressed. marks are used around the string, spaces are
allowed in the string.
In the preceding parameter, drive specifies the
storage device name, and path specifies the
directory and subdirectory.
You are advised to add : and / between the
storage device name and directory. Characters
~, *, /, \, :, ', " cannot be used in the directory
name.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
● selftest/ is a path relative to the current working directory and indicates the
selftest directory in the current working directory.
Precautions
● If the destination file path is specified while the file name is not specified, the
designation file name is the same as the source file name.
● The source file persists after being compressed.
● Directories cannot be compressed.
Example
# Compress file log.txt that is stored in the root directory and save it to the test
directory as file log.zip.
<Huawei> dir
Directory of flash:/
Related Topics
3.11.13 dir (user view)
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
Item Description
Item Description
Related Topics
3.12.2 autosave time
3.12.4 display autosave configuration
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
Related Topics
3.12.1 autosave interval
3.12.4 display autosave configuration
Format
compare configuration [ configuration-file [ current-line-number save-line-
number ] ]
Parameters
Parameter Description Value
configuration-file Specifies the name of the The value is a string of 5 to
configuration file to be 64 case-insensitive
compared with the current characters without spaces.
configurations.
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
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
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 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
Related Topics
3.12.16 save
Function
The display autosave configuration command displays the automatic save
parameters of the configuration data.
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.
● The frequent data save operation affects 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.
<Huawei> display autosave configuration
System autosave interval switch: on
Autosave interval: 120 minutes
Autosave type: configuration file
Item Description
Item Description
Related Topics
3.12.16 save
3.12.2 autosave time
3.12.1 autosave interval
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
configuration Specifies the The value is determined by
configuration-type configuration type. the current system
configurations. For example:
● system: system
configuration
● user-interface: user
interface configuration
● aaa: AAA configuration
● vpn-instance: VPN instance
configuration
● ...
configuration- Specifies a configuration The value is a string of 1 to
instance instance. 80 case-insensitive characters
without spaces.
controller Specifies a controller -
[ interface-type interface, for example, E1
[ interface- control interface.
number ] ]
interface [ interface- -
Specifies an interface
type [ interface-
type.
number ] ]
feature feature- Specifies the -
name configuration information
about the specified
feature.
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 Huawei AR Series Access
Routers 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
Related Topics
3.12.16 save
3.12.15 reset saved-configuration
3.12.8 display saved-configuration
Function
The display factory-configuration command displays the factory configuration of
the device.
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.
Factory settings of different devices may be different.
Example
# Display the factory configuration of the Router.
<Huawei> display factory-configuration
#
vlan 1
#
http server enable
http secure-server ssl-policy default_policy
http secure-server enable
#
ssl policy default_policy type server
pki-realm default
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %^%#5d~9:M^ipCfL\iB)EQd>3Uwe%^%#
local-user admin privilege level 15
local-user admin service-type http telnet
#
interface Vlanif1
ip address 192.168.1.1 255.255.255.0
#
user-interface con 0
user-interface vty 0
authentication-mode aaa
user privilege level 15
#
return
http secure-server ssl-policy The name of the server SSL policy applied to the
default_policy HTTPS server is default_policy.
ssl policy default_policy The name of the SSL policy is default_policy and
type server the type is server.
domain default The domain name is default. The device has two
default domains named default and
default_admin. The two domains can be
modified but cannot be deleted.
local-user admin password By default, the system has a local user whose
cipher %@ user name is admin and the user password is in
%@5d~9:M^ipCfL ciphertext.
\iB)EQd>3Uwe%@%@
local-user admin privilege The priority of the local user admin is 15.
level 15
Item Description
local-user admin service- The access types of the local user admin are
type http telnet HTTP and Telnet.
user-interface con 0 The user interface type is console and the relative
number is 0.
user-interface vty 0 The user interface type is VTY and the relative
number is 0.
Related Topics
3.12.7 display factory-configuration operate-mode
3.12.18 set factory-configuration
Format
display factory-configuration operate-mode
Parameters
None
Views
All views
Default Level
3: Management level
Usage Guidelines
None
Example
# Display the operation performed when the factory configuration is restored.
<Huawei> display factory-configuration operate-mode
OperaMode Reserved.
Item Description
Related Topics
3.12.6 display factory-configuration
Format
display saved-configuration [ last | time ]
Parameters
Parameter Description Value
last Displays the system configurations saved last time. -
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
[V200R009]
#
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
Related Topics
3.12.20 startup saved-configuration
3.12.15 reset saved-configuration
3.12.5 display current-configuration
3.12.10 display startup
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.
Related Topics
3.12.17 schedule reboot
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: sd1:/basicsoftware.cc
Next startup system software: sd1:/basicsoftware.cc
Backup system software for next startup: null
Startup saved-configuration file: sd1:/vrpcfg.zip
Next startup saved-configuration file: sd1:/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
SlaveBoard:
Startup system software: sd1:/basicsoftware.cc
Next startup system software: sd1:/basicsoftware.cc
Backup system software for next startup: null
Startup saved-configuration file: sd1:/vrpcfg.zip
Next startup saved-configuration file: sd1:/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, default 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.
Item Description
Related Topics
3.12.20 startup saved-configuration
3.12.21 startup system-software
3.12.23 startup patch
Format
display system { file-md5 | file-sha256 } filename
Parameters
Parameter Description Value
file-md5 Specifies the MD5 encryption mode. -
file-sha256 Specifies the SHA256 encryption -
mode.
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 ar3600.cc
<Huawei> system-view
[Huawei] display system file-md5 ar3600.cc
File Name:
ar3600.cc
MD5:
06d12eb350e428605e062a4392455dec
Related Topics
3.12.21 startup system-software
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
Related Topics
3.12.18 set factory-configuration
3.12.19 set factory-configuration operate-mode
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
Info: Successfully set factory config reset flag!
3.12.14 reboot
Function
The reboot command restarts the device.
Format
reboot [ fast ]
Parameters
Parameter Description Value
fast Fast restarts the device. In fast restart mode, the -
configuration file is not saved.
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
This command functions in the same way as a power recycle operation (power off
and then restart the device). The command enables you to restart the device
remotely.
● After the reboot command is run, 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.
● After this command is executed, the OSP daughter card on the AR161FW-P-
M5, AR169-P-M9, AR169RW-P-M9, or AR169W-P-M9 is not affected.
Example
# Restart the device.
<Huawei> reboot
Function
The reset saved-configuration command clears the next startup configuration
file and cancels the configuration file used for next startup.
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.
● Exercise caution when you run the reset saved-configuration command.
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.
Related Topics
3.12.16 save
3.12.5 display current-configuration
3.12.16 save
Function
The save command saves the configurations to the default directory.
Format
save [ all ] [ configuration-file ]
Parameters
Parameter Description Value
all Indicates that all configurations are -
saved, including the configurations
of the boards that are not running.
configuration-file Specifies the name of a The value is a string of 5
configuration file. to 64 case-insensitive
characters without
spaces.
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.
The save configuration-file command saves the current configuration to a specific
file on the storage device. Generally, running the save configuration-file command
does not affect the current startup configuration file. If the configuration file
specified by configuration-file has the same name with the current configuration
file and the default directory is used, running the save configuration-file
command is equivalent to running the save command.
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.
If you do not specify configuration-file when saving the configuration file for the
first time, the system asks you whether to save the configuration file as
vrpcfg.zip.
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.
● 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.
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
Related Topics
3.12.15 reset saved-configuration
3.12.5 display current-configuration
3.12.8 display saved-configuration
3.12.20 startup saved-configuration
Function
The schedule reboot command configures the scheduled restart of a device and
set the specific time when the device restarts or the delay time before the device
restarts.
The undo schedule reboot command disables the scheduled restart function.
Format
schedule reboot { at time | delay interval }
undo schedule reboot
Parameters
Parameter Description Value
at time Specifies the The format of time is hh:mm YYYY-MM-DD. The
device restart restart time must be later than the current device
time. time by less than 720 hours. YYYY-MM-DD
indicates year, month, and date and is optional.
● hh indicates hour and the value ranges from 0
to 23.
● mm indicates minute and the value ranges
from 0 to 59.
● YYYY indicates year and the value ranges from
2000 to 2099.
● MM indicates month and the value ranges
from 1 to 12.
● DD indicates date and the value ranges from 1
to 31.
delay Specifies the The format of interval is hh:mm or mm. The
interval delay time delay time must be no more than 720 hours.
before the ● In hh:mm, hh indicates hour and the value
device restarts. ranges from 0 to 720 and mm indicates
minute and the value ranges from 0 to 59.
● mm indicates minute and the value ranges
from 0 to 43200.
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
Example
# Configure the device to restart at 22:00.
<Huawei> schedule reboot at 22:00
Info:Reboot system at 22:00:00 2012/07/25(in 10 hours and 10 minutes) confirm?[Y
/N]:y
Related Topics
3.12.9 display schedule reboot
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
Follow-up Procedure
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!
Use the function that restores the factory configuration with caution. The user-
defined configuration will be lost when you restore factory configuration.
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!
Related Topics
3.12.19 set factory-configuration operate-mode
Function
The set factory-configuration operate-mode command sets the method for
restoring the factory configuration.
By default, the system reserves the previous configuration file when restoring the
factory configuration.
Format
set factory-configuration operate-mode { reserve-configuration | delete-
configuration }
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.
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 executing factory configur
ation,are you sure to set the operation mode?(Y/N)y
Successfully set factory operation mode
Related Topics
3.12.18 set factory-configuration
Function
The startup saved-configuration command specifies the system configuration file
for next startup.
Format
startup saved-configuration configuration-file [ slave-board | all ]
Only the AR3200 series supports the slave-board and all parameters.
Parameters
Parameter Description Value
configuration- Specifies the name of
file a configuration file. The value is a string of 1 to 64 case-
Make sure that the insensitive characters in the format of
file exists. [ drive-name ] [ file-name ]. It can
contain the following special characters:
[ ] @ ! # $ % ^ - = _ + { } , . : /. A string
containing digits, letters, and
underscores (_) is recommended. If
drive-name is not specified, the value is
the default storage medium name. The
maximum length of the entered file-
name is 64 minus the default storage
medium name.
NOTE
If the length of the entered configuration-file
is greater than 64, the system displays the
following information:
Error: The file name length is too long!
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 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
Related Topics
3.12.10 display startup
3.12.17 schedule reboot
3.12.14 reboot
Function
The startup system-software command specifies the system software for next
startup.
Format
startup system-software system-file [ slave-board | all ] [ verify | signature
sign-filename ]
● Only the AR3200 series supports the slave-board and all parameters.
● You cannot start the system software package in the system using an external hard disk.
Parameters
Parameter Description Value
system-file Specifies the name The value is a string of 1 to 64 case-
of the system insensitive characters in the format of
software file. [ drive-name ] [ file-name ]. It can contain
the following special characters: [ ] @ ! # $
% ^ - = _ + { } , . : /. A string containing
digits, letters, and underscores (_) is
recommended. If drive-name is not
specified, the value is the default storage
medium name. The maximum length of the
entered file-name is 64 minus the default
storage medium name.
NOTE
If the length of the entered configuration-file is
greater than 64, the system displays the following
information:
Error: The file name length is too long!
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
In system software upgrade or downgrade, run this command to specify the
system software for next startup.
Follow-up Procedure
Run the reboot or the schedule reboot command to restart the device.
Precautions
● The system software package must use .cc as the file name extension and be
saved to the root directory of the storage device.
The system software's digital signature file must use .asc as the file name
extension and be saved to the root directory of the storage device.
If a slave SRU has been specified by slave-board or the system software for all
SRUs has been specified by all, the device automatically copies the system
software from the master SRU to the slave SRU and you do not need to run the
copy source-filename destination-filename command. If the specified system
software already exists on the slave SRU, the device displays a message asking
whether you want to use the system software on the slave SRU. If not, the device
displays a message asking whether you want to overwrite the existing system
software. If the system software has been specified for next startup and cannot be
overwritten, the device will cancel the automatic copy operation.
If the storage space of the slave SRU for which the system software is specified
using the startup system-software command is insufficient, the device prompts
that a failure occurs.
If the device has dual SRUs, specify the system software for next startup on both
the master and slave SRUs.
The AR161G-L&AR161G-Lc&AR169G-L&AR169EGW-L support only the system
software upgrade. If the version of the system software specified for next startup
using the startup system-software command is earlier than the current system
software version, the system displays the following message:
Error: The version of the specified package file is too low.
Example
# Specify the system software to be loaded for next startup.
<Huawei> startup system-software basicsoft.cc
Related Topics
3.12.10 display startup
3.12.20 startup saved-configuration
3.12.17 schedule reboot
3.12.14 reboot
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
Related Topics
3.12.21 startup system-software
Function
The startup patch command specifies the patch file for next startup.
Format
startup patch patch-name [ slave-board | all ]
Only the AR3200&AR3600 series supports the slave-board and all parameters.
Parameters
Parameter Description Value
patch-name Specifies the name of The value is a string of 1 to 64 case-
the patch file for insensitive characters in the format of
next startup. [ drive-name ] [ file-name ]. It can contain
the following special characters: [ ] @ ! # $
% ^ - = _ + { } , . : /. A string containing
digits, letters, and underscores (_) is
recommended. If drive-name is not
specified, the value is the default storage
medium name. The maximum length of the
entered file-name is 64 minus the default
storage medium name.
NOTE
If the length of the entered configuration-file is
greater than 64, the system displays the following
information:
Error: The file name length is too long!
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
Related Topics
3.12.10 display startup
3.12.17 schedule reboot
3.12.14 reboot
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.
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 MPU.
<Huawei> display license
Active License on master board: flash:/MPGX-5DN5-CPKH-DX3M-UVXL.dat
Product name : AR
Product version : V200R005
License file ESN : 210235293410C1000850
License Serial No : LIC20120517000320
Creator : Huawei Technologies Co., Ltd.
Created Time : 2012-05-17 10:51:09
Country : China
Custom : Information Not Available
Office : null
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. Table 3-54 lists the mapping between authorized functions and
control items.
DSVPN AR100&AR120&AR150&AR160&AR200:
LAR0DSVPN01
AR1200: LAR0DSVPN02
AR2200: LAR0DSVPN03
AR3200: LAR0DSVPN04
XGE AR100&AR120&AR150&AR160&AR200:
LAR0XGE01
AR1200: LAR0XGE02
AR2200: LAR0XGE03
AR3200: LAR0XGE04
Example
# Display information about functions activated through commands.
<Huawei> display license accept agreement history
Active license Accept Agreement: yes
Control value :0
Maximum control value : 0
Item state : Disable, -
Item left time :-
Item used time :-
Description : LAR0CT00
Table 3-55 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.
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
Item Description
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 | ResourceUsage
Table 3-57 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.
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:
● Normal: normal license
● Demo: demonstration license
● Trial: trial license that has expired but is still valid during the trial period
● Emergency: emergency license
● Default: default license
This command helps you locate license problems and verify the license status on
the device.
Prerequisites
A license file has been stored on the main control board 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 MPU.
<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.
Item Description
Item Description
1 Service status.
● 1: enabled
● 0: disabled
Function
The display patch-information command displays information about the patch in
the current system.
Format
display patch-information
Parameters
None
Views
All views
Default Level
1: Monitoring level
Usage Guidelines
After a patch is loaded or deleted, run this command to view information about
the patch, including its version, name.
Example
# Display information about the patch in the current system.
<Huawei> display patch-information
Patch version :ARV200R009C00
Patch package name :flash:/patch_ar650.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.
Item Description
Related Topics
3.13.16 patch delete all
3.13.17 patch load
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:
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: sd1:/software.cc
Rollback saved-configuration file: sd1:/iascf_autobackup.zip
Rollback license file: null
Rollback patch package: null
Rollback voice-files: null
Item Description
Related Topics
3.13.18 rollback
Function
The license active command activates the license file saved in the storage of the
device.
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.
Format
license active accept agreement
undo 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.
Function
The license emergency command enables the emergency state for the license.
Format
license emergency
Parameters
None
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
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.
Related Topics
3.13.10 license active
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
The license resource command activates the license of a resource item.
Prerequisites
The ETU license has been activated using the license active accept agreement
command.
Precautions
● If the license active accept agreement command is not executed, an error
message is displayed.
● You do not need to activate the license that has been activated.
● After the license is activated, there is a trial period of 60 days. After the trial
period of 60 days, your use of the controlled function will be governed by
Huawei license agreement. You must purchase the license or stop using the
activated function after the trial period.
Example
# Activate the license of a resource item.
<Huawei> license resource cm 10
INFO: Succeeded in activating the feature.
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.
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.
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
Related Topics
3.13.10 license active
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.
Example
# Delete all patches.
<Huawei> patch delete all
Related Topics
3.13.8 display patch-information
Format
patch load filename all run
Parameters
Parameter Description Value
Views
User view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
When you load a patch to the current system, the system searches the patch
package for a matching patch file according to the attributes of the patch file.
● If a matching patch file is found in the patch package, the system loads the
patch.
● If no matching patch file is found in the patch package, the system does not
load any patch.
Prerequisites
The patch package has been uploaded to the root directory of the storage device.
Before loading a patch, the system must resolve the patch package, check the
validity of the patch files in the patch package, and obtain the attributes such as
the patch type and version of the patch file.
Precautions
The patch file cannot be reloaded. When you reload a patch, the system displays
an error message.
Example
# Load the patches to the patch area of the device and run the patches directly.
<Huawei> patch load patch.pat all run
Related Topics
3.13.16 patch delete all
3.12.23 startup patch
3.13.8 display patch-information
3.13.18 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
After rollback, active board will reboot automatically. Please check if data has
been saved
Are you sure to rollback? (y/n)[n]:y
Related Topics
3.13.9 display rollback state
Function
The set output slot command redirects LPU information to the SRU.
The undo set output slot command cancels redirection of LPU information to the
SRU.
Format
set output slot slot-id
Parameters
Parameter Description Value
slot-id Specifies the slot ID. The value varies with the
device configuration.
Views
System view
Default Level
3: Management level
Usage Guidelines
Usage Scenario
You can upgrade the system software through the BIOS menu of the SAE card.
Precautions
● You can run this command to redirect output information of the SAE card but
not other cards to the SRU.
● You can perform the redirection operation using only the Telnet provided by a
Windows operating system, Putty.
● The terminal modes supported include VTY100, Linux, and Xterm.
● When the message "Press <DEL> or <F2> to enter setup" is displayed on the
screen, you must press F2 to enter the BIOS page.
● The up, down, left, and right buttons on the keyboard are displayed as ^, V, <,
and > on the BIOS page.
● If you use the Hyper Terminal provided by the Windows operating system to
redirect output information, the device responses slowly because the default
transmission rate of a serial port is 9600 bit/s. You are advised to change the
rate to 115,200 bit/s and then establish a connection again.
Example
# Redirect output information about the SAE card to the SRU.
<Huawei> system-view
[Huawei] set output slot 2
******************************************************
* Slot 2 output to mainboard *
******************************************************
Press Ctrl+D to quit
● MPUs on the AR100, AR120, and AR3200 series routers support this command.
● MPUs on the AR161, AR161EW, AR161EW-M1, AR161G-L, AR161G-Lc, AR161G-U,
AR161W, AR169, AR169CVW, AR169CVW-4B4S, AR169EW, AR169EGW-L,
AR169FVW-8S, AR169G-L, AR169W-P-M9, and AR169RW-P-M9 among the AR160
series routers support this command.
● MPUs on the AR1220-8GE and AR1220C among the AR1200 series routers support this
command.
● MPUs on the AR2204E, AR2204E-D, AR2204-24GE, AR2204-27GE-P, AR2204-51GE,
AR2204-51GE-P, and AR2204-51GE-R among the AR2200 series routers support this
command.
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, 24ES2GP, 4ES2G-S, 4ES2GP-S, 1GEC, 4GECS, 2X10GL, 3G-HSPA+7, 3G-
EVDO, 1LTE-L, 1LTE-LV, 1LTEC, 1LTE-Lt, 1LTE-Lo, 1LTE-Lc, 1STM1, 1STM4, 4STM1,
16FXS, 32FXS, 1GBIS4W, 1NDE, SMXH, 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
<Huawei> upgrade slot 1 startup bootrom
Warning: You can not reset, remove, or power off the board when upgrade is being
performed, are you sure to continue?[Y/N]:y
Info: Please waiting..
Info: Online upgrade slot <1>, item <BootRom>, ok.
Info: Please reset the board in slot 1 to take effect.
Warning: The operation will reset the board in slot 1. Continue? [y/
n]:n