Huawei AR Series Access Routers - V200R009 - CLI-based Configuration Guide - Basic Configuration
Huawei AR Series Access Routers - V200R009 - CLI-based Configuration Guide - Basic Configuration
V200R009
Issue 09
Date 2021-03-01
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and
the customer. All or part of the products, services and features described in this document may not be
within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,
information, and recommendations in this document are provided "AS IS" without warranties, guarantees
or representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
Website: https://e.huawei.com
Intended Audience
This document provides the basic concepts, configuration procedures, and
configuration examples in different application scenarios of the Basic
configuration supported by the device.
Symbol Conventions
The symbols that may be found in this document are defined as follows.
Symbol Description
Symbol Description
Command Conventions
The command conventions that may be found in this document are defined as
follows.
Convention Description
Security Conventions
● Password setting
– When configuring a password, the cipher text is recommended. To ensure
device security, change the password periodically.
– When you configure a password in plain text that starts and ends with
%@%@, @%@%, %#%#, or %^%# (the password can be decrypted by
the device), the password is displayed in the same manner as the
configured one in the configuration file. Do not use this setting.
– When you configure a password in cipher text, different features cannot
use the same cipher-text password. For example, the cipher-text password
set for the AAA feature cannot be used for other features.
● Encryption algorithm
Currently, the device uses the following encryption algorithms: 3DES, AES,
RSA, SHA1, SHA2, and MD5. 3DES, RSA and AES are reversible, while SHA1,
SHA2, and MD5 are irreversible. The encryption algorithms DES, 3DES, RSA
(RSA-1024 or lower), MD5 (in digital signature scenarios and password
encryption), and SHA1 (in digital signature scenarios) have a low security,
which may bring security risks. If protocols allowed, using more secure
encryption algorithms, such as AES, RSA (RSA-2048 or higher), SHA2, and
HMAC-SHA2, is recommended. The encryption algorithm depends on actual
networking. The irreversible encryption algorithm must be used for the
administrator password, SHA2 is recommended.
● Personal data
Some personal data may be obtained or used during operation or fault
location of your purchased products, services, features, so you have an
obligation to make privacy policies and take measures according to the
applicable law of the country to protect personal data.
● The terms mirrored port, port mirroring, traffic mirroring, and mirroring in this
manual are mentioned only to describe the product's function of
communication error or failure detection, and do not involve collection or
processing of any personal information or communication data of users.
Declaration
● This manual is only a reference for you to configure your devices. The
contents in the manual, such as web pages, command line syntax, and
command outputs, are based on the device conditions in the lab. The manual
provides instructions for general scenarios, but do not cover all usage
scenarios of all product models. The contents in the manual may be different
from your actual device situations due to the differences in software versions,
models, and configuration files. The manual will not list every possible
difference. You should configure your devices according to actual situations.
● The specifications provided in this manual are tested in lab environment (for
example, the tested device has been installed with a certain type of boards or
only one protocol is run on the device). Results may differ from the listed
specifications when you attempt to obtain the maximum values with multiple
functions enabled on the device.
● In this document, public IP addresses may be used in feature introduction and
configuration examples and are for reference only unless otherwise specified.
● In this document, AR series access routers include
AR100&AR120&AR150&AR160&AR200&AR1200&AR2200&AR3200&AR3600
Series.
Change History
Changes between document issues are cumulative. Therefore, the latest document
version contains all updates made to previous versions.
Contents
2 Auto-Config Configuration................................................................................................. 21
2.1 Overview of Auto-Config................................................................................................................................................... 22
2.2 Understanding Auto-Config.............................................................................................................................................. 22
2.2.1 Auto-Config Fundamentals............................................................................................................................................ 22
2.2.2 Working Process of Auto-Config.................................................................................................................................. 23
2.2.3 Option Parameters............................................................................................................................................................ 26
2.2.4 Intermediate File................................................................................................................................................................30
2.3 Application Scenarios for Auto-Config.......................................................................................................................... 30
2.4 Licensing Requirements and Limitations for Auto-Config...................................................................................... 32
2.5 Default Settings for Auto-Config.....................................................................................................................................33
2.6 Configuring Auto-Config on Devices that are on the Same Network Segment with the DHCP Server
............................................................................................................................................................................................................ 34
3 Auto-Start Configuration.................................................................................................... 61
3.1 Overview of Auto-Start....................................................................................................................................................... 61
3.2 Application Scenarios for Auto-Start............................................................................................................................. 62
3.3 Understanding Auto-Start................................................................................................................................................. 63
3.4 Licensing Requirements and Limitations for Auto-Start......................................................................................... 66
3.5 Default Settings for Auto-Start........................................................................................................................................ 66
3.6 Configuring Auto-Start....................................................................................................................................................... 66
3.6.1 Making the Intermediate File........................................................................................................................................67
3.6.2 Configuring the File Server............................................................................................................................................ 68
3.6.3 Configuring Auto-Start On a Device...........................................................................................................................69
3.7 Maintaining Auto-Start....................................................................................................................................................... 70
3.8 Configuration Examples for Auto-Start.........................................................................................................................71
3.8.1 Example for Configuring Auto-Start........................................................................................................................... 71
9.4.1 (Optional) Configuring Attributes for the Console User Interface................................................................ 198
9.4.2 Configuring an Authentication Mode for the Console User Interface..........................................................200
9.4.3 Configuring a User Level for the Console User Interface..................................................................................202
9.4.4 Logging In to a Device Through the Console Port.............................................................................................. 203
9.5 Configuring Login Through the Mini USB Port........................................................................................................ 206
9.5.1 (Optional) Configuring Attributes for the Console User Interface................................................................ 206
9.5.2 Configuring an Authentication Mode for the Console User Interface..........................................................208
9.5.3 Configuring a User Level for the Console User Interface..................................................................................209
9.5.4 Logging In to a Device Through the Mini USB Port........................................................................................... 210
9.6 Configuring Telnet Login................................................................................................................................................. 213
9.6.1 (Optional) Configuring Attributes for a VTY User Interface............................................................................ 213
9.6.2 Configuring an Authentication Mode for a VTY User Interface..................................................................... 214
9.6.3 Configuring a User Level for a VTY User Interface............................................................................................. 216
9.6.4 Enabling the Telnet Server Function........................................................................................................................ 217
9.6.5 Logging In to a Device Through Telnet................................................................................................................... 219
9.6.6 (Optional) Using Telnet to Log In to Another Device From the Local Device...........................................220
9.7 Configuring STelnet Login............................................................................................................................................... 221
9.7.1 (Optional) Configuring Attributes for a VTY User Interface............................................................................ 221
9.7.2 Configuring an Authentication Mode for a VTY User Interface..................................................................... 223
9.7.3 Configuring a User Level for a VTY User Interface............................................................................................. 224
9.7.4 Configuring an SSH User.............................................................................................................................................. 225
9.7.5 Enabling the SSH Server Function............................................................................................................................ 227
9.7.6 Logging In to a Device Through STelnet.................................................................................................................230
9.7.7 (Optional) Using STelnet to Log In to Another Device from the Local Device......................................... 232
9.8 Configuring the Redirection Function for Device Login........................................................................................ 235
9.8.1 (Optional) Configuring an Authentication Mode for TTY User Interface................................................... 235
9.8.2 Logging In to a Device Through Redirection......................................................................................................... 236
9.9 Configuring Reverse Telnet Login................................................................................................................................. 240
9.9.1 Configuring an Authentication Mode for the Console or TTY User Interface........................................... 241
9.9.2 Logging In to a Device Through Reverse Telnet (Direct Connection Through an Asynchronous Cable)
......................................................................................................................................................................................................... 242
9.9.3 Configuring Reverse Telnet Login (Direct Connection Through a Console Cable).................................. 244
9.10 Typical Operations After Login.................................................................................................................................... 245
9.11 Configuration Examples for CLI Login...................................................................................................................... 247
9.11.1 Example for Logging In to the Device Through a Console Port...................................................................247
9.11.2 Example for Configuring a Security Policy to Limit Telnet Login................................................................ 249
9.11.3 Example for Logging In to the Device Through STelnet................................................................................. 251
9.11.4 Example for Configuring the Device as the Telnet Client to Log In to Another Device.......................261
9.11.5 Example for Configuring the Device as the STelnet Client to Log In to Another Device.................... 263
9.11.6 Example for Logging In to Another Device Through Redirection................................................................ 269
9.11.7 Example for Configuring an NMS to Communicate with a Device by SSH over a VPN......................271
9.12 Troubleshooting CLI Login............................................................................................................................................ 276
9.12.1 Failing to Log In Through the Console Port........................................................................................................ 276
11.4.3 Managing Files When the Device Functions as an FTP Server..................................................................... 314
11.4.4 Managing Files When the Device Functions as an SFTP Server...................................................................321
11.5 File Management on Other Devices..........................................................................................................................333
11.5.1 Managing Files When the Device Functions as a TFTP Client...................................................................... 333
11.5.2 Managing Files When the Device Functions as an FTP Client...................................................................... 336
11.5.3 Managing Files When the Device Functions as an SFTP Client................................................................... 342
11.6 Configuration Examples for File Management......................................................................................................349
11.6.1 Example of Logging In to the Device to Manage Files................................................................................... 349
11.6.2 Example for Managing Files When the Device Functions as a TFTP Server............................................ 350
11.6.3 Example for Managing Files When the Device Functions as an FTP Server............................................ 352
11.6.4 Example for Managing Files Using SFTP When the Device Functions as an SSH Server....................354
11.6.5 Example for Managing Files When the Device Functions as a TFTP Client............................................. 357
11.6.6 Example for Managing Files When the Device Functions as an FTP Client.............................................358
11.6.7 Example for Managing Files When the Device Functions as an SFTP Client.......................................... 359
11.7 Troubleshooting System Startup.................................................................................................................................364
11.7.1 FTP Login Failure.......................................................................................................................................................... 364
11.7.2 Failure in Uploading Files to the FTP Server....................................................................................................... 366
11.8 FAQ About File Management...................................................................................................................................... 367
11.8.1 Does an AR Router Support Resumable FTP Download?............................................................................... 367
11.8.2 How Many FTP Users Can Log In to a Router Simultaneously?.................................................................. 367
11.8.3 Why Does the Available Space on a Storage Medium Not Change After a File Is Deleted?.............368
1 Overview of CLIs
Licensing Requirements
CLI overview function is a basic feature of a router and is not under license
control.
Feature Limitations
None
User view When a user logs in to In the user view, you can
the device, the user view the running status
enters the user view and and statistics of the
the following prompt is device.
displayed:
<Huawei>
The command line prompt Huawei is the default host name (sysname). The
prompt indicates the current view. For example, <> indicates the user view and []
indicates all other views except the user view.
NOTE
● Some commands can be executed in multiple views, but they have different functions
after being executed in different views. For example, you can run the lldp enable
command in the system view to enable LLDP globally and in the interface view to
enable LLDP on an interface.
● In the system view, you can run the diagnose command to enter the diagnostic view.
Diagnostic commands are used for device fault diagnosis. If you run some commands in
the diagnostic view, the device may fail to run properly or services may be interrupted.
Contact technical support personnel and use these diagnostic commands with caution.
[Huawei-aaa] quit
[Huawei] quit
<Huawei>
To return from the AAA view directly to the user view, press Ctrl+Z or run the
return command.
# Press Ctrl+Z to return directly to the user view.
[Huawei-aaa] // Enter Ctrl+Z
<Huawei>
Context
● The system grants users different access permissions based on their roles.
User levels are classified into sixteen levels, which correspond to the
command levels. Users can use only the commands at the same or lower level
than their own levels. By default, there are four command levels 0 to 3 and
sixteen user levels 0 to 15. Table 1-1 describes the relationship between
command levels and user levels.
NOTICE
Changing the default command level without the guidance of technical personnel
is not recommended. This may result in inconvenience for operation and
maintenance and bring about security problems.
Procedure
Step 1 Run system-view
You can perform this step to check the view of the command whose level needs to
be changed.
----End
Editing Feature
You can edit commands in a CLI that supports multi-line edition. Each command
can contain a maximum of 510 characters. The keywords in the commands are
case insensitive. Whether a command parameter is case sensitive or not depends
on what the parameter is.
Table 1-2 lists keys that are frequently used for command editing.
Key Function
Backspace Deletes the character on the left of the cursor and the
cursor moves to the left. When the cursor reaches the
head of the command, an alarm is generated.
Left cursor key ← or Moves the cursor to the left by the space of a
Ctrl+B character. When the cursor reaches the head of the
command, an alarm is generated.
Right cursor key → or Moves the cursor to the right by the space of a
Ctrl+F character. When the cursor reaches the end of the
command, an alarm is generated.
Operating Techniques
Incomplete Keyword
You can enter incomplete keywords on the device. In the current view, you do not
need to enter complete keywords if the entered characters can match a unique
keyword. This function improves operating efficiency.
For example, to execute the display current-configuration command, you can
enter d cu, di cu, or dis cu, but you cannot enter d c or dis c because they do not
match unique keywords.
NOTICE
Tab
Enter an incomplete keyword and press Tab to complete the keyword.
● When a unique keyword matches the input, the system replaces the
incomplete input with the unique keyword and displays it in a new line with
the cursor leaving a space behind. For example:
a. Enter an incomplete keyword.
[Huawei] info-
b. Press Tab.
The system replaces the entered keyword and displays it in a new line
with the complete keyword followed by a space.
[Huawei] info-center
● When the input has multiple matches, press Tab repeatedly to display the
keywords beginning with the incomplete input in a circle until the desired
keyword is displayed. In this case, the cursor closely follows the end of the
keyword. For example:
a. Enter an incomplete keyword.
[Huawei] info-center log
b. Press Tab.
The system displays the prefixes of all the matched keywords. In this
example, the prefix is log.
[Huawei] info-center logbuffer
Press Tab to switch from one matched keyword to another. In this case,
the cursor closely follows the end of a word.
[Huawei] info-center logfile
[Huawei] info-center loghost
b. Press Tab.
[Huawei] info-center loglog
The system displays information in a new line, but the keyword loglog
remains unchanged and there is no space between the cursor and the
keyword, indicating that this keyword does not exist.
Full Help
When entering a command, you can use the full help function to obtain keywords
and parameters for the command. Use any of the following methods to obtain full
help from a command line.
● Enter a question mark (?) in any command view to obtain all the commands
and their simple descriptions. For example:
<Huawei> ?
User view commands:
arp-ping ARP-ping
autosave <Group> autosave command group
backup Backup information
cd Change current directory
clear Clear
clock Specify the system clock
cls Clear screen
compare Compare configuration file
Partial Help
If you enter only the first or first several characters of a command keyword, partial
help provides keywords that begin with this character or character string. Use any
of the following methods to obtain partial help from a command line.
● Enter a character string followed directly by a question mark (?) to display all
keywords that begin with this character string. For example:
<Huawei> d?
debugging <Group> debugging command group
delete Delete a file
dialer Dialer
dir List files on a filesystem
display Display information
<Huawei> d
● Enter the first several letters of a keyword in a command and press Tab to
display a complete keyword. The first several letters, however, must uniquely
identify the keyword. If they do not identify a specific keyword, press Tab
continuously to display different keywords and you can select one as required.
NOTE
The command output obtained through the online help function is used for reference only.
Log out of the terminal and re-log in. A message "Hello, Welcome to
Huawei!" is displayed before authentication. Run the undo header login
command.
Hello,Welcome to Huawei!
Login authentication
Password:
<Huawei> system-view
[Huawei] undo header login
Log out of the terminal and re-log in. No message is displayed before
authentication.
Login authentication
Password:
<Huawei>
NOTE
The command output provided here is used for reference only. The actual output
information may differ from the preceding information.
By default, the system saves 10 history commands for each user. Run the history-
command max-size size-value command to reset the number of history
commands that can be saved in a specified user interface view. The maximum
number is 256.
NOTE
Display the later Down arrow key ↓ or Ctrl+N A later history command
history command. is displayed. If the
current command is the
latest command, no
output is displayed and
an alarm is generated
when you attempt to
display the later history
command.
NOTE
The terminal in use may affect the functions of the shortcut keys. For example, if the
shortcut keys defined by the terminal conflict with those defined in the system, the shortcut
keys entered by the user are captured by the terminal program and the commands
corresponding to the shortcut keys are not executed.
The system supports four user-defined shortcut keys and the default values are as
follows:
● Ctrl+G: display current-configuration
● Ctrl+L: undo idle-timeout
● Ctrl+O: undo debugging all
● Ctrl+U: Null
NOTE
● When defining shortcut keys, use double quotation marks to define the command if this
command contains several keywords separated by spaces. For example, hotkey ctrl_l
"display tcp status". Do not use double quotation marks to define a command if the
command contains only one keyword.
● Run the display hotkey command to view the status of the defined, undefined, and
system-defined shortcut keys.
● Run the undo hotkey command to restore default values of the configured shortcut
keys.
● Shortcut keys are executed in the same way as commands. The system can record
commands in their original formats in the command buffer and logs to help query and
locate the fault.
● The user-defined shortcut keys are available to all users. If a user does not have the
rights to use the command defined by a shortcut key, the system displays an error
message when this shortcut key is executed.
Key Function
Key Function
Procedure
● Configure assistant tasks to automatically run commands in a batch at
scheduled time.
You can configure one or more scheduled tasks to realize automatic O&M.
The device can then run one or a group of commands at specified time or
after a certain delay. Assistant tasks enable the device to complete specified
operations or configuration without human intervention. Assistant tasks are
usually used for scheduled upgrading or configuration.
By default, the commands listed in the batch file are executed in the system view.
e. Run the display assistant task history [ task-name ] command to view
the operation records of task assistants.
----End
For example, after all configurations of the FTP service are complete, you can run
the display ftp-server command to check parameters of the FTP server. For
details on the usage and functions of the display command, see Checking the
Configuration in each feature of the Configuration Guide.
You can also verify the current running configurations and configurations in the
current view.
● Verify the current running configurations:
display current-configuration
This command does not display parameters that use default settings.
● Verify configurations in the current view:
display this
This command does not display parameters that use default settings.
NOTE
When a user runs the display this command to check configuration information, other
users can run this same command only after all the command output is displayed.
Context
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.
Procedure
Step 1 Run the system-view command to enter the system view.
Step 2 Run the command-privilege level level view view-name command-key command
to specify the level of the display current-configuration command.
Step 3 Run the set current-configuration display [ all ] level level command-key
command to specify the configuration that a user of a specified level can view.
----End
Regular Expressions
A regular expression is a mode matching tool. It consists of common characters
(such as letters) and special characters (called meta-characters). The regular
expression is a template according to which you can search for the required string.
A regular expression provides the following functions:
● Searches for and obtains a sub-string that matches a rule in the string.
● Substitutes a string based on a certain matching rule.
The regular expression consists of common characters and special characters.
● Common characters
Common characters are used to match themselves in a string, including all
upper-case and lower-case letters, digits, punctuations, and special symbols.
For example, a matches the letter "a" in "abc", 10 matches the digit "10" in
"10.113.25.155", and @ matches the symbol "@" in "[email protected]".
● Special characters
Special characters are used together with common characters to match the
complex or special string combination. Table 1-7 describes special characters
and their syntax.
NOTE
Unless otherwise specified, all the characters in the preceding table must be printable
characters.
● Degeneration of special characters
Certain special characters, when placed at certain positions in a regular
expression, degenerate to common characters.
– The special characters following "\" match special characters themselves.
– The special characters "*", "?", and "+" are placed at the starting position
of the regular expression. For example, +45 matches "+45" and abc(*def)
matches "abc*def".
– The special character "^" is placed at any position except for the start of
the regular expression. For example, abc^ matches "abc^".
– The special character "$" is placed at any position except for the end of
the regular expression. For example, 12$2 matches "12$2".
– A right parenthesis ")" or right bracket "]" is not paired with a
corresponding left parenthesis "(" or bracket "[". For example, abc)
matches "abc)" and 0-9] matches "0-9]".
NOTE
Unless otherwise specified, degeneration rules also apply when the preceding regular
expressions are subexpressions within parentheses.
● Combination of common and special characters
In actual usage, regular expressions combine multiple common and special
characters to match certain strings.
● The device uses a regular expression to implement the pipe character filtering function.
A display command supports the pipe character only when there is excessive output
information.
● When filtering conditions are set to query output information, the first line of the
command output starts with the entire regular expression but not the string to be
filtered.
The system allows you to use | count to display the number of lines and | section
to display the command output by section after using filtering mode. | count and |
section can work together with the following filtering modes.
Three filtering modes are provided for commands that support regular
expressions.
● | begin regular-expression: displays all the lines beginning with the line that
matches the regular expression.
Filter the character strings to be entered until the specified case-sensitive
character string is displayed. All the character strings following this specified
character string are displayed on the screen.
● | exclude regular-expression: displays all the lines that do not match the
regular expression.
If the character strings to be entered do not contain the specified case-
sensitive character string, they are displayed on the screen. Otherwise, they
are filtered.
● | include regular-expression: displays all the lines that match the regular
expression.
If the character strings to be entered contain the specified case-sensitive
character string, they are displayed on the screen. Otherwise, they are filtered.
NOTE
Example 1: Run the display interface brief command to display all the lines that
do not match the regular expression Ethernet|NULL|Tunnel. Ethernet|NULL|Tunnel
matches Ethernet, NULL or Tunnel.
<Huawei> display interface brief | exclude Ethernet|NULL|Tunnel
PHY: Physical
*down: administratively down
(l): loopback
(s): spoofing
(b): BFD down
^down: standby
(e): ETHOAM down
(d): Dampening Suppressed
InUti/OutUti: input utility/output utility
Interface PHY Protocol InUti OutUti inErrors outErrors
LoopBack1 up up(s) 0% 0% 0 0
Vlanif7 up up -- -- 0 0
Vlanif10 up up -- -- 0 0
Vlanif19 up up -- -- 0 0
Vlanif60 up up -- -- 0 0
Vlanif66 down down -- -- 0 0
Vlanif70 down down -- -- 0 0
Vlanif77 up up -- -- 0 0
Vlanif100 down down -- -- 0 0
NOTE
NOTICE
It is recommended that you do not change the default command level without the
guidance of professionals. Otherwise, it may result in inconvenience for operation
and maintenance and bring about security problems.
<Huawei> system-view
[Huawei] command-privilege level 5 view user save
2 Auto-Config Configuration
Definition
Auto-Config enables devices to be configured must be new devices or have no
configuration files to automatically load version files including system software,
patch files, configuration files when the device starts up.
Purpose
After devices are deployed on the network, software engineers need to
commission the software onsite. If a large number of devices are sparsely
distributed on the network, maintenance personnel need to manually configure
each device, which lowers device deployment efficiency and increases costs. Auto-
Config enables devices to automatically obtain version files from the file server
and automatically load them, realizing remote deployment of network devices.
This reduces costs and increases device deployment efficiency.
DHCP server
RouterA
RouterB Enterprise
server group
DHCP relay
RouterC
FTP/TFTP/SFTP server
RouterD
Concepts
● DHCP server: When Auto-Config starts running on devices, these devices
function as DHCP clients to send DHCP Request packets to the DHCP server
for network configuration. The dynamic IP address pool, egress gateway
address, and 2.2.3 Option Parameters need to be configured on the DHCP
server. The dynamic IP address pool assigns IP addresses to interfaces on
devices. Option parameters contain information about the IP address of the
file server, and the name of the version file to be loaded.
● DHCP relay: If the device to be configured is on a different network segment
than the DHCP server, DHCP relay needs to be configured to allow packet
exchange between the device and the DHCP server.
● File server: It is an FTP, TFTP, or SFTP server. Version files are saved on the file
server. Version files include configuration files, system software, and patch
files to be loaded through Auto-Config. After receiving the IP address of the
file server sent from the DHCP server, devices to be configured obtain version
files from the file server and set the files as the version files for the next
startup.
● Intermediate file: If Option 67 that contains information about the
configuration file is not configured on the DHCP server, Auto-Config enables
devices to obtain information about version files that need to be downloaded
by parsing the intermediate file. 2.2.4 Intermediate File is saved on the file
server and contains information about mappings from system MAC address or
ESN to the system software name, system software version, patch file name,
and configuration file name.
Whether No
receives DHCP
Reply packets
Yes
No
Whether Reply
packets are valid
Yes
No
No Whether Reply
Obtain and parse the packets contain
intermediate file Option information of End
the configuration file
No Yes
Whether parsing the
file succeeds?
Yes
Whether
the intermediate Whether the
file has the system No intermediate file has No Enter the phase of
software name the patch file obtaining the configuration
and version ID? information file
Obtainversion files
Yes
Yes
No Whether the device
No Whether the device No
Whether the system can download the obtains the
software needs to be patch file? configuration file?
upgraded?
Enter the phase of Enter the phase of Set the configuration file as
obtaining the system obtaining the patch file the startup file for the next
software startup
Yes Yes
Set the obtained system Set the patch file as the
software as startup The device restarts when
software for the next startup file for the next the time is up.
startup startup
End
If no DHCP Reply packet is received or the received DHCP Reply packet is invalid,
a DHCP Request packet is sent every 5 minutes. After 24 hours, a DHCP Request
packet is sent every one hour.
b. Parse Option parameters.
i. If the received DHCP Reply packet contains Option 43, Auto-
Configuration server (ACS) needs to be configured. After ACS
configuration is complete, the device is configured using the Auto-
Configuration server.
NOTE
NOTE
● This Auto-Config process runs when the following conditions are met: System
software needs to be upgraded; information about system software is
configured on the DHCP server or the intermediate file; system software is
saved on the file server.
● You can configure Option 146 on the DHCP server to determine whether to
delete system software when the space is insufficient. The device deletes
system software when the space is insufficient based on the setting of Option
146.
b. (Optional) Download the patch file.
i. Obtain information about the patch file from the intermediate file or
the DHCP Reply packets.
ii. Download the patch file from the file server and set the downloaded
file as the startup file for the next startup.
NOTE
This Auto-Config process runs when the following conditions are met: The patch
file needs to be upgraded; information about the patch file is configured on the
DHCP server or the intermediate file; the patch file is saved on the file server.
c. Download the configuration file.
i. Obtain information about the configuration file from the
intermediate file or the DHCP Reply packets.
ii. Download the configuration file from the file server and set the
downloaded file as the startup file for the next startup.
NOTE
● If the system fails to obtain the intermediate file, system software, patch file,
and configuration file, the system suspends the Auto-Config process and waits
for human intervention. After handing the reason for the Auto-Config failure,
run the autoconfig getting-file restart command to obtain the intermediate
file, system software, patch file, and configuration file and resume the Auto-
Config process.
● The Auto-Config process triggers the startup of the device through the
configuration file. Therefore, the configuration file is mandatory, and the
version file and patch file are optional.
● Restart the device.
You can configure Option 146 on the DHCP server to specify the delay in
restarting the device. After the configuration file is downloaded successfully,
the device is restarted according to the setting of Option 146. If no Option
146 is configured, the device is restarted immediately after the configuration
file is downloaded.
Option Description
Option Description
NOTE
● Option 150 enables DHCP clients to directly obtain the TFTP server IP address.
● Options 141, 142, and 143 enable DHCP clients to obtain the FTP user name, FTP
password, and FTP server IP address.
● Options 141, 142, and 149 enable DHCP clients to obtain the SFTP user name, SFTP
password, and SFTP server IP address and port number.
● When multiple types of Option parameters are set for a DHCP server, the priority of
file servers is selected as follows: SFTP > FTP > TFTP.
The intermediate file is saved on the file server and contains information about
mappings from system MAC address or ESN to the system software name, system
software version, patch file name, and configuration file name. After obtaining the
IP address of the file server, the device downloads the intermediate file from the
file server, searches for the system software name, system software version, patch
file name and configuration file name that match its own MAC address or ESN,
and downloads files from the file server based on the obtained file names.
NOTE
(optional), patch file (optional), and intermediate file (optional) are saved on the
FTP/TFTP/SFTP server. Routes between the FTP/TFTP/SFTP server, devices to be
configured (devices have obtained IP addresses), and the DHCP server are
reachable. After software engineers configure the DHCP server and FTP/TFTP/SFTP
server, devices can use Auto-Config to load version files including the
configuration file (mandatory), system software (optional), and patch file
(optional) from the FTP/TFTP/SFTP server.
This configuration method applies to a small network where devices are densely
distributed.
RouterA
RouterC
RouterA
Enterprise
sever group
RouterB DHCP relay DHCP server
RouterC
FTP/TFTP/SFTP server
Licensing Requirements
Auto-Config is a basic feature of a router and is not under license control.
Feature Limitations
NOTE
● 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.
● In deployment, you can use Auto-Config to configure the device or manually
configure the device. If the device is manually configured, Auto-Config is
disabled automatically.
● The device can be configured using Auto-Config or USB deployment. However,
two deployment methods cannot be used together. If you need to use the
Auto-Config function after USB-based deployment has been performed on the
device, you need to run the set factory-configuration from default
command to specify the default factory settings as factory settings.
● When the factory settings are being restored, only unconfigured WAN
interfaces support the Auto-Config function.
● Devices to be configured must be new devices, that is, no startup
configuration file with file name extension .cfg or .zip exists on the device.
● You can obtain the MAC address and ESN of the device in the following ways:
– Check the label on the device.
– Log in to the device and run the display system-mac command in the
diagnosis view and the display esn command.
● The following interfaces support the Auto-Config function:
– AR100 series: GE0/0/4
– AR121, AR121W, AR121GW-L: Eth0/0/4
– AR129CGVW-L: GE0/0/4
– AR150 series (except AR156, AR157, AR157W, AR157VW, AR157G-HSPA
+7, AR158EVW and AR156W): Eth0/0/4
– AR160 series (except AR169 and AR169G-L): GE0/0/4
– AR160 series (AR169 and AR169G-L): GE0/0/3
– AR200 series (except AR206, AR207, AR207V, AR207V-P, AR208E,
AR207G-HSPA+7 and AR207VW): Eth0/0/8
– AR1200 series, AR2200 series, and AR3200 series: Layer 3 Ethernet
interfaces except for the management interface, GPON interface, and
EPON interface
When a GPON or EPON interface is used to implement the Auto-Config
function on a device, the system automatically creates a sub-interface
numbered 4094. In addition, the system sets the encapsulation mode of
the sub-interface to dot1q and the VLAN tag allowed by the sub-
interface to 4000. Therefore, the device and DHCP server must exchange
packets of VLAN 4000.
● When users log in to the new device or devices with no startup configuration
files through the console interface, the system prompts the following
information: "Auto-Config is working. Before configuring the device, stop
Auto-Config. If you perform configurations when Auto-Config is running, the
DHCP, routing, DNS, and VTY configurations will be lost. Do you want to stop
Auto-Config? [y/n]:".
– To continue Auto-Config, enter n.
– To stop Auto-Config, enter y.
NOTICE
If you do not want to run Auto-Config but enter n, the DHCP, routing,
DNS, and VTY configurations will be lost after the choice.
Pre-configuration Tasks
Before configuring Auto-Config on the device that is on the same network
segment as the DHCP server, complete the following tasks:
● Ensure that routes between the DHCP server, file server (FTP/TFTP/SFTP
server), and devices are reachable.
● Ensure that no startup configuration file exists on the device.
Configuration Procedure
As networking environment requires, Auto-Config, intermediate file, DHCP server,
and file server can be configured on different devices in any sequence. After the
preceding configuration tasks are complete, the device is powered on to run the
Auto-Config process.
● Run the undo autoconfig enable command in the system view to disable
Auto-Config. When Auto-Config is in stop state (you can run the display
autoconfig-status command to check the Auto-Config status), enable Auto-
Config again.
● Log in to the device through the console interface. If the following
information "Auto-Config is working. Before configuring the device, stop
Auto-Config. If you perform configurations when Auto-Config is running, the
DHCP, routing, DNS, and VTY configurations will be lost. Do you want to stop
Auto-Config? [y/n]:" is displayed, enter y to stop the Auto-Config process.
Procedure
Step 1 (Optional) Run display autoconfig enable
Auto-Config is enabled.
----End
Context
Auto-Config preferentially obtains configuration files through the Option 67
parameter. If Option 67 that contains information about the configuration file is
not configured on the DHCP server, Auto-Config enables devices to obtain the
configuration file (mandatory), system software (optional), and patch file
(optional) using the intermediate file.
The two methods to obtain the configuration file are used in the following
scenarios:
You can check the label on the device to obtain the MAC address and ESN.
NOTE
If the intermediate file is configured for the Auto-Config process, Option 67 is not required
in configuring the DHCP server.
Procedure
You can configure the intermediate file based on the MAC address or ESN of the
device and the required system software, patch file, and configuration file names.
The procedure is as follows:
NOTE
● If multiple devices are configured, each row in the intermediate file records
configuration information of a device. A maximum of 1,000 devices are allowed to
use the intermediate file to realize Auto-Config.
● When configuring the intermediate file, enter either of the MAC address and ESN.
The configuration file is mandatory, and the version file and patch file are optional.
The three files can be configured in any sequence.
● The version file name and system software version must be available in the
intermediate file, and version ID in the system software name must be the same as
that in the intermediate file. vrpver information must be included in the vrpfile
information.
Context
Before powering on the devices that need to run Auto-Config, configure the DHCP
server and file server; otherwise, the devices cannot obtain configuration files.
NOTE
Procedure
Step 1 Run system-view
NOTE
● To prevent IP address conflicts, the configured IP addresses must be different from the IP
addresses configured in the configuration files.
● The DHCP server must have IP addresses to assign to devices.
NOTE
When the password is contained in option, the ascii or hex type is insecure. Set the option type
to cipher. A secure password should contain at least two types of the following: lowercase
letters, uppercase letters, number, and special characters. In addition, the password must consist
of six or more than six characters.
Option Description
NOTE
● Option 150 enables DHCP clients to directly obtain the TFTP server IP address.
● Options 141, 142, and 143 enable DHCP clients to obtain the FTP user name, FTP
password, and FTP server address.
● Options 141, 142, and 149 enable DHCP clients to obtain the SFTP user name, SFTP
password, and SFTP server IP address and port number.
● When multiple types of Option parameters are set for a DHCP server, the file servers
are selected as follows: SFTP -> FTP ->TFTP.
● The file server user name and password obtained by the device to be configured are
only used for Auto-Config deployment. The device to be configured does not save the
file server user name and password.
----End
Context
NOTE
● If the FTP server is used, the FTP server IP address must be the same as the value of
Option 143 configured on the DHCP server. If the TFTP server is used, the TFTP server IP
address must be the same as the value of Option 150 configured on the DHCP server. If
the SFTP server is used, the SFTP server IP address must be the same as the value of
Option 149 configured on the DHCP server.
● The SFTP server is recommended.
● The file server can be the router or a PC. In the following example, a router functions as
an SFTP server.
Procedure
Step 1 Enable SFTP. For details, see 11.4 Local File Management-11.4.4 Managing Files
When the Device Functions as an SFTP Server-Set SFTP server parameters. in
Huawei AR Series Access Routers Configuration Guide-File Management.
Step 2 Configure the VTY user interface for SSH users, SSH user name, authentication
mode, service type and root directory that can be accessed. For details, see 11.4
Local File Management-11.4.4 Managing Files When the Device Functions as
an SFTP Server-Configure the VTY user interface for SSH users to log in to the
device. and Configure SSH user information. in Huawei AR Series Access Routers
Configuration Guide-File Management.
NOTE
Currently, the device supports only password authentication for file access through SFTP.
----End
Follow-up Procedure
After the file server is configured, place the intermediate file (optional), system
software (optional), patch file (optional), and configuration file (mandatory) to
the working directory of the file server.
NOTE
● When uploading files, ensure that there is sufficient space in the directory.
● If a PC functions as the file server, copy files to the working directory of the PC (working
directory of the file server needs to be specified).
● If the router functions as the file server, upload files to the working directory of the file
server using a file client program.
● To ensure file server security, you are advised to configure a unique file server user
name and set the right to read-only to prevent the file server from being modified by
unauthorized users. After the Auto-Config process is complete, disable the file server
function.
Procedure
● Run the display ip pool { interface interface-pool-name | name ip-pool-
name } used command to check the IP addresses that the DHCP server
assigns to devices to be configured.
● Run the display autoconfig-status command to check the Auto-Config
running status.
● Run the display startup command to check the startup configuration file,
system software, and patch file.
----End
Pre-configuration Tasks
Before configuring Auto-Config on the device that is on a different network
segment than the DHCP server, complete the following tasks:
● Ensure that routes between the DHCP server, DHCP relay, file server (FTP/
TFTP/SFTP server), and device are reachable.
Configuration Procedure
As networking environment requires, Auto-Config, intermediate file, DHCP Server,
DHCP Relay, and file server can be configured on different devices in any
sequence. After the preceding configuration tasks are complete, the device is
powered on to run the Auto-Config process.
Context
Auto-Config needs to be enabled when:
● Auto-Config is disabled on the current device. In this case, you can run the
display autoconfig enable command to check whether Auto-Config is
enabled. Auto-Config must be enabled before it runs.
● 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. You can use the display
autoconfig-status command to check whether Auto-Config is enabled. When
Auto-Config is in stop state (you can run the display autoconfig-status
command to check the Auto-Config status), enable Auto-Config again.
NOTE
Procedure
Step 1 (Optional) Run display autoconfig enable
Auto-Config is enabled.
----End
Context
Auto-Config preferentially obtains configuration files through the Option 67
parameter. If Option 67 that contains information about the configuration file is
not configured on the DHCP server, Auto-Config enables devices to obtain the
configuration file (mandatory), system software (optional), and patch file
(optional) using the intermediate file.
The two methods to obtain the configuration file are used in the following
scenarios:
You can check the label on the device to obtain the MAC address and ESN.
NOTE
If the intermediate file is configured for the Auto-Config process, Option 67 is not required
in configuring the DHCP server.
Procedure
You can configure the intermediate file based on the MAC address or ESN of the
device and the required system software, patch file, and configuration file names.
The procedure is as follows:
NOTE
● If multiple devices are configured, each row in the intermediate file records
configuration information of a device. A maximum of 1,000 devices are allowed to
use the intermediate file to realize Auto-Config.
● When configuring the intermediate file, enter either of the MAC address and ESN.
The configuration file is mandatory, and the version file and patch file are optional.
The three files can be configured in any sequence.
● The version file name and system software version must be available in the
intermediate file, and version ID in the system software name must be the same as
that in the intermediate file. vrpver information must be included in the vrpfile
information.
NOTE
Procedure
Step 1 Run system-view
DHCP is enabled.
The global address pool is created and the global address pool view is displayed.
By default, no global address pool is created on the device.
Step 8 Run network ip-address [ mask { mask | mask-length } ]
The range of IP addresses that can be allocated dynamically in the global address
pool is specified.
NOTE
● To prevent IP address conflicts, the configured IP addresses must be different from the IP
addresses configured in the configuration files.
● The DHCP server must have IP addresses to assign to devices.
NOTE
When the password is contained in option, the ascii or hex type is insecure. Set the option type
to cipher. A secure password should contain at least two types of the following: lowercase
letters, uppercase letters, number, and special characters. In addition, the password must consist
of six or more than six characters.
Option Description
Option Description
NOTE
● Option 150 enables DHCP clients to directly obtain the TFTP server IP address.
● Options 141, 142, and 143 enable DHCP clients to obtain the FTP user name, FTP
password, and FTP server address.
● Options 141, 142, and 149 enable DHCP clients to obtain the SFTP user name, SFTP
password, and SFTP server IP address and port number.
● When multiple types of Option parameters are set for a DHCP server, the file servers
are selected as follows: SFTP -> FTP ->TFTP.
● The file server user name and password obtained by the device to be configured are
only used for Auto-Config deployment. The device to be configured does not save the
file server user name and password.
----End
NOTE
● This section takes the router as an example to describe the procedure for configuring the
DHCP relay function.
● After the Auto-Config deployment is complete, delete the DHCP relay configuration to
ensure DHCP relay security.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run dhcp enable
DHCP is enabled.
Step 3 Run interface interface-type interface-number
The interface view is displayed.
Step 4 Run ip address ip-address { mask | mask-length }
An IP address is assigned to the interface.
NOTE
When configuring an egress gateway address for the IP address pool on a DHCP server,
ensure that this egress gateway address is the same as the IP address of the DHCP relay
agent.
Step 7 You can configure the DHCP server IP address on the DHCP relay agent in either
of the two following ways:
● Configure the DHCP server IP address directly on the interface. This method
can be used when the DHCP relay agent serves only one DHCP server and a
few devices need to be configured with Auto-Config on a small network.
a. Run interface interface-type interface-number
The interface view is displayed.
b. Run dhcp relay server-ip ip-address
The DHCP server IP address is configured on the DHCP relay agent.
● Bind DHCP servers to a DHCP server group. This method can be used when
the DHCP relay agent serves multiple DHCP servers and many devices need to
be configured with Auto-Config on a large network.
a. Run dhcp server group group-name
A DHCP server group is created and the DHCP server group view is
displayed.
A maximum of 64 DHCP server groups can be configured globally.
b. Run dhcp-server ip-address [ ip-address-index ]
DHCP servers are added to a DHCP server group.
A maximum of 8 DHCP servers can be added to a DHCP server group.
c. Run interface interface-type interface-number
The interface view is displayed.
d. Run dhcp relay server-select group-name
A DHCP server group is configured on the interface.
----End
Context
NOTE
● If the FTP server is used, the FTP server IP address must be the same as the value of
Option 143 configured on the DHCP server. If the TFTP server is used, the TFTP server IP
address must be the same as the value of Option 150 configured on the DHCP server. If
the SFTP server is used, the SFTP server IP address must be the same as the value of
Option 149 configured on the DHCP server.
● The SFTP server is recommended.
● The file server can be the router or a PC. In the following example, a router functions as
an SFTP server.
Procedure
Step 1 Enable SFTP. For details, see 11.4 Local File Management-11.4.4 Managing Files
When the Device Functions as an SFTP Server-Set SFTP server parameters. in
Huawei AR Series Access Routers Configuration Guide-File Management.
Step 2 Configure the VTY user interface for SSH users, SSH user name, authentication
mode, service type and root directory that can be accessed. For details, see 11.4
Local File Management-11.4.4 Managing Files When the Device Functions as
an SFTP Server-Configure the VTY user interface for SSH users to log in to the
device. and Configure SSH user information. in Huawei AR Series Access Routers
Configuration Guide-File Management.
NOTE
Currently, the device supports only password authentication for file access through SFTP.
----End
Follow-up Procedure
After the file server is configured, place the intermediate file (optional), system
software (optional), patch file (optional), and configuration file (mandatory) to
the working directory of the file server.
NOTE
● When uploading files, ensure that there is sufficient space in the directory.
● If a PC functions as the file server, copy files to the working directory of the PC (working
directory of the file server needs to be specified).
● If the router functions as the file server, upload files to the working directory of the file
server using a file client program.
● To ensure file server security, you are advised to configure a unique file server user
name and set the right to read-only to prevent the file server from being modified by
unauthorized users. After the Auto-Config process is complete, disable the file server
function.
----End
Procedure
Step 1 Five minutes after devices without any configuration file are powered on, check
address allocation on the DHCP server to determine whether devices are
connected to the network. Run the display ip pool { interface interface-pool-
name | name ip-pool-name } used command to check the IP addresses that the
DHCP server assigns to devices to be configured.
NOTE
If the device is connected to the network, you can Telnet to the device but do not configure
the device.
Step 2 Five minutes after devices obtain IP addresses, check the file transmission log on
the file server, or log in to the devices to check whether correct system software,
patch files, and configuration files have been downloaded and check the running
status of Auto-Config using the display autoconfig-status command.
NOTE
Step 3 After the configuration file is downloaded successfully, the device is restarted
according to the setting of Option 146.
1. Run the display autoconfig activating-config delay command to check the
configured delay in restarting the device.
2. Run the display autoconfig activating-config remanent-time command to
check the remaining delay in restarting the device.
----End
Networking Requirements
As shown in Figure 2-5, in the network deployment for a residential community,
the aggregation device RouterD is connected to new Routers (such as RouterA,
RouterB, and RouterC) on each layer of buildings in the residential community.
Users want to load the same system software, patch file, and configuration file on
all the Routers on layers. Besides, to save manpower costs and deployment time
of many Routers, the Routers are required to be automatically configured with the
same configuration.
Eth5/0/1-3
VLANIF 10
RouterA 192.168.2.6/24
GE0/0/1
192.168.1.1/24
GE0/0/1
RouterB RouterD 192.168.1.6/24 RouterF
DHCP Server SFTP Server
RouterC
Configuration Roadmap
The configuration roadmap is as follows:
1. Directly connect RouterF to RouterD and configure RouterF as the SFTP
server. Configure an default route on RouterF so that RouterF can
communicate with other device.
2. Place the configuration file, system software, and patch file to be loaded to
the working directory of the SFTP server to ensure that RouterA, RouterB, and
RouterC can obtain files to be loaded.
3. Configure RouterD as the DHCP server to provide network configurations to
RouterA, RouterB, and RouterC. Configure information about the system
software, patch file, and configuration file in Option 67 and Option 145
because the same files are to be loaded on all the Routers.
4. Power on RouterA, RouterB, and RouterC, so that the configuration file,
system software, and patch file are automatically loaded using auto-config.
NOTE
Procedure
Step 1 Configuring RouterF as the SFTP server
# Configuring the VTY user interface for SSH users to log in to the device.
[SFTP Server] user-interface vty 0 4
[SFTP Server-ui-vty0-4] authentication-mode aaa
[SFTP Server-ui-vty0-4] protocol inbound all
[SFTP Server-ui-vty0-4] user privilege level 15
[SFTP Server-ui-vty0-4] quit
Step 2 Upload the system software, configuration file, and patch file to the SFTP server
working directory flash:/autoconfig. Procedures for uploading the files are not
mentioned here
Step 4 Power on RouterA, RouterB, and RouterC, and run the Auto-config process
# After auto-config is finished, log in to the Router to be configured and run the
display startup command to view the system software, configuration file, and
patch file for the startup of the Router. RouterA is used as an example.
<Huawei> display startup
MainBoard:
Startup system software: flash:/ar_V200R009.cc
Next startup system software: flash:/ar_V200R009.cc
Backup system software for next startup: null
Startup saved-configuration file: flash:/ar_V200R009.cfg
Next startup saved-configuration file: flash:/ar_V200R009.cfg
Startup license file: null
Next startup license file: null
Startup patch package: flash:/ar_V200R009.pat
Next startup patch package: flash:/ar_V200R009.pat
Startup voice-files: null
Next startup voice-files: null
----End
Configuration Files
● Configuration file of the SFTP server
#
sysname SFTP Server
#
aaa
local-user user ftp-directory flash:/autoconfig
local-user user password cipher %$%$c|-D8KO4/,B[(FR.r!LHg]TK%$%$
local-user user privilege level 15
local-user user service-type ssh
#
interface GigabitEthernet0/0/1
ip address 192.168.1.6 255.255.255.0
#
sftp server enable
#
ip route-static 0.0.0.0 0.0.0.0 192.168.1.1
#
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
user privilege level 15
#
return
Networking Requirements
As shown in Figure 2-6, in the network deployment for branches of an enterprise,
the newly delivered RouterA, RouterB, and RouterC need to be deployed in
branches 1, 2, 3 of an enterprise. The three routers connect to GE0/0/2 of RouterD
across the transmission network through their GE0/0/1 interfaces respectively.
RouterD functions as the egress gateway of the enterprise and is connected to the
headquarters across the Layer 3 network through their GE0/0/1 interfaces.
Users want to load same system software and patch files, and different
configuration files on RouterA, RouterB, and RouterC. Besides, to save manpower
costs, users want the Routers to be automatically configured with different
configurations.
GE0/0/1
Headquarters
RouterA
Branch-1 RouterD RouterE
DHCP Relay GE0/0/1 DHCP Server
GE0/0/1 Networ 192.168.2.1/24
k GE0/0/1
RouterB GE0/0/2 192.168.2.6/24
192.168.1.6/24 GE0/0/2
Branch-2 192.168.4.1/24
GE0/0/1
192.168.4.6/24
GE0/0/1
RouterC RouterF
Branch-3 SFTP Server
Configuration Roadmap
The configuration roadmap is as follows:
1. Directly connect RouterF to RouterE and configure RouterF as the SFTP server.
Configure an default route on RouterF so that RouterF can communicate with
other device.
2. Configure an intermediate file so that RouterA, RouterB, and RouterC can
obtain configuration files, system software, and patch files through the
intermediate file.
3. Place the intermediate file, configuration files, system software, and patch
files to be loaded to the working directory of the SFTP server to ensure that
Routers to be configured can obtain files to be loaded.
4. Configure the enterprise gateway RouterD as the DHCP relay agent and
configure RouterE in the headquarters as the DHCP server so that the DHCP
server can deliver network configurations to Routers to be configured on
different network segments.
5. Power on RouterA, RouterB, and RouterC so that configuration files, system
software, and patch files are automatically loaded using auto-config.
NOTE
Procedure
Step 1 Configuring RouterF as the SFTP server
# Set SFTP server parameters.
<Huawei> system-view
[Huawei] sysname SFTP Server
[SFTP Server] 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...
......................................................................................+++
....+++
.......................................++++++++
..............++++++++
[SFTP Server] sftp server enable
# Configuring the VTY user interface for SSH users to log in to the device.
[SFTP Server] user-interface vty 0 4
[SFTP Server-ui-vty0-4] authentication-mode aaa
[SFTP Server-ui-vty0-4] protocol inbound all
[SFTP Server-ui-vty0-4] user privilege level 15
[SFTP Server-ui-vty0-4] quit
Step 3 Uploading the intermediate file, system software, configuration file, and patch file
to the SFTP server working directory flash:\autoconfig. Procedures for upload the
files are not mentioned here
Step 4 Configuring RouterD
# Configure RouterD as the DHCP relay agent.
<Huawei> system-view
[Huawei] sysname DHCP Relay
[DHCP Relay] dhcp enable
[DHCP Relay] interface gigabitethernet 0/0/2
[DHCP Relay-Gigabitethernet0/0/2] ip address 192.168.1.6 255.255.255.0
[DHCP Relay-Gigabitethernet0/0/2] dhcp select relay
[DHCP Relay-Gigabitethernet0/0/2] dhcp relay server-ip 192.168.2.6
[DHCP Relay-Gigabitethernet0/0/2] quit
[DHCP Relay] interface gigabitethernet 0/0/1
[DHCP Relay-Gigabitethernet0/0/1] ip address 192.168.2.1 255.255.255.0
[DHCP Relay-Gigabitethernet0/0/1] quit
[DHCP Relay] ip route-static 192.168.4.0 255.255.255.0 192.168.2.6
Step 6 Powering on RouterA, RouterB, and RouterC, and run the Auto-config process
Step 7 Verifying the configuration
# After auto-config is finished, log in to the Router to be configured and run the
display startup command to view the system software, configuration file, and
patch file for the startup of the Router. RouterC is used as an example.
<Huawei> display startup
MainBoard:
Startup system software: flash:/auto_V200R009.cc
Next startup system software: flash:/auto_V200R009.cc
Backup system software for next startup: null
Startup saved-configuration file: flash:/auto_RouterC.cfg
Next startup saved-configuration file: flash:/auto_RouterC.cfg
Startup license file: null
Next startup license file: null
Startup patch package: flash:/auto_V200R009.pat
Next startup patch package: flash:/auto_V200R009.pat
Startup voice-files: null
Next startup voice-files: null
----End
Configuration Files
● Configuration file of the SFTP server
#
sysname SFTP Server
#
aaa
local-user user ftp-directory flash:\autoconfig
local-user user password cipher %$%$c|-D8KO4/,B[(FR.r!LHg]TK%$%$
local-user user privilege level 15
local-user user service-type ssh
#
interface GigabitEthernet0/0/1
ip address 192.168.4.6 255.255.255.0
#
sftp server enable
#
ip route-static 0.0.0.0 0.0.0.0 192.168.4.1
#
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
user privilege level 15
#
return
3 Auto-Start Configuration
Definition
The Auto-Start function allows a device to automatically load version files after it
is powered on and starts.
Purpose
Auto-Config and Auto-Start allow devices to automatically load version files to
implement batch site deployment and quick remote deployment of devices to be
connected to the network. The two functions reduce labor costs and improve
device deployment efficiency.
The differences between the two functions are as follows:
● Auto-Config is generally used for automatic site deployment on LANs. After
being installed and powered on at a site, devices obtain IP addresses and
configuration information related to the file server through the DHCP server
deployed on the LAN. The devices then automatically obtain version files from
a specified file server based on the configuration information and load the
files to complete site deployment.
● Auto-Start is generally used for automatic site deployment across LANs.
Devices load site deployment configurations including IP addresses and
configuration information related to the file server in advance using
customized factory settings or USB flash drives. After being installed and
powered on at a site, the devices directly set up connections to the file server,
automatically obtain version files from the file server and load the files to
complete site deployment.
Related Documents
Video:Auto-Start Feature of Huawei AR Routers
Auto-Start Deployment
You can configure Auto-Start based on the networking shown in Figure 3-1, and
store the intermediate file (mandatory) and at least one of the configuration file,
system software, and patch file on the FTP/SFTP server. Software commissioning
engineers uniformly configure management IP addresses and file server
parameters, and enable Auto-Start on devices. Installation personnel then deploy
these devices to different sites. As long as these devices have reachable routes to
the file server, the devices use Auto-Start to automatically obtain version files
from the FTP/SFTP server and load configuration files, system software, and patch
files after being powered on.
You can also use the customization mode, add the devices' IP addresses and file
server parameters to factory settings, and enable Auto-Start. After being delivered,
installed at sites, and powered on, the devices start the Auto-Start process for site
deployment.
You can also use Auto-Start to upgrade devices in the future. You only need to
save files (intermediate file, system software, patch file, and configuration file)
required for the upgrade to the file server, reconfigure file server parameters, and
restart the devices. The devices then use Auto-Start to automatically load new
version files. If file server parameters remain unchanged and are saved to the
configuration file, you do not need to reconfigure the parameters.
Auto-Start allows devices to rapidly and automatically load version files in
batches, so that professional software commissioning engineers do not need to go
to sites. Auto-Start reduces site deployment costs, simplifies site deployment
process, and improves device deployment efficiency.
RouterA
RouterB Network
FTP/SFTP server
RouterC
RouterD
Auto-Start Principles
Before using Auto-Start for site deployment, make an intermediate file and save it
to a specified directory on the file server. Save version files to be loaded to the
specified directory on the file server. After configuring an IP address and file server
parameters on a device, enable Auto-Start. The device then automatically
downloads and loads version files based on the intermediate file after the start.
The intermediate file contains the mapping between the device's MAC address +
equipment serial number (ESN) and the system software, version, patch file, and
configuration file. A device uses the file server's IP address, a user name, and a
password to set up a connection with the file server, downloads and parses the
intermediate file. After successfully parsing the intermediate file, the device
downloads corresponding version files from the file server and loads the files. For
details about how to make the intermediate file, see 3.6.1 Making the
Intermediate File.
Site deployment files consist of mandatory and optional files.
● Mandatory file
– Intermediate file: The file name must be arstart.ini.
● Optional file
Start
End
Is the parsing
No successful?
Yes
Does system
software name and Does patch file Start the configuration file
version information information exist? obtaining process
exist? No No
Phase of obtaining version files
Yes
Yes
Can the device No
No No Is the configuration
Is upgrade required? download the patch
file obtained?
file?
Yes
Yes
Specify the system Specify the patch file for
Restart the device
software for next startup next startup
Auto-Start process is
suspended End
1. The device connects to the file server to obtain and parse the intermediate
file.
– If the device successfully parses the file, go to step 2.
– If the device fails to obtain or parse the file, the site deployment fails.
2. The device obtains site deployment files from the file server and saves the
files to a specified storage medium according to description in the
intermediate file.
– If the device successfully obtains the files, go to step 3.
– If the device fails to obtain the files, the site deployment fails.
3. The device specifies the system software, configuration file, and patch file as
next startup files.
4. The device restarts.
Licensing Requirements
Auto-Start is a basic feature of a router and is not under license control.
Feature Limitations
● 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.
● The intermediate file contains the mapping between the device's MAC
address + ESN and the system software, version, patch file, and configuration
file. After connecting to the file server, the device downloads and parses the
intermediate file, and downloads corresponding version files from the file
server based on the parsing result. Before using Auto-Start, obtain the
device's system MAC address and ESN using the following methods:
– View the barcode label attached to the surface of the device.
– Log in to the device and run the display system-mac (diagnostic view)
and display esn (All views) commands to view the MAC address and
ESN, respectively.
Auto-Start Disabled
Configuration Process
To configure Auto-Start, perform the following configuration tasks on the file
server and device. The tasks can be performed in any sequence. You must
complete all the tasks before running Auto-Start on the device.
Context
An Auto-Start-enabled device parses the intermediate file to obtain information
about version files to be downloaded. For details about the Auto-Start process, see
3.3 Understanding Auto-Start.
The intermediate file must be named arstart.ini and saved in an authorized
directory on the file server. The file contains the mapping between the device's
MAC address + ESN and the system software, version, patch file, and configuration
file. The system software, patch file, and configuration file are saved in the
authorized directory on the file server. The file name extension of the system
software is .cc or .zip, that of the patch file is .pat, and that of the configuration
file is .zip or .cfg. After obtaining the file server's IP address, the device downloads
the file arstart.ini from the file server, parses the file to find names of
corresponding system software, version, patch file, and configuration file, and
downloads version files from the file server based on the names.
Procedure
Step 1 Create a text file and name it arstart.ini.
Step 2 Edit the intermediate file.
Assume that a router's MAC address (obtaining method) is 0018-82C5-AA89, ESN
(obtaining method) is 9300070123456789, system software to be downloaded is
auto_V200R007C00.cc, version is V200R007C00, patch file to be downloaded is
auto_V200R007C00.pat, and configuration file to be downloaded is
auto_V200R007C00.cfg. The contents of the intermediate file arstart.ini are as
follows:
MAC=0018-82C5-
AA89;ESN=9300070123456789;vrpfile=auto_V200R007C00.cc;vrpver=V200R007C00;patchfile=auto_V200R007
C00.pat;cfgfile=auto_V200R007C00.cfg;
NOTE
● If multiple devices need to be configured, each line in the intermediate file records
configuration information of a device. A maximum of 1,000 devices can use the
intermediate file to implement Auto-Start.
● When editing the intermediate file, enter the MAC address and ESN, or either of them.
Names of the configuration file, system software, and patch file are optional. Enter at
least one file name.
● The MAC address, ESN, version, and names of the system software, patch file, and
configuration file can be written in any sequence.
● The MAC address (or ESN), system software name, patch file name, and configuration
file name are separated by semicolons (;). The MAC address is in xxxx-xxxx-xxxx-xxxx or
xx-xx-xx-xx format. The file name is case-insensitive and does not contain special
characters. It is recommended that the file name contain letters, digits, and underscores
(_).
● The intermediate file must contain the system software name and version, and the
version in the system software name must be the same as the version in the
intermediate file. The version information (vrpver) must be included in the system
software information (vrpfile).
----End
Prerequisites
The file server works properly.
Context
● The file server can be an FTP or SFTP server. An SFTP server is recommended.
● The device or a PC can function as the file server.
Procedure
Configure the file server.
● For details about how to configure the file server as an FTP server, see 11.4.3
Managing Files When the Device Functions as an FTP Server.
● For details about how to configure the file server as an SFTP server, see 11.4.4
Managing Files When the Device Functions as an SFTP Server.
Follow-up Procedure
After configuring the file server, save the intermediate file (mandatory) and at
least one of the configuration file, system software, and patch file to an
authorized directory on the file server.
NOTE
● Before uploading files to the file server, ensure that the directory has sufficient space
to store the files.
● If a PC functions as the file server, directly copy the files to the authorized directory on
the PC (the authorized directory on the file server needs to be specified).
● If the device functions as the file server, use third-party software on a PC to upload
the files to the authorized directory on the file server.
● To ensure file server security, you are advised to configure a unique user name for the
file server and assign read-only permission to the user to prevent unauthorized
modification of the files. After the Auto-Start process is complete, disable the file
server function.
Pre-configuration Tasks
Power on the device and ensure that it completes self-check successfully.
Procedure
Step 1 Configure a management IP address for the device.
1. Run system-view
The system view is displayed.
2. Run interface interface-type interface-number
The interface view is displayed.
3. Run ip address ip-address { mask | mask-length }
A management IP address is configured.
The management IP address is used for device management and
maintenance. Configure IP addresses and deploy routes based on network
planning to ensure that routes between terminals and devices are reachable.
4. Run quit
Exit from the interface view.
Step 2 Configure file server parameters.
1. Run autostart
The autostart view is displayed.
2. Run servertype { ftp | sftp }
The type of the file server is configured.
By default, the file server is an FTP server.
3. Run ipaddress ip
The IP address of the file server is configured.
4. Run username username password password
The user name and password for accessing the file server are configured.
By default, no user is configured for accessing the file server.
5. Run quit
Return to the system view.
6. Run autostart enable
Auto-Start is enabled.
By default, Auto-Start is disabled on a device.
7. Run quit
Return to the user view.
Step 3 Run save
The configuration is saved.
----End
Follow-up Procedure
After being installed and powered on, the device starts the Auto-Start process.
NOTE
After the Auto-Start process successfully ends, you are advised to run the undo autostart
enable command to disable Auto-Start and run the save command to save the
configuration, preventing the device from starting the Auto-Start process again after it
restarts the next time.
NOTE
● If the device is connected to the network, you can log in to the device using Telnet or
other modes to view the Auto-Start running status, but do not configure the device.
● After downloading a file, do not save the configuration on the device because the
configuration has not taken effect. If you save the configuration, the configuration will
not take effect after the site deployment process ends.
● You can view the file transfer log on the file server to check whether the device has
successfully downloaded the correct system software, patch file, and configuration file.
● If the Auto-Start process is suspended, you can reconfigure file server parameters or
the intermediate file and file server, enter the autostart view, and run the autostart
run command to manually restart the Auto-Start process.
Networking Requirements
As shown in Figure 3-4, newly-delivered RouterA, RouterB, and RouterC need to
be deployed in an enterprise's branches 1, 2, and 3, respectively, and communicate
with RouterD in the enterprise's headquarters.
The enterprise wants to load the same system software and different
configuration files on RouterA, RouterB, and RouterC. To reduce labor costs for
onsite deployment, the enterprise wants to configure these routers remotely and
rapidly.
Information of RouterA, RouterB, and RouterC and files to be loaded on these
routers are as follows:
● RouterA: The MAC address is 0018-82C5-AA89, ESN is
2102310CXK10B6000183, system software name is V200R007C00.cc, version is
V200R007C00, and configuration file is auto_RouterA.cfg.
● RouterB: The MAC address is 0018-82C5-AA90, ESN is
2102310CXK10B6000184, system software name is V200R007C00.cc, version is
V200R007C00, and configuration file is auto_RouterB.cfg.
● RouterC: The MAC address is 0018-82C5-AA91, ESN is
2102310CXK10B6000185, system software name is V200R007C00.cc, version is
V200R007C00, and configuration file is auto_RouterC.cfg.
GE1/0/0
RouterA
Branch-1
GE1/0/0
GE1/0/0
Network
RouterB RouterD
Branch-2 SFTP Server
GE1/0/0
RouterC
Branch-3
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure RouterD as the SFTP server.
2. Make the intermediate file arstart.ini that maps each router to be configured
with the system software and configuration file to be loaded.
3. Save the intermediate file and configuration files and system software to be
loaded to the working directory of the SFTP server RouterD, so that RouterA,
RouterB, and RouterC can obtain these files.
4. On RouterA, RouterB, and RouterC, configure IP addresses and SFTP server
parameters (including the type and IP address of the file server, and the user
name and password for accessing the file server), and enable Auto-Start.
5. Power on the routers. The routers use Auto-Start to automatically load
configuration files, system software, and patch files.
NOTE
Procedure
Step 1 Configure RouterD as the SFTP server.
# Configure the SFTP server function and related parameters.
<Huawei> system-view
[Huawei] sysname SFTP Server
[SFTP Server] sftp server enable
[SFTP Server] rsa local-key-pair create
The key name will be: Host
RSA keys defined for Host already exist.
Confirm to replace them? (y/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.
# Create a text file and name it arstart.ini. The contents and format of the
intermediate file are as follows:
MAC=0018-82C5-
AA89;ESN=2102310CXK10B6000183;vrpfile=V200R007C00.cc;vrpver=V200R007C00;cfgfile=auto_RouterA.cfg;
MAC=0018-82C5-
AA90;ESN=2102310CXK10B6000184;vrpfile=V200R007C00.cc;vrpver=V200R007C00;cfgfile=auto_RouterB.cfg;
MAC=0018-82C5-
AA91;ESN=2102310CXK10B6000185;vrpfile=V200R007C00.cc;vrpver=V200R007C00;cfgfile=auto_RouterC.cfg;
Step 3 Upload the intermediate file, configuration files, and system software to the
working directory sd1 of the SFTP server.
Step 4 Configure IP addresses and SFTP server parameters, and enable Auto-Start on
RouterA, RouterB, and RouterC.
Step 5 Start the routers. The routers then start the Auto-Start process.
# After the Auto-Start process ends, log in to routers to be configured and run the
display startup command to view the startup system software and configuration
file. The command output on RouterA is used as an example.
<RouterA> display startup
MainBoard:
Startup system software: sd1:/V200R007C00.cc
Next startup system software: sd1:/V200R007C00.cc
Backup system software for next startup: null
Startup saved-configuration file: sd1:/auto_RouterA.cfg
Next startup saved-configuration file: sd1:/auto_RouterA.cfg
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
----End
Configuration Files
● RouterD configuration file
#
sysname SFTP Server
#
aaa
local-user huawei password irreversible-cipher %^%#Wdb-1<0^vO:5yT'Ht^dTY)(+wZ<x>!
GshQKAr7<Lo$fY)(.Y%^%#
local-user huawei privilege level 15
local-user huawei ftp-directory sd1:
local-user huawei service-type ssh
#
interface GigabitEthernet1/0/0
ip address 192.168.1.6 255.255.255.0
#
sftp server enable
#
user-interface vty 0 4
authentication-mode aaa
user privilege level 15
#
return
ipaddress 192.168.1.6
username huawei password %^%#B(Wv8+v`a~b%7c-8L^7G,$)"%^%#
#
return
Definition
USB-based deployment allows you to configure or upgrade devices using a USB
flash drive. Before device deployment, save the deployment files in a USB flash
drive. After you connect the USB flash drive to a device, the device downloads the
files from the USB flash drive to complete automatic upgrade or service
deployment.
Purpose
As the network expands, more and more network devices are used and device
deployment becomes more frequent. Traditionally, software engineers have to
deploy the devices one by one, which is time-consuming and laborious. USB-based
deployment frees software engineers from such trouble. They only need to save
the deployment files in a USB flash drive, and then other onsite personnel can
finish the deployment process easily. This function simplifies the device
deployment process and lowers deployment costs.
Related Documents
Video: Huawei AR Router USB-based Deployment Feature Introduction
The supported system software format and file name extension vary depending
on the AR router model.
– Configuration file: The file name extension is .cfg, .db, or .zip.
– Patch file: The file name extension is .pat.
– License file: The file name extension is .dat.
– Voice file: The file name extension is .res.
– Executable file: The file name extension is .sh.
NOTE
During USB-based deployment, the standby MPU does not support executable
files.
– User-defined files
Users can select one or more types of optional file based on the site requirements.
When the current configuration file of the device is not empty, the USB-based
deployment function must be enabled using the autoupdate enable command in the
deployment configuration file and the password used for USB-based deployment must
be configured. Otherwise, the device cannot be configured using the USB flash drive.
5. The system obtains deployment files from the USB flash drive and saves them
in specified storage media.
– If files are obtained successfully, the process goes to step 6.
– If files are not obtained successfully, the deployment fails.
6. The system specifies the loaded files for next startup.
7. The device restarts.
8. The system checks whether the loaded files are the same as the specified
upgrade files.
– If so, the deployment succeeds.
– If not, the deployment fails.
9. The USB-based deployment process ends. The user removes the USB flash
drive from the device.
once.cfg and unlmt.cfg are two empty text documents, indicating one-time
upgrade and unlimited upgrade. The two files cannot co-exist. After an upgrade
begins, the green indicator blinks every 1 second. If the upgrade fails, the device
restarts after the red indicator remains steady on for 30 seconds.
● One-time upgrade: After a USB flash drive is inserted in a device, the device
compares the sizes (accurate to bytes) of two update.zip files: one in use and
the other in the USB flash drive. If the two files have different sizes, the device
begins to upgrade. If the upgrade succeeds, the device restarts after the green
indicator remains steady on for 3 seconds. After the device restarts, the device
runs the update.zip file copied from the USB flash drive. In this situation, the
size of the update.zip file currently used by the device is the same as that in
the USB flash drive, and the restarted device is not upgraded again.
● Unlimited upgrade: After a USB flash drive is inserted in a device, the device
restarts and upgrades without comparing the sizes of two update.zip files:
one in use and the other in the USB flash drive. After an unlimited upgrade
succeeds, the device does not restart or continues to upgrade. After the USB
flash drive is removed from the device, the device restarts to complete the
upgrade.
NOTE
Removing a USB flash drive from a device during an upgrade may cause the device unable to
start. You can insert the USB flash drive in the device again to rectify this fault.
On the AR161FW-P-M5 only the OSP daughter card supports the Android operating system.
Therefore, you can check whether the OSP daughter card is upgraded successfully only through
the connected screen because the USB-based deployment indicator cannot show whether the
OSP daughter card is upgraded successfully.
Licensing Requirements
USB-based deployment is a basic feature of a router and is not under license
control.
Feature Limitations
● To ensure data security, it is recommended that the device administrator use a
key encryption or fingerprint encryption USB flash drive and keep the USB
flash drive containing the deployment configuration file safe. After the
deployment is complete, delete the deployment configuration file in time.
Creating and modifying the configuration file locally are not recommended
because the file format may be incorrect. As a result, configuration restoration
will fail.
● When using an interface on an LPU for streamlined USB-based deployment,
insert a USB flash drive for deployment after the LPU is registered
successfully. Otherwise, you need to restart the device and then deploy it.
During the deployment, determine the LPU registration status and
deployment status based on the indicator status.
● After the deployment is complete, ensure that the devices are deployed based
on the mapping between ESNs and sites. Otherwise, the network between the
devices and Agile Controller may be unreachable.
● During USB-based deployment, if there is system software in deployment
files, the CPU usage may become high temporarily. The CPU usage will
automatically return to the normal range, without requiring any action.
c. On the Config of Udisk Start page, click Add to access the Add Device
page, as shown in Figure 4-4. Set related parameters. For details, see
Table 4-1.
d. On the Add Device page, click Add Type. In the displayed dialog box Add
Type, select the file type, as shown in Figure 4-5.
In the dialog box Add Type, set parameters and click Confirm to save the
file type. Return to the Add Device page, and click Confirm to save
device information.
e. On the Config of Udisk Start page, specify a directory for Index File
Storage Directory, select the created index data, and click Create Index
File, as shown in Figure 4-6.
f. In the displayed dialog box, set the password used to generate an index
file, as shown in Figure 4-7, and then click Confirm.
h. In the displayed dialog box, click Open Folder to access the index file
storage directory and obtain the corresponding index file, as shown in
Figure 4-9. The USB_AR.ini in the USB_AR.ini_1506498352439.zip
indicates the generated index file.
Field Description
Field Description
Field Description
Field Description
Field Description
NOTE
The AR169-P-M9, AR169W-P-M9, and AR169RW-P-M9
support USB-based VM creation. The requirements are
as follows:
● If the device does not contain a configuration file,
the parameters in the index file USB_AR.ini for USB-
based deployment are set as follows: TYPEn1 is set
to SYSTEM-OSP, FILENAMEn1 to VM installation
package.ova, TYPEn2 to SYSTEM-CONFIG, and
FILENAMEn2 to osp_cfg.cfg. The content format of
the osp_cfg.cfg file is "vm-name;port-
num;password;", for example, vm2;3;Admin123;.
● vm-name: specifies the VM name. The value is a
string of 1 to 32 case-sensitive characters and
consists of letters and digits.
● port-num: specifies the VNC service port number.
The value is an integer that ranges from 1 to 8.
● password: specifies the password for VNC
authentication. The value is a string of 6 to 8
case-sensitive characters without spaces.
● If the device contains a configuration file, the
parameters in the index file USB_AR.ini for USB-
based deployment are set as follows: TYPEn1 is set
to SYSTEM-OSP, FILENAMEn1 to VM installation
package.ova, TYPEn2 to SYSTEM-CONFIG, and
FILENAMEn2 to osp_cfg.zip. The osp_cfg.zip file is
encrypted and compressed from the osp_cfg.cfg file.
The value of n is an integer that starts from 1.
This field is mandatory.
Field Description
Examples
Example 1
You need to create an index file for upgrading one device, and the requirements
are as follows:
● Data is changed at 08:09:10 on June 28, 2013.
● The NMS is offline.
● Upgrade is required.
● The device ESN is 00080123456789 and the MAC address is 0018-0303-1234.
● The system software system-software01.cc is stored in the root directory of
the USB flash drive. The version number is V200R009. The HMAC string is
c3caaee8f4f6bd1389f438801e40dad9af30f2fbbe7e8f55121b39c6c16ba488.
The index file that meets the preceding requirements is as follows:
BEGIN AR
[USB CONFIG]
SN=20130628.080910
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=1
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=00080123456789
MAC=0018-0303-1234
VERSION=V200R009
DIRECTORY=DEFAULT
FILENUM=1
TYPE1=SYSTEM-SOFTWARE
FILENAME1=system-software01.cc
FILE_HMAC1=c3caaee8f4f6bd1389f438801e40dad9af30f2fbbe7e8f55121b39c6c16ba488
END AR
Example 2
You need to create an index file for upgrading multiple devices of the same series
to the same software version, and the requirements are as follows:
● Data is changed at 08:09:10 on June 28, 2013.
● The NMS is offline.
● Upgrade is required.
● The system software system-software01.cc is stored in the root directory of
the USB flash drive. The version number is V200R009. HMAC check is not
required for any file.
The index file that meets the preceding requirements is as follows:
BEGIN AR
[USB CONFIG]
SN=20130628.080910
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=1
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=DEFAULT
MAC=DEFAULT
VERSION=V200R009
DIRECTORY=DEFAULT
FILENUM=1
TYPE1=SYSTEM-SOFTWARE
FILENAME1=system-software01.cc
END AR
Example 3
You need to create an index file for two devices with different description
information, and the requirements are as follows:
● Data is changed at 08:09:10 on June 28, 2013.
● The NMS is offline.
● The ESN of the first device is 00080123456789. The MAC address is
0018-0303-1234. The name of the system software is V200R009.cc. The
version number is V200R009. The configuration file system-config01.zip must
be loaded. HMAC check is not required for any file.
Example 4
You need to create an index file for VM installation, and the requirements are as
follows:
● Data is changed at 08:09:10 on January 7, 2016.
● The NMS is offline.
● VM installation is required.
● The VM installation package (OVA file) usb.ova is stored in the root directory
of the USB flash drive. The version number is V200R007C00. The HMAC string
is
5c27a53005048beaa9f518da42912484edbf6bdd5a157ea777c8e80087a08b03.
● The VM configuration file osp_cfg.zip is stored in the root directory of the
USB flash drive. The HMAC string is
a1735904e3df0abf0bc2a3a7a32f33ecd641eaeb575ba4f5e88810df92c7fdce.
The index file that meets the preceding requirements is as follows:
BEGIN AR
[USB CONFIG]
SN=20160107.080910
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=1
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=DEFAULT
MAC=DEFAULT
VERSION=V200R007C00
DIRECTORY=DEFAULT
FILENUM=2
TYPE1=SYSTEM-OSP
FILENAME1=usb.ova
FILE_HMAC1=5c27a53005048beaa9f518da42912484edbf6bdd5a157ea777c8e80087a08b03
TYPE2=SYSTEM-CONFIG
FILENAME2=osp_cfg.zip
FILE_HMAC2=a1735904e3df0abf0bc2a3a7a32f33ecd641eaeb575ba4f5e88810df92c7fdce
END AR
Example 5
You need to create an index file to upgrade the configuration file, Android
package (APK) file, Android database file, and Android boot logo file, and the
requirements are as follows:
● Data is changed at 08:09:10 on August 25, 2016.
● The NMS is offline.
● Upgrade is required.
● The configuration file is stored in the root directory of the USB flash drive and
named vrpcfg.cfg.
● The master Android system database file is stored in the root directory of the
USB flash drive and named settings.db.
● The slave Android system database file is stored in the root directory of the
USB flash drive and named mos_settings.db.
● The APK file is stored in the root directory of the USB flash drive and named
Player.apk.
● The Android boot logo file is stored in the root directory of the USB flash drive
and named bootanimation_armaster.zip.
To install the APK file, Android database file, and Android boot logo file during
USB-based deployment, you must use executable files and an app detection file.
Executable files are stored in the root directory of the USB flash drive and named
huawei_execute1.sh, huawei_execute2.sh, and huawei_execute3.sh, and an app
detection file is stored in the root directory of the USB flash drive and named app-
list.xml.
The index file that meets the preceding requirements is as follows:
BEGIN AR
[USB CONFIG]
SN=20160825.080910 //The SN needs to be changed during each device deployment. The current time is
recommended as the SN.
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=1 //Number of devices to be upgraded.
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=DEFAULT
MAC=DEFAULT
VERSION=V200R006C12 //Upgrade version. It must be correct; otherwise, the deployment will fail.
DIRECTORY=DEFAULT
FILENUM=6 //Actual number of deployment files.
TYPE1=SYSTEM-EXECUTE //The app-list.xml file is mandatory.
FILENAME1=huawei_execute1.sh
RESOURCE_NAME1=app-list.xml
EXECUTE_TIME1=0
TYPE2=SYSTEM-EXECUTE //Executable files can be increased based on the number of deployment apps.
FILENAME2=huawei_execute2.sh
RESOURCE_NAME2=Player.apk
EXECUTE_TIME2=0
TYPE3=SYSTEM-CONFIG //VRP configuration file.
FILENAME3=vrpcfg.cfg
TYPE4=SYSTEM-CONFIG //Master Android system database file.
FILENAME4=settings.db
TYPE5=SYSTEM-CONFIG //Slave Android system database file.
FILENAME5=mos_settings.db
TYPE6=SYSTEM-EXECUTE //Boot logo file.
FILENAME6=huawei_execute3.sh
RESOURCE_NAME6=bootanimation_armaster.zip
EXECUTE_TIME6=0
END AR
Background
The USB-based deployment process varies according to the deployment file type
and whether the device has the configuration.
Non-configuration file Connect the USB flash ● Connect the USB flash
(system software and drive to the device to drive to the device to
patches) start the USB-based start the USB-based
deployment process. deployment process
without any check.
● Enable the USB-based
deployment function
on the device before
connecting the USB
flash drive to it.
On the AR161FW-P-M5 running an Android version, the OSP daughter card has
different system software than the device. You can only save the Android system
software (with the file name fixed as update.zip) and configuration file (once.cfg
or unlmt.cfg) to the dload folder in the root directory of a USB flash drive to
directly upgrade the Android system software version of the OSP daughter card.
The USB flash drive can only be connected to the USB port of the OSP daughter
card, as shown in Figure 4-10. You can only make an index file USB_AR.ini to
upgrade the system software of the AR161FW-P-M5. The USB flash drive needs to
be connected to the USB port of the device, as shown in Figure 4-11.
● If the file system format of the USB flash drive is not FAT32, convert the format
into FAT32 (format the USB flash drive) before using the USB flash drive.
● The USB3.0 interface is running on the AR169CVW-4B4S, AR161EW, AR161EW-M1,
AR169EW, AR169EGW-L, AR169CVW.
● To ensure compatibility between USB flash drives and devices, use Huawei-
certified USB flash drives to upgrade the Huawei devices. Currently, the
following USB flash drives have passed Huawei certification and support the
USB2.0 interface:
– Netac: U208 (4 GB), U208S (16 GB)
– Kingston: DT108, DT101 (8 GB), DTSE9 (8 GB, 16 GB)
– SanDisk: CZ50 (8 GB, 16 GB), CZ36 (8 GB, 16 GB), CZ43 (16 GB)
NOTE
Pre-configuration Tasks
Before performing a USB-based deployment, power on the device and ensure that
the device runs normally.
Procedure
1. Make an index file.
For details on how to make an index file, see 4.4 Making an Index File.
2. Save the index file and the resource file to be loaded to the device to the root
directory of the USB flash drive and save the files specified in the index file to
the specified directory.
The DIRECTORY field to the index file specifies the directory for files to be
loaded:
– If DIRECTORY is set to DEFAULT, save the files to the root directory of the
USB flash drive.
– If DIRECTORY is set to /abc, save the files to the abc directory.
3. Enable the USB-based deployment function on the device. Skip this step if the
device has no configuration. If the device is deployed using non-configuration
files, you can skip this step.
a. Run the set usb autoupdate password password command in the
system view to configure an authentication password for USB-based
deployment.
The password configured using the set usb autoupdate password
command must contain at least two types of characters, uppercase and
lowercase characters, digits, and special characters excluding spaces and
question marks (?).
The authentication password configured by this command is used in the
following scenarios:
Currently, configuration files can be encrypted only when they are being
compressed into a .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.
It is recommended that you encrypt the configuration file to enhance
security. The password used to encrypt the configuration file must be the
same as the password configured by the set usb autoupdate password
command.
b. (Optional) Run the hmac enable command in the system view to enable
HMAC check for USB-based deployment.
After HMAC check is configured for USB-based deployment, the device
uses the password configured by the 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.
NOTE
After HMAC check is configured for USB-based deployment, the device performs
HMAC check for all the files used for startup. If this function is not enabled, the
device does not perform HMAC check when downloading files from the USB
flash drive.
If HMAC check is enabled, the HMAC field in the index file must contain the
HMAC.
It is recommended that you enable HMAC check for USB-based deployment to
enhance security.
c. (Optional) Run the usb autoupdate generate encrypted boot-password
command in the system view to encrypt a Boot password in plain text
into one in cipher text.
d. Run the autoupdate enable command in the system view to enable the
USB-based deployment function.
NOTE
This command can take effect only after an authentication password for USB-
based deployment is configured by the set usb autoupdate password command.
4. Connect the USB flash drive to the device to start the USB-based deployment
process.
During the deployment, the system obtains the required files according to
content in the index file (USB_AR.ini) and saves the files in the default
storage medium. Then the device specifies the new system software and
configuration file as the files for next startup, and restarts.
Procedure for Using a USB Flash Drive to Upgrade the Android System
Software
1. Make the configuration file.
Create a text file and name it once.cfg or unlmt.cfg according to
requirements. For details, see 4.2 Understanding USB-based Deployment.
2. Create the dload folder in the root directory of the USB flash drive and save
the Android system software update.zip and made configuration file to the
root directory.
3. Connect the USB flash drive to the device to start the upgrade process.
– To upgrade the Android system software of the AR161FW-P-M5, you can
only connect the USB flash drive to the USB port of the OSP daughter
card, as shown in Figure 4-10.
NOTE
Removing the USB flash drive during an upgrade may cause the device unable to start. You can
install the USB flash drive again to solve the problem.
After the upgrade succeeds, you can use the USB flash drive to roll back to the previous Android
system software version.
After the USB-based deployment succeeds, remove the USB flash drive from the device.
Configuration Roadmap
The configuration roadmap is as follows:
1. Make an index file USB_AR.ini.
2. Copy the index file USB_AR.ini and two resource files (resource01.zip and
resource02.zip) to the root directory of the USB flash drive, and copy
deployment files XXX-V200R009SPC100.cc, settings.zip, execute01.sh,
execute02.sh, system-config01.zip, and system-config02.zip to the directory
specified in the index file.
3. Connect the USB flash drive to a USB port of each device to complete
automatic software upgrade.
NOTE
Before USB-based deployment, software engineers need to make an index file, save the
index file to the root directory of a USB flash drive, save deployment files to the directory
specified in the index file, and then deliver the USB flash drive to hardware installation
engineers. After finishing installing devices onsite, hardware installation engineers insert
the USB flash drive to the device to start the deployment process.
Procedure
Step 1 Edit the index file USB_AR.ini.
# Use the authentication password as the key and use a file checker to calculate
an HMAC for all deployment files based on the HMAC-SHA256 algorithm. The
commonly used file checker is HashCalc, which is available at the website http://
hashcalc.software.informer.com/download/. The calculation results are as follows:
● HMAC for the system software package of RouterA:
0ab30a2596bd0f6744631002d941f4218f40e784ae51447ed0bf3a2ff075939a
● HMAC for the configuration file of RouterA:
c76b15e47346299b4993ea34d505e19844a04436dafcafe7a79341ef90a0652f
● HMAC for the Android configuration file of RouterA:
c76a15e47346299b4993ea34d505e19844a04436dafcafe7a79341ef90a0652f
● HMAC for the executable file of RouterA:
c86b15e47346299b4993ea34d505e19844a04436dafcafe7a79341ef90a0652f
● HMAC for the resource file of RouterA:
0ab50a2596bd0f6744631002d941f4218f40e784ae51447ed0bf3a2ff075939a
● HMAC for the system software package of RouterB:
0ab30a2596bd0f6744631002d941f4218f40e784ae51447ed0bf3a2ff075939a
● HMAC for the configuration file of RouterB:
10736ef141ab2b6f9fa60a44c515cbb48c52d1b4b2e10f64abe5f880346e3b5d
● HMAC for the Android configuration file of RouterB:
16736ef141ab2b6f9fa60a44c515cbb48c52d1b4b2e10f64abe5f880346e3b5d
● HMAC for the executable file of RouterB:
c86b15e47346299b4993ea34d505e19844a04436dafcafe7a79341ef90a0652f
● HMAC for the resource file of RouterB:
0ac30a2596bd0f6744631002d941f4218f40e784ae51447ed0bf3a2ff075939a
# Create an index file and name it USB_AR.ini. Add the following content in the
index file:
BEGIN AR
[USB CONFIG]
SN=20141008.080910
EMS_ONLINE_STATE=NO
[UPGRADE INFO]
OPTION=AUTO
DEVICENUM=2
[DEVICE1 DESCRIPTION]
OPTION=OK
ESN=00080123456789
MAC=0018-0303-1234
VERSION=V200R009
DIRECTORY=DEFAULT
FILENUM=5
TYPE1=SYSTEM-SOFTWARE
FILENAME1=XXX-V200R009SPC100.cc
FILE_HMAC1=0ab30a2596bd0f6744631002d941f4218f40e784ae51447ed0bf3a2ff075939a
TYPE2=SYSTEM-CONFIG
FILENAME2=system-config01.zip
FILE_HMAC2=c76b15e47346299b4993ea34d505e19844a04436dafcafe7a79341ef90a0652f
TYPE3=SYSTEM-CONFIG
FILENAME3=settings.zip
FILE_HMAC3=c76a15e47346299b4993ea34d505e19844a04436dafcafe7a79341ef90a0652f
EXECUTE_TIME1=1
TYPE4=SYSTEM-EXECUTE
FILENAME4=execute01.sh
FILE_HMAC4=c86b15e47346299b4993ea34d505e19844a04436dafcafe7a79341ef90a0652f
RESOURCE_NAME1=resource01.zip
RESOURCE_HMAC1=0ab50a2596bd0f6744631002d941f4218f40e784ae51447ed0bf3a2ff075939a
[DEVICE2 DESCRIPTION]
OPTION=OK
ESN=66680123456789
MAC=0018-0303-5678
VERSION=V200R009
DIRECTORY=DEFAULT
FILENUM=5
TYPE1=SYSTEM-SOFTWARE
FILENAME1=XXX-V200R009SPC100.cc
FILE_HMAC1=0ab30a2596bd0f6744631002d941f4218f40e784ae51447ed0bf3a2ff075939a
TYPE2=SYSTEM-CONFIG
FILENAME2=system-config02.zip
FILE_HMAC2=10736ef141ab2b6f9fa60a44c515cbb48c52d1b4b2e10f64abe5f880346e3b5d
TYPE3=SYSTEM-CONFIG
FILENAME3=settings.zip
FILE_HMAC3=16736ef141ab2b6f9fa60a44c515cbb48c52d1b4b2e10f64abe5f880346e3b5d
EXECUTE_TIME1=1
TYPE4=SYSTEM-EXECUTE
FILENAME4=execute02.sh
FILE_HMAC4=c86b15e47346299b4993ea34d505e19844a04436dafcafe7a79341ef90a0652f
RESOURCE_NAME1=resource02.zip
RESOURCE_HMAC1=c86b15e47346299b4993ea34d505e19844a04436dafcafe7a79341ef90a0652f
END AR
Step 2 Copy the index file, system software, the executable file, the Android configuration
file to be loaded, the configuration file and the resource file to the root directory
of the USB flash drive.
# Configure RouterA.
<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] set usb autoupdate password huawei123
# Configure RouterB.
<Huawei> system-view
[Huawei] sysname RouterB
[RouterB] set usb autoupdate password huawei123
# Configure RouterA.
[RouterA] hmac enable
# Configure RouterB.
[RouterB] hmac enable
# Configure RouterA.
[RouterA] autoupdate enable
# Configure RouterB.
[RouterB] autoupdate enable
Step 6 Connect the USB flash drive to a device and start the upgrade process. (Connect
the USB flash drive to the other device after completing the upgrade of the first
device.)
Step 7 Observe the indicator on the USB flash drive to monitor the deployment state.
● If the deployment files do not exist, the indicator is off.
● If the deployment files exist but are invalid, USB-based deployment fails and
the indicator is steady red.
● If valid deployment files exist but cannot be executed, USB-based deployment
fails and the indicator is steady red.
● If valid deployment files exist and can be executed, USB-based deployment
starts and the indicator blinks green.
During the deployment, the system obtains the required files according to
content in the index file (USB_AR.ini) and saves the files in the default
storage medium. Then the device specifies the new system software and
configuration file as the files for next startup, and restarts.
Step 8 Verify the configuration.
# After the device restarts, the system checks the deployment state. If the
deployment indicator is steady green, USB-based deployment succeeds.
NOTE
After the USB-based deployment succeeds, remove the USB flash drive.
Run the display usb usb-id autoupdate state command to check the progress of
USB-based deployment.
<RouterA> display usb 1 autoupdate state
Info: Deployment using the USB flash drive is completed successfully.
<RouterB> display usb 1 autoupdate state
Info: Deployment using the USB flash drive is completed successfully.
----End
Definition
During email-based deployment, a network administrator specifies uniform
resource locator (URL) parameters in a deployment email to configure
deployment information on the controller client and then sends the deployment
email to a specified deployment mailbox. A deployment engineer receives the
deployment email and accesses the URL in the deployment email through the
browser to start the deployment process. Subsequently, devices automatically
complete the deployment.
Purpose
With the development of network technologies such as software-defined
networking (SDN) and cloud computing, more enterprise networks adopt cloud-
Licensing Requirements
Email-based Deployment is a basic feature of a router and is not under license
control.
Feature Limitations
● Email-based deployment can only be used in SD-WAN and CloudVPN
solutions.
● Email-based deployment can only be used to deploy the devices that use
factory settings.
● Before email-based deployment, do not log in to the web UI and change the
password. Otherwise, the deployment fails.
● When performing email-based deployment using the Internet Explorer
browser, you need to select Use HTTP 1.1 on the Advanced tab in Internet
Properties.
NOTE
5.4 URL
URL Format
The URL format in a deployment email is https://ip/portal?
ac_host=ac_host_value&ac_port=ac_port_value...&url_pass=url_pass_value, where ...
indicates that multiple parameters can be configured. These parameters are
separated using an ampersand (&), and ip in the format must be the device's web
system IP address. The default web system IP address and subnet mask of the
device are 192.168.1.1 and 255.255.255.0 respectively.
If the controller IP address and port number are 192.86.1.10 and 10020, the
device's network access interface is GE0/0/4 and network access mode is PPPoE,
the PPPoE user name is user, the password is User@123, the VPN instance name is
aA, the NTP server IP address is 1.1.1.1, the email generation time is 21:00 on
February 27 in 2017, the language of the deployment Portal page is English, and
the URL check code is
c7cf0fed3f183236d3b689e27799e08c5319791cb4669fb568380217db8d2c12, the
URL is as follows:
https://192.168.1.1/portal?
ac_host=192.86.1.10&ac_port=10020&link_if=GigabitEthernet0/0/4&link_model=PP
PoE&link_user=user&link_password=User@123&link_vrf=aA&ntp_server=1.1.1.1&lin
k_deliverytime=21:00:00/2017-02-27&url_lang=en&url_pass=c7cf0fed3f183236d3b
689e27799e08c5319791cb4669fb568380217db8d2c12
URL Parameters
Table 5-1 lists URL parameters used for email-based deployment.
using PPPoA
dial-up.
● PPPOEOA: The
device obtains
interface IP
addresses
using PPPoEoA
dial-up.
MPLS VPN
RouterA RouterA
RouterB
Branche 2
RouterB
Headquarters
Router
Branche 3
Pre-configuration Tasks
● Configure email server parameters to the controller so that emails can be sent
normally.
● Complete network deployment configurations for the undeployed site on the
controller, including gateway selection configuration, device parameter
configuration, and WAN-side as well as LAN-side link parameter
configurations.
NOTE
Before performing email-based deployment, ensure that the physical network connection is
normal. If an interface on an interface card is used for email-based deployment, ensure that the
interface card has been inserted into the corresponding slot based on the controller
configuration and the interface card has been registered successfully. Otherwise, the deployment
will fail.
Procedure
Step 1 Enable the function of sending deployment emails.
1. Log in to the Controller page and choose Network > Site to open the site
configuration page.
2. Selects the site for which a deployment email needs to be configured and
open the device configuration page.
– Configure a deployment email for the created site.
In the center of the page, select the hub site or branch site as required,
click Modify in the lower-right part, and then click the device icon
in the network topology on the right side to open the device
configuration page.
– Configure a deployment email when creating a site.
Drag the Hub Site or Branch site icon on the left side to the center of
the page, and then click the device icon in the network topology
on the right side to open the device configuration page.
Item Description
Step 2 Select the required email template from Select email template, modify the email
content based on deployment requirements, and click OK to complete the email
configuration.
● Configure the mailbox address to which emails will be sent, mailbox address
to which emails will be copied, and email subject.
● Configure the email content, including the URL used for email-based
deployment. For the URL format and supported URL parameters, see 5.4 URL.
It is recommended that a deployment email provide information including the
interfaces to which the gateway's LAN-side and WAN-side cables are
connected, deployment Wi-Fi network SSID and password to instruct
deployment engineers to deploy the site.
In the device's factory settings, the deployment Wi-Fi network SSID is a
character string that consists of PnP_ and the last six digits of the device's
ESN, in the PnP_xxxxxx format. The deployment Wi-Fi password is a character
string that consists of AR and the last six digits of the device's ESN, in the
ARxxxxxx format.
Step 3 Click OK at the lower-right corner of the page to send an email, as shown in
Figure 5-4.
----End
Background
The deployment engineer confirms that a deployment email has been received on
a deployment terminal such as a smartphone, tablet, laptop, or PC, installs and
starts the undeployed device onsite, and then connects the deployment terminal
to this device in wired or wireless mode for email-based deployment.
Pre-configuration Tasks
Power on the device and ensure that it finishes self check successfully.
Procedure
● Wireless access
Only the devices with the default WLAN mode as the AP mode support
wireless access of deployment terminals.
● Wired access (The following example uses a PC that has Windows 7 installed).
a. Connect a PC to the device's management interface using a network
cable.
A device's management interface is often marked with the Management
or MGMT silkscreen. The management interfaces of some device models
do not have this silkscreen; in this situation, see FAQs > Basic
Configuration > Which Interface Is Configured with the Default
Management IP Address? in the AR Router Troubleshooting Guide.
b. Configure an IP address for the PC.
Configure the PC to automatically obtain an IP address, as shown in
Figure 5-5.
In the device's factory settings, the management interface IP address is
192.168.1.1 and subnet mask is 255.255.255.0. If the PC automatically
obtains an IP address but cannot ping the connected management
interface IP address, configure a static IP address on the same network
segment as this management interface IP address, for example, configure
the IP address 192.168.1.2 and subnet mask 255.255.255.0 for the PC. If
the PC can ping the connected management interface IP address
successfully, this PC has been connected to the device.
----End
Pre-configuration Tasks
● Install a browser on the deployment terminal.
● Connect the deployment terminal to the device.
NOTE
Procedure
Step 1 Open the deployment email, copy the URL to the browser's address bar to execute
it. The deployment Portal page is then displayed in the browser, as shown in
Figure 5-6.
Step 3 Click Confirm Deployment to start the deployment process, as shown in Figure
5-8.
Step 4 (Optional) If the device needs to perform Portal authentication and activation
with the controller, that is, the optional parameter link_url is specified in the URL,
the Portal authentication and activation page will be displayed on the deployment
terminal. After confirming device information, select the Checked that
configurations are correct check box and click Active to complete device
authentication and activation, as shown in Figure 5-9.
Step 5 After the device completes the deployment configuration and registers with the
controller, the following page (as shown in Figure 5-10) is displayed on the
deployment terminal, indicating that the deployment succeeds.
----End
Networking Requirements
In Figure 5-11, an enterprise manages and maintains the network through a
controller, which then communicates with the enterprise network over the
Internet. The enterprise headquarters connects to the Internet through two
gateways. A new enterprise branch needs to connect to the Internet through the
gateway (RouterA) to communicate with the headquarters. After the network
administrator plans and configures the enterprise branch network on the
controller, the installation and maintenance engineer installs and deploys RouterA
onsite, removing the need to arrange a technical engineer to deploy RouterA
onsite.
The following provides controller information and RouterA information:
● The controller IP address is 1.1.1.1, controller port number is 10020, and
deployment mailbox address is [email protected].
● The deployment Wi-Fi network SSID of RouterA is PnP_000969. RouterA
connects to the Internet through GE0/0/4 and obtains a public network IP
address using PPPoE dial-up. The PPPoE user name is [email protected] and
password is [email protected].
Controller
RouterB
Enterprise
GE0/0/4
RouterA headquarters
Enterprise RouterC
branch
Configuration Roadmap
The configuration roadmap is as follows:
1. The network administrator configures a deployment email on the controller
and sends the email to a specified deployment mailbox.
2. The installation and maintenance engineer confirms that the deployment
email has been received, installs RouterA onsite, and then uses a mobile
phone to connect to RouterA in wireless mode for email-based deployment.
Procedure
Step 1 Configure and send a deployment email.
1. Log in to the Controller page and choose Network > Site to open the site
configuration page. In the center of the page, select the branch site to be
configured. The following example selects SubSite_ST in Figure 5-12 as the
site to be deployed. Click Modify in the lower-right part, and then click the
device icon in the network topology on the right side to open the
device configuration page.
3. Click OK in the lower-right part of Figure 5-14 to complete the branch site
configuration and send the deployment email.
----End
Definition
Deployment personnel send deployment short messages to 3G/LTE-supporting
devices. The devices then obtain and parse the short messages to activate 3G/LTE
links, and obtain and load a configuration file from a file server. This deployment
method can implement zero touch deployment of the devices in a batch.
Purpose
As the number of branches in enterprises keeps increasing, more branch devices
need to be deployed on enterprise networks. However, these branch devices
cannot be deployed uniformly because they are geographically dispersed and
difficult or fail to obtain wired communications resources. As a result, deployment
personnel often need to configure software for branch devices one by one onsite,
increasing deployment costs and reducing deployment efficiency.
Huawei offers SMS-based deployment function to solve this problem. This
function only requires deployment personnel to send deployment short messages
to branch devices, which then receive and parse the short messages and connect
to enterprise networks in 3G/LTE mode to active 3G/LTE links. Branch devices can
work with eSight network management system (NMS) and SMS gateways to
obtain a configuration file from a file server and load the files for zero touch
deployment in a batch. This function simplifies the deployment process and
reduces deployment costs.
Implementation
Before SMS-based deployment, enterprise network administrators save the
configuration file of devices to a specified file server. Devices need to be installed
and powered on before they can receive and parse deployment short messages.
According to the short messages, devices can obtain parameter information to
activate 3G/LTE links, and connect to the NMS or the file server to obtain and load
a configuration file for zero touch deployment.
When eSight is deployed in the enterprise headquarters to manage devices,
enterprise network administrators send deployment short messages to devices
through eSight after obtaining device information.
NOTE
Deployment short messages and parameter information are transmitted over a carrier network.
All the transmitted information will be encrypted using Advanced Encryption Standard (AES)
128 or Rivest-Shamir-Adleman (RSA) algorithm to ensure data security.
Figure 6-1 Device running flowchart during SMS-based deployment (when eSight
is available)
Start
Are No
messages parsed?
Yes
Perform 3G VPDN dial-up
No
Is dial-up successful?
Yes
Connect to eSight and obtain
a configuration file from a file
server
Is configuration file No
obtained?
Yes
Specify it as the next startup
configuration file
NOTE
Deployment short messages are encrypted using AES128 algorithm to ensure user
information security.
4. Activate 3G/LTE links.
Devices dial up to the enterprise network according to the APN activation
information obtained from the parsed deployment short messages. If the dial-
up is successful, they connect to the enterprise network over a 3G/LTE
network, and obtain IP addresses after passing authentication.
5. Obtain and load a configuration file.
a. Devices connect to eSight and send deployment registration requests.
After devices obtain IP addresses, they connect to eSight and send
deployment registration requests to it. eSight authenticates the
deployment registration requests. After successful authentication, eSight
returns file server parameter information, including the file server IP
address, user name, and password.
NOTE
The file server parameter information is encrypted using RSA algorithm to ensure
data security.
b. Devices connect to the file server to obtain and load a configuration file.
After devices obtain file server information, they connect to the file server
through SFTP, and then download and load the specified configuration
file. Configurations take effect on the devices after these devices restart.
NOTE
Devices will send status notifications to eSight regardless of whether they download a
configuration file successfully. If devices cannot download the configuration file, they
send the failure reason to eSight for fault location.
6. Register.
Devices connect to eSight again for registration after configurations take
effect. After devices have registered, enterprise network administrators can
deploy other services on the devices through eSight, including upgrading the
devices and load patches on the devices.
RouterA
Enterprise
branch 1
Enterprise headquarters
3G/LTE
network
eSight
(with a built-in SFTP server)
Enterprise
branch 2
RouterB
Onsite installation personnel install devices and then send device information to
enterprise network administrators. According to the received device information,
the administrators send deployment short messages to devices through eSight.
Devices receive and parse the short messages, connect to eSight over the 3G/LTE
network, and download as well as load a configuration file from a file server. This
method implements device registration and zero touch deployment. After device
deployment is completed, the administrators can upgrade these devices or deploy
other services on these devices through eSight.
Licensing Requirements
SMS-based deployment is a basic feature of a router and is not under license
control.
Feature Limitations
3G/LTE-supporting devices support SMS-based deployment. However, the AR109,
AR109W, AR109GW-L, AR129CV, AR129CVW, and AR129CGVW-L do not support
this function.
Pre-configuration Tasks
● Onsite installation personnel install, power on, and perform self-check on
devices.
● Enterprise network administrators obtain device information and SIM card
information.
● Devices support 3G/LTE functions and have SIM cards installed. Ensure that
areas where devices reside have 3G/LTE signals.
● eSight can send messages normally.
Procedure
Step 1 Create an SNMP template.
Log in to eSight, and choose Resource > Protocol Template > SNMP Template.
The SNMP Template page is displayed. Click Create to create an SNMP template,
as shown in Figure 6-3. Configure the SNMP template according to the SNMP
version. You are advised to configure Template Name and Parameter Type
before configuring other parameters, as shown in Table 6-2. Click OK to save the
configuration.
NOTE
Parameter Description
Timeout period Specifies the time during which eSight waits for a
response to an operation request.
Device Type drop-down list box, and click to select the device type,
as shown in Figure 6-13. Set parameters in the configuration template
according to service requirements, as shown in Table 6-3. Click Next to save
the configuration, as shown in Figure 6-6.
APN name Specifies the APN used to identify the GPRS service
type.
NOTE
– APNs are provided by carriers.
– For example, APNs of China Mobile, China Telecom,
and China Unicom are CMNET, CTNET, and 3GNET
respectively.
Parameter Description
2. Choose Short Message Deployment > Create. The short message creation
page is displayed, as shown in Figure 6-10.
3. Click Create Device and select Single Create from the drop-down list. The
Single Create page is displayed, as shown in Figure 6-11.
4. Enter information such as the device name and SIM card on the Single
Create page. Click behind the Device Type text box. The Select
Device Type page is displayed. Select the device types to be deployed, as
shown in Figure 6-13. Click OK to save the configuration.
5. Click behind the Mobile number text box. The Select mobile
number page is displayed. Select the imported mobile phone numbers, and
click OK to save the configuration, as shown in Figure 6-14.
6. Click behind the Message name text box. The Select short message
page is displayed. Select the created short messages, and click OK to save the
configuration, as shown in Figure 6-15.
7. Click OK to save the configuration, and then the created short messages will
be displayed on the Short Message Deployment page, as shown in Figure
6-16. Select the devices to be deployed and click Match Provisioning File to
select the created configuration template, as shown in Figure 6-17. Click OK
to save the configuration.
8. After the configuration has been saved, information about the configuration
template will be displayed on the Short Message Deployment page, as
shown in Figure 6-18. Click OK to finish SMS-based deployment
configuration.
9. Select the SMS-based deployment task and click Send Message for SMS-
based deployment, as shown in Figure 6-19.
NOTE
This step is recommended if you want to prevent device configurations from being
modified according to short messages sent from unauthorized phone numbers.
Subsequently, device configurations can be modified only according to short messages
sent from phone numbers in the configured mobile phone number whitelist.
Step 6 (Optional) Run the undo sms config autodeploy enable command to disable
SMS-based deployment.
By default, SMS-based deployment is enabled.
NOTE
After devices are deployed successfully, you are advised to disable SMS-based deployment
to prevent unauthorized users from forging deployment short messages to modify device
configurations.
----End
Networking Requirements
In Figure 6-20, eSight (with a built-in SFTP server) is deployed in the enterprise
headquarters. Dispersed branch devices connect to eSight through 3G/LTE dial-up.
The enterprise requires that branch devices are upgraded by onsite installation
personnel when a large number of branch devices are geographically dispersed
and difficult to obtain wired resources. Meanwhile, allow the mobile phone
number with that segment 456789 matches this number segment to send short
messages for SMS-based deployment. During deployment, devices can connect to
the enterprise network over a 3G/LTE network, and enterprise network
administrators can deploy devices through eSight.
Enterprise
Enterprise
branch 1
headquarters
3G/LTE
network
Router B
Enterprise eSight
branch 2 (with a bulit-in SFTP sever)
The following provides SIM card information and device information of RouterA.
● SIM card information: The IMSI is 987456321012345, the mobile phone
number is 135XXXXXXXX, the APN is 3gnet, the dial-up user name is admin,
and the dial-up password is huawei123.
NOTE
Configuration Roadmap
The configuration roadmap is as follows:
1. Save the configuration file to be loaded to branch devices to the SFTP server
to ensure that the devices can obtain the configuration file.
2. Operate eSight, make a configuration template.
3. Operate eSight, edit deployment short messages.
4. Configure SMS-based deployment.
5. Configure a mobile phone number whitelist to allow configuring devices
through mobile phone numbers in the whitelist.
Procedure
Step 1 Save the configuration file to be loaded to branch devices to the SFTP server.
Step 2 Make a configuration template.
1. Log in to eSight, and choose Resource > Protocol Template > SNMP
Template. The SNMP Template page is displayed. Click Create to create an
SNMP template, as shown in Figure 6-21. Set the SNMP version type to
SNMPv3, authentication protocol to HMAC_SHA, and privacy protocol to
AES_128, and configure other parameters according to service requirements.
Click OK to save the configuration.
3. Click Next and set ZTP Type to Config File. Click OK to save the
configuration, as shown in Figure 6-23.
file. After the template file has been uploaded, view the import results under
Detail. Click Create to finish batch import, as shown in Figure 6-24.
behind the Device Type text box. The Select Device Type page is
displayed. Select the device types to be deployed, as shown in Figure 6-27.
Click behind the Mobile number text box. The Select mobile
number page is displayed. Select the imported mobile phone number
2. Click OK to save the configuration, and then the created short messages will
be displayed on the Short Message Deployment page, as shown in Figure
6-30. Select the devices to be deployed and click Match Provisioning File to
select the created configuration template, as shown in Figure 6-31. Click OK
to save the configuration.
3. After the configuration has been saved, information about the configuration
template will be displayed on the Short Message Deployment page, as
shown in Figure 6-32. Click OK to finish SMS-based deployment
configuration.
4. Select the SMS-based deployment task and click Send Message for SMS-
based deployment, as shown in Figure 6-33.
5. View the configuration task status after clicking Send Message. Devices
receive and parse deployment short messages and connect to eSight in
3G/LTE mode. Devices then obtain file server information and access the file
server through SFTP to download and load a configuration file. After loading
a configuration file, the devices restart and then register with eSight. You can
manage branch devices through eSight after they register successfully.
Step 5 Configure a mobile phone number whitelist.
# Configure a mobile phone number whitelist to allow modifying device
configurations according to short messages sent from only mobile phone numbers
in the whitelist.
<Huawei> system-view
[Huawei] sms config caller 456789
Info: Succeed in setting whitelist.
----End
Table 7-1 Sub-interfaces supporting the fast provisioning function and the
function implementation
Sub-interface Implementation
ADSL sub-interface: supports the fast After the fast provisioning function is
provisioning function only when the enabled on an ADSL sub-interface, the
sub-interface is used in an IPoA automatic learning function is
scenario and the sub-interface type is triggered on the sub-interface when
P2P. the peer device sends ping packets and
the difference between the last byte of
the source IP address and that of the
destination IP address is one in the
ping packets (for example, the source
IP address is 192.168.1.1 and the
destination IP address is 192.168.1.2).
The local device obtains the
destination IP address in the ping
packets as the IP address of the ADSL
sub-interface.
Sub-interface Implementation
Serial sub-interface: supports the fast After the fast provisioning function is
provisioning function only when the enabled on a serial sub-interface, the
sub-interface is used in a synchronous device learns the FR Local
or asynchronous sub-interface and the Management Interface (LMI) protocol
sub-interface type is P2P. type of the peer device. The sub-
interface starts automatic learning
when the local and peer devices use
the same LMI protocol type. The
automatic learning function is
triggered on the sub-interface when
the peer device sends a ping packet
and the difference between the source
and destination IP addresses in the
ping packet is 1. The local device
obtains the DLCI from the ping packet
and sends the DLCI to a sub-interface
capable of automatic learning. The
sub-interface then learns the IP
address based on the DLCI.
NOTE
If a sub-interface obtains the DLCI but fails
to learn the matching IP address, it
attempts to learn the IP address again
when the peer device sends another ping
packet.
NOTE
The preceding sub-interfaces learn the mask length according to the ToS value in
ping packets. The Table 7-2 describes the mapping between ToS values and mask
lengths.
32 31
64 29
96 28
128 27
160 26
192 25
224 24
Other values 30
RouterA RouterB
Context
When configuring the fast provisioning function, pay attention to the following
points:
● 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 enabling the fast provisioning function on an interface, create a sub-
interface for the interface. Only the sub-interface can automatically learn
information such as the VLAN, IP address, and DLCI from the peer device.
● 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.
Procedure
Step 1 Run the system-view command to enter the system view.
Step 2 Run the fast provisioning enable [ restart ] command to enable the fast
provisioning function globally.
By default, the fast provisioning function is disabled globally.
Step 3 Enable the fast provisioning function on different sub-interfaces as required.
Configuration on Ethernet interfaces:
Currently, serial sub-interfaces support the fast provisioning function only when the
sub-interface type is P2P.
Step 4 (Optional) Run the fast-provisioning disable command to disable the fast
provisioning function on sub-interfaces.
----End
Follow-Up Process
Run the ping [ -tos tos-value ] host command on the peer device to trigger
automatic learning on the local device.
NOTE
Automatic learning can only be triggered by using the ping host or ping -tos tos-value host
command on the peer device.
Context
Configuration information about the fast provisioning function can be
automatically loaded to a device to be configured using the USB-based
deployment method. After a sub-interface on the device to be configured
automatically learns the configuration information, you can clear the
configuration information learned by the sub-interface if the configuration
information is different from the planned configuration. The sub-interface then
can relearn the configuration information.
NOTE
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.
After a sub-interface finishes automatic learning of configuration information, the
automatic learning record is not deleted when configuration on the sub-interface changes.
To trigger automatic learning on the sub-interface again, run the reset fast-provisioning
command on the main interface of the sub-interface to clear configurations on all sub-
interfaces of the main interface.
If multiple sub-interfaces of a main interface have finished automatic learning and one of
them needs to learn configuration again, run the reset fast-provisioning command on the
main interface to clear configurations on all the sub-interfaces. The sub-interfaces can then
automatically learn the configuration again.
If a new sub-interface is created on a main interface after all the previous sub-interfaces of
the main interface finish automatic learning of configurations, run the reset fast-
provisioning command on the main interface to clear configurations of all the sub-
interfaces. Then all the sub-interfaces can automatically learn configurations again.
Procedure
● In the interface view, run the reset fast-provisioning command to clear the
configuration learned and saved by a specified interface using the fast
● In the main interface view, run the reset fast-provisioning command to clear all
the configuration information saved by sub-interfaces of the main interface.
● In the sub-interface view, run the reset fast-provisioning command to clear only
the IP address saved by the sub-interface.
----End
Licensing Requirements
Configuring the fast provisioning is a basic feature of a router and is not under
license control.
Feature Limitations
None
Figure 7-2 Networking diagram for configuring the fast provisioning function
GE1/0/0.1
GE1/0/0.1
192.168.1.1/24
RouterA RouterB
Configuration Roadmap
The configuration roadmap is as follows:
1. Make a configuration file and load the file to RouterA using the USB-based
deployment method so that the fast provisioning function is enabled on
RouterA without manual configuration.
2. Configure basic information about a sub-interface on RouterB and send ping
packets to trigger the automatic learning function on GE1/0/0.1 of RouterA.
GE1/0/0.1 then can automatically learn VLAN and IP address settings.
Procedure
Step 1 Make a configuration file that contains configuration information about the fast
provisioning function. The process of making the file is not provided here. The fast
provisioning configuration information is as follows:
#
fast provisioning enable
#
interface GigabitEthernet1/0/0
fast-provisioning enable
#
interface GigabitEthernet1/0/0.1
#
Step 4 Send ping packets from RouterB to trigger the automatic learning function on
RouterA. Set the destination IP address of ping packets to 192.168.1.2 and the ToS
value to 224.
[RouterB] ping -tos 224 192.168.1.2
PING 192.168.1.2 : 56 data bytes, press CTRL_C to break
Request time out
Reply from 192.168.1.2 : bytes=56 Sequence=2 ttl=255 time=4 ms
Reply from 192.168.1.2 : bytes=56 Sequence=3 ttl=255 time=530 ms
Reply from 192.168.1.2 : bytes=56 Sequence=4 ttl=255 time=4 ms
Reply from 192.168.1.2 : bytes=56 Sequence=5 ttl=255 time=1 ms
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 1/134/530 ms
The preceding command output shows that GE1/0/0.1 on RouterA learns the
VLAN tag value 11, IP address 192.168.1.2, and mask length 24.
# View the saved configuration information of GE1/0/0.1 on RouterA.
[RouterA] interface gigabitethernet 1/0/0.1
[RouterA-GigabitEthernet1/0/0.1] display this
[V200R005C10]
#
interface GigabitEthernet1/0/0.1
dot1q termination vid 11
ip address 192.168.1.2 255.255.255.0
#
return
The preceding command output shows that configuration information such as the
IP address learned by GE1/0/0.1 on RouterA is saved.
----End
Configuration File
Configuration file of RouterB
#
sysname RouterB
#
interface GigabitEthernet1/0/0.1
dot1q termination vid 11
ip address 192.168.1.1 255.255.255.0
#
return
To enter the CLI of a new device to perform basic configuration, you must log in
to the device for the first time through a console port or mini USB port.
NOTE
● Before logging in to the device using the mini USB port, install the mini USB port driver
on the user terminal.
To obtain the mini USB driver, visit https://support.huawei.com/enterprise and select
AR_MiniUSB_driver to download. The mini USB driver supports only Windows XP,
Windows Vista, and Windows 7 operating systems.
● When both the mini USB port and console port are connected to the user terminal, only
the mini USB port can be used for login.
Licensing Requirements
Logging in to a device for the first time is a basic feature of a router and is not
under license control.
Feature Limitations
None
Pre-configuration Tasks
Before logging in to the device through the console port, complete the following
tasks:
NOTE
You can use the self-contained terminal emulation software of the operating system (such
as PuTTY) on your PC. If the operating system does not provide terminal emulation
software, use third-party terminal emulation software. For details, see the software user
guide or online help.
Default Settings
Parity None
Stop bits 1
Data bits 8
Procedure
Step 1 Connect the DB9 female connector of the console cable to the COM port on the
PC, and connect the RJ45 connector to the console port on the device, as shown in
Figure 8-1.
Step 2 Start the terminal emulation software on the PC. Create a connection, select the
connected port, and set communication parameters. (This section uses the third-
party software PuTTY as an example.)
NOTE
Step 3 Click Connect. The following information is displayed. Enter the password. The
default username and password are available in AR Router Default Usernames
and Passwords (Enterprise Network or Carrier). If you have not obtained the
access permission of the document, see Help on the website to find out how to
obtain it.
Login authentication
Username:admin
Password:
<Huawei>
Info: The entered password is the same as the default. You are advised to change
it to ensure security.
NOTE
You can run commands to configure the device. Enter a question mark (?)
whenever you need help.
----End
Pre-configuration Tasks
Before logging in to a device through the mini USB port, complete the following
tasks:
NOTE
You can use the self-contained terminal emulation software of the operating system (such
as the PuTTY) on the PC. If no built-in terminal emulation software is available, use the
third-party terminal emulation software. For details, see the software user guide or online
help.
Default Settings
Parity None
Stop bits 1
Data bits 8
Procedure
Step 1 Start the terminal emulation software on the PC. Create a connection, select the
connected port, and set communication parameters. (This section uses the third-
party software PuTTY as an example.)
NOTE
Step 2 Click Connect. The following information is displayed. Enter the password. The
default username and password are available in AR Router Default Usernames
and Passwords (Enterprise Network or Carrier). If you have not obtained the
access permission of the document, see Help on the website to find out how to
obtain it.
Login authentication
Username:admin
Password:
<Huawei>
Info: The entered password is the same as the default. You are advised to change
it to ensure security.
NOTE
You can run commands to configure the device. Enter a question mark (?)
whenever you need help.
----End
Procedure
Step 1 Set the time and date on the device.
1. Run clock timezone time-zone-name { add | minus } offset
The time zone is set.
If you do not specify the time zone name, the system uses Default Zone
Name.
– add: adds the specified time zone offset to the Coordinated Universal
Time (UTC). That is, the sum of the default UTC time zone and offset
equals the time zone specified by time-zone-name.
– minus: subtracts the specified time zone offset from the UTC. That is, the
remainder obtained by subtracting offset from the default UTC time zone
equals the time zone specified by time-zone-name.
You can configure the character set so that the system supports only English input or both
Chinese and English inputs.
1. Run system-view
The system view is displayed.
2. Run language character-set character
The character set in the system is configured.
The default character set in the system is ISO8859-1, that is, the system
supports only English input.
3. Run quit
Exit from the system view.
Step 3 Set the device name and management IP address.
1. Run system-view
The system view is displayed.
By default, the query response processing function for the NETBIOS name
service is disabled.
2. Run sysname host-name
The device name is set.
The system provides two authentication modes: AAA authentication and password
authentication. AAA authentication requires both the user name and password, which
is more secure than password authentication. This section describes how to configure
AAA authentication. For the configuration method of other authentication modes, see
Configuring an Authentication Mode for a VTY User Interface.
6. Run aaa
The AAA view is displayed.
----End
Figure 8-6 Networking diagram for configuring the device through the console
port
Console GE 0/0/0
Network
Configuration Roadmap
1. Log in to the device through the console port.
2. Configure the device.
Procedure
Step 1 Log in to the device from PC1 through the console port. For details, see Logging
In to a Device for the First Time Through a Console Port.
Step 2 Configure the device.
# Set the system date, time, and time zone.
<Huawei> clock timezone BJ add 08:00:00
<Huawei> clock datetime 20:10:00 2015-03-26
# Set the user level and authentication mode for Telnet users.
[Server] telnet server enable
[Server] user-interface vty 0 4
[Server-ui-vty0-4] user privilege level 15
[Server-ui-vty0-4] authentication-mode aaa
[Server-ui-vty0-4] quit
[Server] aaa
[Server-aaa] local-user admin1234 password irreversible-cipher Helloworld@6789
[Server-aaa] local-user admin1234 privilege level 15
[Server-aaa] local-user admin1234 service-type telnet
[Server-aaa] quit
# Press Enter. On the displayed login page, enter the user name and password. If
the authentication succeeds, the command line interface for the user view is
displayed. (The following information is only for reference.)
Username:admin1234
Password:
<Server>
----End
Configuration Files
#
sysname Server
#
clock timezone BJ add 08:00:00
#
aaa
local-user admin1234 password irreversible-cipher %^%#*~Br";[g6Pv5Zf>$~{hY+N!`{$<[Y{;l02P)B,EBz\1FN!c
+%^%#
local-user admin1234 privilege level 15
local-user admin1234 service-type telnet
#
interface GigabitEthernet0/0/0
ip address 10.137.217.177 255.255.255.0
#
telnet server enable
#
user-interface vty 0 4
authentication-mode aaa
user privilege level 15
#
return
You can log in to a device through its console port or mini USB port, or using
Telnet, redirection, reverse Telnet, or STelnet to manage and maintain the device.
The reverse Telnet function enables dumb terminals that are directly connected to
a router using asynchronous serial cables or console cables to log in to a remote
server.
9.10 Typical Operations After Login
After logging in to a device through a console port or mini USB port, or using
Telnet or STelnet, you can perform service configurations and the following
common operations on the device.
9.11 Configuration Examples for CLI Login
This section describes examples of logging in to a device through a console port,
Telnet, or STelnet.
9.12 Troubleshooting CLI Login
This section describes common faults caused by incorrect configurations and
provides the corresponding troubleshooting procedures.
9.13 FAQ About CLI Login
This section describes common problems you may encounter during the
configuration and provides the solutions to these problems.
When a user logs in to a device through CLI, the system assigns a user interface to
manage and monitor the session between the device and user. Each user interface
has a user interface view, where you can set parameters, such as the
authentication mode and user level. Users logging in through the user interface
When a user logs in, the system allocates the idle user interface with the smallest
number to the user based on the user's login mode. The login process is restricted
by the configuration in the user interface view. For example, when user A logs in
through the console port, the login process depends on the configuration in the
console user interface view; however, when it logs in through VTY 1, the login
process depends on the configuration in the VTY 1 user interface view. If a user
logs in to a device using different methods, the user will be allocated different
user interfaces. If a user logs in to a device at different time, the user may be
allocated different user interfaces.
● Relative numbering
The numbering format is user interface type + number.
This mode uniquely specifies a user interface or a group of user interfaces of
the same type. Relative numbering adheres to the following rules:
– Console user interface numbering: CON 0.
– TTY user interface numbering: The first TTY user interface is TTY 1, the
second TTY user interface is TTY 2, and so on
– VTY user interface numbering: The first VTY user interface is VTY 0, the
second VTY user interface is VTY 1, and so on.
● Absolute numbering
This mode uniquely specifies a user interface or a group of user interfaces.
You can run the display user-interface command to view user interfaces and
their absolute numbers supported by the device.
Each MPU supports only one console user interface and 15 VTY user
interfaces. You can run the user-interface maximum-vty command in the
system view to set the maximum number of VTY user interfaces. The default
value is 5. By default, numbers VTY 16 to VTY 20 are reserved by the system
and are unaffected by the user-interface maximum-vty command.
Table 9-2 lists the default absolute numbers of the console, TTY and VTY user
interfaces.
Table 9-2 Default absolute numbers of the console and VTY user interfaces
VTY user Manages and 129 to 143 The first VTY user
interface controls users interface is VTY 0, the
who log in using second VTY user
Telnet or interface is VTY 1, and so
STelnet. on. By default, VTY 0 to
VTY 4 are available.
Absolute numbers 129 to
143 map relative
numbers VTY 0 to VTY
14.
● AAA authentication: Users must enter both user names and passwords for
login. If either a user name or a password is incorrect, the login fails.
● Password authentication: Users must enter passwords for login. Only after a
user enters the correct password does the device allow the users to log in.
Licensing Requirements
CLI login configuration is a basic feature of a router and is not under license
control.
Feature Limitations
None
Context
The data transmission and screen display attributes of the console user interface
are as follows:
● Data transmission attributes: transmission rate, flow control mode, parity bit,
stop bit, and data bit. These attributes determine the data transmission mode
used in the console port login process.
● Screen display attributes: timeout period of a connection, number of rows and
columns displayed on a terminal screen, and buffer size for historical
commands. These attributes determine terminal screen display for console
port login.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run user-interface console 0
The console user interface view is displayed.
Step 3 Configure data transmission attributes.
NOTE
The data transmission attributes configured on the terminal software must be the same as
those on the device.
1. Run speed speed-value
The transmission rate is set.
The default transmission rate is 9600 bit/s.
2. Run flow-control { hardware | none }
The flow control mode is set.
The default flow control mode is set to none, indicating that the flow control
function is not performed.
NOTE
packets on the console port fail to pass the parity check, the device discards
the packets.
5. Run stopbits { 1 | 1.5 | 2 }
The stop bit is set.
The default stop bit is 1. The stop bit indicates the end of a packet. More stop
bits indicate lower transmission efficiency.
Step 4 Configure screen display attributes.
1. Run idle-timeout minutes [ seconds ]
A timeout period is set for a user connection.
If a connection remains idle for the specified timeout period, the system
automatically ends the connection after the timeout period expires.
The default timeout period is 5 minutes.
NOTE
If you set the timeout period of a terminal connection to 0 or too long, the terminal
remains logged in to a device, which is a potential security risk. It is recommended
that you run the lock command to lock the connection.
2. Run screen-length screen-length
The number of rows displayed on a terminal screen is set.
The default number of rows displayed on a terminal screen is 24.
NOTE
----End
Context
The system provides two authentication modes for the console user interface: AAA
authentication and password authentication.
● AAA authentication: Users must enter both user names and passwords for
login. If either a user name or a password is incorrect, the login fails.
● Password authentication: Users must enter passwords for login. Only after a
user enters the correct password does the device allow the users to log in.
Procedure
● Configure AAA authentication.
a. Run system-view
The system view is displayed.
b. Run user-interface console 0
The console user interface view is displayed.
c. Run authentication-mode aaa
The authentication mode is set to AAA authentication.
d. (Optional) run authentication-domain domain-name
An authentication domain is configured.
By default, the authentication domain is default. If you want to change
the currently used authentication domain for users on the console user
interface, you can run this command.
e. Run quit
Exit the console user interface view.
f. Run aaa
The AAA view is displayed.
g. Run local-user user-name password irreversible-cipher password
A local user account is created and a password is configured.
h. Run local-user user-name service-type terminal
The access type of the local user is set to Console.
i. Run quit
Exit the AAA view.
● Configure password authentication.
a. Run system-view
The system view is displayed.
b. Run user-interface console 0
The console user interface view is displayed.
c. Run authentication-mode password
The authentication mode is set to password authentication.
d. Run set authentication password cipher
An authentication password is set.
----End
Context
● You can configure different user levels to control access rights of different
users and improve device security.
● There are 16 user levels numbered from 0 to 15, in ascending order of priority.
● User levels map command levels. A user can use only the commands of the
corresponding level or lower. Table 9-3 describes mappings between user
levels and command levels.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run user-interface console 0
The console user interface view is displayed.
By default, the users on the console user interface are at level 15.
● If the user level configured for a user interface conflicts with that configured
for a user, the user level configured for the user takes precedence.
● If password authentication is configured, the levels of commands accessible to
a user depend on the level of the console user interface through which the
user logs in.
● If AAA authentication is configured, the levels of commands accessible to a
user depend on the level of the local user specified in AAA configuration. By
default, the level of a local user is 0 in AAA configuration. You can run the
local-user user-name privilege level level command in the AAA view to
change the level of the local user in AAA configuration.
----End
Context
After completing console user interface configurations on a device, you can log in
to the device through the console port. If the console user interface uses the
default attribute settings and password authentication, perform the following
steps to log in to the device.
Procedure
Step 1 Connect the DB9 female connector of the console cable to the COM port on the
PC, and connect the RJ45 connector to the console port on the device, as shown in
Figure 9-1.
Step 2 Start the terminal emulation software on the PC. Create a connection, select the
connected port, and set communication parameters. (This section uses the third-
party software PuTTY as an example.)
Select the connected port based on actual situations. For example, you can
view port information in Device Manager in the Windows operating system,
and select the connected port.
NOTE
Step 3 Click Connect. The following information is displayed, prompting you to enter a
password. (In AAA authentication, the system prompts you to enter the user name
and password. The following information is only for reference.)
Login authentication
Password:
<Huawei>
You can run commands to configure the device. Enter a question mark (?)
whenever you need help.
----End
Context
The data transmission and screen display attributes of the console user interface
are as follows:
● Data transmission attributes: transmission rate, flow control mode, parity bit,
stop bit, and data bit. These attributes determine the data transmission mode
used in the MiniUSB port login process.
● Screen display attributes: timeout period of a connection, number of rows and
columns displayed on a terminal screen, and buffer size for historical
commands. These attributes determine terminal screen display for MiniUSB
port login.
Procedure
Step 1 Run system-view
The data transmission attributes configured on the terminal software must be the same as
those on the device.
1. Run speed speed-value
The default flow control mode is set to none, indicating that the flow control
function is not performed.
NOTE
NOTE
If you set the timeout period of a terminal connection to 0 or too long, the terminal
remains logged in to a device, which is a potential security risk. It is recommended
that you run the lock command to lock the connection.
2. Run screen-length screen-length
The number of rows displayed on a terminal screen is set.
The default number of rows displayed on a terminal screen is 24.
NOTE
----End
Context
The system provides two authentication modes for the console user interface: AAA
authentication and password authentication.
● AAA authentication: Users must enter both user names and passwords for
login. If either a user name or a password is incorrect, the login fails.
● Password authentication: Users must enter passwords for login. Only after a
user enters the correct password does the device allow the users to log in.
Procedure
● Configure AAA authentication.
a. Run system-view
The system view is displayed.
b. Run user-interface console 0
The console user interface view is displayed.
c. Run authentication-mode aaa
The authentication mode is set to AAA authentication.
d. (Optional) run authentication-domain domain-name
An authentication domain is configured.
By default, the authentication domain is default. If you want to change
the currently used authentication domain for users on the console user
interface, you can run this command.
e. Run quit
Exit the console user interface view.
f. Run aaa
The AAA view is displayed.
g. Run local-user user-name password irreversible-cipher password
A local user account is created and a password is configured.
h. Run local-user user-name service-type terminal
The access type of the local user is set to Console.
i. Run quit
----End
Context
● You can configure different user levels to control access rights of different
users and improve device security.
● There are 16 user levels numbered from 0 to 15, in ascending order of priority.
● User levels map command levels. A user can use only the commands of the
corresponding level or lower. Table 9-4 describes mappings between user
levels and command levels.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run user-interface console 0
The console user interface view is displayed.
Step 3 Run user privilege level level
A user level is set.
By default, the users on the console user interface are at level 15.
● If the user level configured for a user interface conflicts with that configured
for a user, the user level configured for the user takes precedence.
● If password authentication is configured, the levels of commands accessible to
a user depend on the level of the console user interface through which the
user logs in.
● If AAA authentication is configured, the levels of commands accessible to a
user depend on the level of the local user specified in AAA configuration. By
default, the level of a local user is 0 in AAA configuration. You can run the
local-user user-name privilege level level command in the AAA view to
change the level of the local user in AAA configuration.
----End
Context
After completing console user interface configurations on a device, you can log in
to the device through the mini USB port. If the console user interface uses the
default attribute settings and password authentication.
Procedure
Step 1 Start the terminal emulation software on the PC. Create a connection, select the
connected port, and set communication parameters. (This section uses the third-
party software PuTTY as an example.)
Select the connected port based on actual situations. For example, you can
view port information in Device Manager in the Windows operating system,
and select the connected port.
NOTE
Step 2 Click Connect. The following information is displayed, prompting you to enter a
password. (In AAA authentication, the system prompts you to enter the user name
and password. The following information is only for reference.)
Login authentication
Password:
<Huawei>
You can run commands to configure the device. Enter a question mark (?)
whenever you need help.
----End
NOTICE
The Telnet protocol has security vulnerabilities. It is recommended that you log in
to the device using STelnet V2.
Context
You can configure attributes for a VTY user interface to control Telnet login and
screen display. The attributes of a VTY user interface include the maximum
number of VTY user interfaces, timeout period of a user connection, number of
rows and columns displayed on a terminal screen, and buffer size for historical
commands.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run user-interface maximum-vty number
The maximum number of VTY user interfaces is set. The value determines the
number of users that can concurrently log in to the device using Telnet or STelnet.
By default, the maximum number of VTY user interfaces is 5.
NOTE
● When the maximum number of VTY user interfaces is set to 0, no user (including Telnet
and SSH users) can log in to the device through the VTY user interface, and web users
cannot log in to the device through the web system either.
● If the configured maximum number is less than the current maximum number of online
users, the system displays a configuration failure message.
● If the configured maximum number is greater than the current maximum number of
online users, you need to configure an authentication mode for additional user
interfaces.
By default, all VTY terminal services are enabled. If you disable the terminal
service of a VTY user interface, users cannot log in through the VTY user interface.
If a connection remains idle for the specified timeout period, the system
automatically terminates the connection after the timeout period expires, which
conserves system resources.
If you set the timeout period of a terminal connection to 0 or too long, the terminal
remains logged in to a device, which is a potential security risk. It is recommended that you
run the lock command to lock the connection.
If you specify temporary in the command, 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.
The default buffer size is 10, that is, a maximum of 10 historical commands can
be buffered.
----End
Context
The system provides two authentication modes for a VTY user interface: AAA
authentication and password authentication.
● AAA authentication: Users must enter both user names and passwords for
login. If either a user name or a password is incorrect, the login fails.
● Password authentication: Users must enter passwords for login. Only after a
user enters the correct password does the device allow the users to log in.
Procedure
● Configure AAA authentication.
a. Run system-view
The system view is displayed.
b. Run user-interface vty first-ui-number [ last-ui-number ]
The VTY user interface view is displayed.
c. Run protocol inbound { all | telnet }
The VTY user interface is configured to support the Telnet protocol.
By default, a VTY user interface supports the SSH and Telnet protocol.
d. Run authentication-mode aaa
The authentication mode is set to AAA authentication.
e. (Optional) run authentication-domain domain-name
An authentication domain is configured.
By default, the authentication domain is default. If you want to change
the currently used authentication domain for users on the VTY user
interface, you can run this command.
f. Run quit
Exit the VTY user interface view.
g. Run aaa
The AAA view is displayed.
h. Run local-user user-name password { cipher | irreversible-cipher }
password
A local user account is created and a password is configured.
i. Run local-user user-name service-type telnet
The access type of the local user is set to Telnet.
j. Run quit
Exit the AAA view.
● Configure password authentication.
a. Run system-view
The system view is displayed.
By default, a VTY user interface supports the SSH and Telnet protocol.
d. Run authentication-mode password
----End
Context
● You can configure different user levels to control access rights of different
users and improve device security.
● There are 16 user levels numbered from 0 to 15, in ascending order of priority.
● User levels map command levels. A user can use only the commands of the
corresponding level or lower. Table 9-5 describes mappings between user
levels and command levels.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run user-interface vty first-ui-number [ last-ui-number ]
The VTY user interface view is displayed.
Step 3 Run user privilege level level
A user level is set.
By default, the users on the VTY user interface are at level 0.
● If the user level configured for a user interface conflicts with that configured
for a user, the user level configured for the user takes precedence.
● If password authentication is configured, the levels of commands accessible to
a user depend on the level of the VTY user interface through which the user
logs in.
● If AAA authentication is configured, the levels of commands accessible to a
user depend on the level of the local user specified in AAA configuration. By
default, the level of a local user is 0 in AAA configuration. You can run the
local-user user-name privilege level level command in the AAA view to
change the level of the local user in AAA configuration.
----End
Context
When a device functions as a Telnet server, you can specify the protocol port and
source interface of the Telnet server to enhance Telnet connection security.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run telnet [ ipv6 ] server enable
The Telnet server function is enabled.
By default, the Telnet server function is disabled on a device.
Step 3 (Optional) Run telnet server port port-number
The protocol port number is specified for the Telnet server.
By default, the protocol port number of the Telnet server is 23.
You can configure a new protocol port number for a Telnet server to prevent
attackers from accessing the server using the default port.
Step 4 (Optional) Run telnet server permit interface { interface-type interface-number }
&<1-5>
The physical interfaces on the Telnet server to which clients can connect is
specified.
Step 5 (Optional) Run telnet server-source { -a [ ipv6 ] source-ip-address | -i [ ipv6 ]
interface-type interface-number }
The source interface is specified for the Telnet server.
By default, the source interface of a Telnet server is not specified.
If the source IP address is not specified for the Telnet server, the device selects a
source IP address according to routing entries to send packets. Specify an interface
in stable state, such as a loopback interface, as the source interface. Before
specifying a source interface, make sure that the Telnet client has a reachable
route to the source interface. Otherwise, the configuration will fail.
Step 6 (Optional) Configure ACL-based Telnet access control.
● Control access to the local device.
a. Run acl acl-number
An ACL is created, and the ACL view is displayed.
acl-number refers to a basic ACL numbered from 2000 to 2999.
b. Run rule permit source source-address 0
ACL rules are configured to prohibit devices except the device specified by
source-address from accessing the local device.
c. Run quit
Exit the ACL view.
d. Run user-interface vty first-ui-number [ last-ui-number ]
The VTY user interface view is displayed.
e. Run acl [ ipv6 ] acl-number inbound
The ACL-based Telnet access control is configured for the VTY user
interface.
----End
Context
After completing Telnet server configurations on a device, you can use either
Telnet software or Windows Command Prompt on a PC to log in to the device.
Assume that AAA authentication is configured and the management IP address of
the device is 10.137.217.177. The Windows Command Prompt is used as an
example to illustrate the Telnet login process.
Procedure
Step 1 Enter the Windows Command Prompt window.
Step 2 Run the telnet ip-address command to log in to the device using Telnet.
C:\Documents and Settings\Administrator> telnet 10.137.217.177
Step 3 Press Enter and enter the password and user name configured for AAA
authentication. The system does not provide a default user name and password. If
authentication succeeds, the CLI is displayed, indicating that you have successfully
logged in to the device. (The following information is for reference only.)
Login authentication
Username:admin1234
Password:
<Telnet Server>
----End
● Run the display tcp status command to check all TCP connections.
● Run the display telnet server status command to check current Telnet server
connections.
Context
A device can function as a Telnet server to allow other devices to log in or as a
Telnet client to log in to other devices. When a terminal lacks the necessary
software or no reachable route exists between the terminal and target device, you
can log in to an intermediate device and then use Telnet to log in to the target
device from the intermediate device. The intermediate device functions as a Telnet
client.
The device can function as a Telnet IPv6 client. You can specify the source address
or interface of the Telnet client to ensure security of the management IP address.
Network1 Network2
Pre-configuration Tasks
Before configuring a device as a Telnet client to log in to another device, complete
the following tasks:
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Run telnet client-source { -a source-ip-address | -i interface-type
interface-number }
The source IP address of the Telnet client is set.
The source address of the Telnet client displayed on the server is the same as that
configured in this step.
Step 3 Run quit
Exit the system view.
Step 4 Run either of the following commands to log in to another device based on the
network address type.
● In IPv4 mode, run the telnet [ -a source-ip-address ] host-ip [ port-number ]
command to log in to another device as a Telnet client.
● In IPv6 mode, run the telnet ipv6 [ -a source-ip-address ] host-ipv6 [ -oi
interface-type interface-number ] [ port-number ] command to log in to
another device as a Telnet IPv6 client.
----End
NOTE
The STelnet V1 protocol has security vulnerabilities. It is recommended that you log in to
the device using STelnet V2.
Context
You can configure attributes for a VTY user interface to control STelnet login and
screen display. The attributes of a VTY user interface include the maximum
number of VTY user interfaces, timeout period of a user connection, number of
rows and columns displayed on a terminal screen, and buffer size for historical
commands.
Procedure
Step 1 Run system-view
The system view is displayed.
NOTE
● When the maximum number of VTY user interfaces is set to 0, no user (including Telnet
and SSH users) can log in to the device through the VTY user interface, and web users
cannot log in to the device through the web system either.
● If the configured maximum number is less than the current maximum number of online
users, the system displays a configuration failure message.
● If the configured maximum number is greater than the current maximum number of
online users, you need to configure an authentication mode for additional user
interfaces.
If you set the timeout period of a terminal connection to 0 or too long, the terminal
remains logged in to a device, which is a potential security risk. It is recommended that you
run the lock command to lock the connection.
----End
Context
To configure a VTY user interface to support SSH, you must set the authentication
mode of the VTY user interface to AAA; otherwise, the protocol inbound ssh
command does not take effect.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run user-interface vty first-ui-number [ last-ui-number ]
The VTY user interface view is displayed.
Step 3 Run authentication-mode aaa
The authentication mode is set to AAA authentication.
Step 4 (Optional) run authentication-domain domain-name
An authentication domain is configured.
By default, the authentication domain is default. If you want to change the
currently used authentication domain for users on the VTY user interface, you can
run this command.
Step 5 (Optional) If you want to change the currently used authentication domain for
users on the VTY user interface, run authentication-domain domain-name
An authentication domain is configured.
By default, the authentication domain is default.
Step 6 Run protocol inbound { all | ssh }
The VTY user interface is configured to support the SSH protocol.
By default, a VTY user interface supports the SSH and Telnet protocol.
Step 7 Run quit
Return to the system view.
Step 8 Run ssh user user-name authentication-type { password | rsa | password-rsa |
ecc | password-ecc |all }rsa peer-public-key or ecc peer-public-keykey-name
----End
Context
● You can configure different user levels to control access rights of different
users and improve device security.
● There are 16 user levels numbered from 0 to 15, in ascending order of priority.
● User levels map command levels. A user can use only the commands of the
corresponding level or lower. Table 9-6 describes mappings between user
levels and command levels.
Procedure
● If a user uses password authentication mode, the user level is configured in
the AAA view.
a. Run system-view
The system view is displayed.
b. Run aaa
The AAA view is displayed.
c. Run local-user user-name privilege level level
The local user level is configured.
d. Run quit
Return to the system view.
● If a user uses RSA or ECC authentication mode, the user level is determined
by the user level of the VTY interface to which the user logs in.
a. Run system-view
The system view is displayed.
b. Run user-interface vty first-ui-number [ last-ui-number ]
The VTY user interface view is displayed.
c. Run user privilege level level
The user level is configured for the VTY user interface.
By default, the user level of a VTY user interface is 0.
NOTE
● If an SSH user uses all authentication mode and an AAA user with the same name
as the SSH user exists, user levels may be different in password, RSA and ECC
authentication modes. Configure the user level based on actual requirements.
● If the user level configured for a user interface conflicts with that configured for a
user, the user level configured for the user takes precedence.
----End
Context
SSH users can be authenticated in the following modes: password, Revest-Shamir-
Adleman Algorithm (RSA), Elliptic Curves Cryptography (ECC), password-RSA,
Password-ECC and all.
● Password authentication: is based on the user name and password. You need
to configure a password for each SSH user in the AAA view. A user must enter
the correct user name and password to log in using SSH.
● Rivest-Shamir-Adleman Algorithm (RSA) authentication: is based on the
private key of the client. RSA is a public-key cryptographic system that uses an
asymmetric encryption algorithm. An RSA key pair consists of a public key
and a private key. You need to copy the public key generated by the client to
the SSH server. The SSH server then uses the public key to encrypt data. A
maximum of 20 keys can be stored on a device functioning as an SSH client.
● Elliptic Curves Cryptography (ECC) authentication: is an elliptic curve
algorithm. Compared with RSA, ECC features shorter key length, lower
computational cost, faster processing speed, smaller storage space, and lower
bandwidth requirement under the same security performance.
● Password-RSA authentication: The SSH server implements both password and
RSA authentication on login users. The users must pass both authentication
modes to log in.
● Password-ECC authentication: The SSH server implements both password and
ECC authentication on login users. The users must pass both authentication
modes to log in.
● All authentication: The SSH server implements RSA, ECC or password
authentication on login users. Users only need to pass either of them to log
in.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Configure AAA user information.
1. Run aaa
The AAA view is displayed.
2. Run local-user user-name password { cipher | irreversible-cipher } password
A local user is created and a password is configured.
3. Run local-user user-name privilege level level
A user level is set for the local user.
4. Run local-user user-name service-type ssh
A service type is set for the local user.
5. Run quit
Return to the system view.
Step 3 Run ssh user user-name authentication-type { password | rsa | password-rsa |
ecc | password-ecc |all }
An authentication mode is set for the SSH user.
● If password authentication is used, the SSH user is the user with the same
name as the local user configured in the AAA view.
● If RSA or ECC authentication is used, you need to configure the public key
generated by the SSH client on the SSH server. When the SSH client logs in to
the SSH server, the SSH client passes the authentication if the private key of
the client matches the configured public key.
NOTE
In RSA or ECC authentication mode, the user level configured in the VTY user interface
view takes effect.
----End
Context
A device serving as an SSH server must generate a key pair of the same type as
the client's key for data encryption and server authentication on the client. The
device also supports configuration of rich SSH server attributes for flexible control
on SSH login.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run stelnet server enable
The SSH server function is enabled on the device.
By default, the SSH server function is disabled.
Step 3 (Optional) Run ssh server cipher { 3des_cbc | aes128_cbc | aes128_ctr |
aes192_ctr | aes256_ctr | blowfish_cbc | des_cbc }*
An encryption algorithm list is configured for the SSH server.
By default, algorithms except des_cbc are included in the encryption algorithm list
of the SSH server.
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.
NOTE
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.
Step 4 (Optional) Run ssh server hmac { md5 | md5_96 | sha1 | sha1_96 | sha2_256 |
sha2_256_96 }*
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.
NOTE
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.
During the negotiation process, the client and server negotiate the key exchange
algorithm for packet transmission. You can perform this step to configure a key
exchange algorithm list for the SSH server. The server compares the key exchange
algorithm list sent by the client with its own key exchange algorithm list, and
selects the first key exchange algorithm on the client's list that matches a key
exchange algorithm on its own list as the key exchange algorithm for packet
transmission. If no algorithm on the client's list matches an algorithm on the
server's list, the negotiation fails.
NOTE
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.
NOTE
A longer key pair indicates higher security. It is recommended that you use the maximum
key pair length.
If the SSH server is enabled to be compatible with earlier SSH versions, the system prompts
a security risk.
----End
Context
After completing SSH user and STelnet server configurations on a device, you can
use STelnet software on a PC to log in to the device. Assume that password
authentication is configured for SSH users and the management IP address of the
device is 10.137.217.203. The third-party software, PuTTY, is used as an example to
illustrate the STelnet login process.
Procedure
Step 1 Start the PuTTY software, enter the device's IP address and port and select the
SSH protocol.
Step 2 Click Open. In the displayed page, enter the user name and password and press
Enter to log in to the device through STelnet.
login as: client001 //Enter the SSH user name.
Sent username "client001"
<SSH Server>
----End
● Run the display ssh server session command to check information about
sessions between the SSH server and client.
Context
A device can function as both an STelnet server and an STelnet client. As an
STelnet client, the device can log in to other devices. When a terminal lacks the
necessary software or no reachable route exists between the terminal and target
device, you can log in to an intermediate device and then use STelnet to log in to
the target device from the intermediate device. The intermediate device functions
as an STelnet client.
As shown in Figure 9-8, a PC connects to a device through network 1 and the
device connects to an STelnet server through network 2. The PC cannot directly
communicate with the STelnet server. In this situation, you can configure the
device as an STelnet client and log in to the STelnet server from the device.
Network1 Network2
Pre-configuration Tasks
Before configuring a device as an STelnet client to log in to another device,
complete the following tasks:
● Log in to the device from a terminal.
● Configure a reachable route between the device and STelnet server.
● Enable the STelnet server function on the STelnet server.
● Obtain the SSH user name and password, server keys, and port number
configured on the STelnet server.
Procedure
Step 1 Generate a local key pair for the SSH client.
1. Run system-view
The system view is displayed.
2. Run rsa local-key-pair create, or ecc local-key-pair create
A local RSA or ECC key pair is generated. The generated key pair must be of
the same type as that of the server.
You can run the display rsa local-key-pair public or display ecc local-key-
pair public command to view information about the public key in the
generated RSA or ECC key pair. Configure the public key on the SSH server.
For details, see 9.7.4 Configuring an SSH User.
3. Run quit
Return to the user view.
Step 2 Configure the mode in which the device connects to the SSH server for the first
time.
When working as an SSH client to connect to an SSH server for the first time, the
device cannot validate the SSH server because the public key of the SSH server
has not been saved on the client. As a result, the connection fails. You can perform
either of the following operations to rectify the connection failure:
● Enable first-time authentication on the SSH client. This function allows the
device to successfully connect to an SSH server for the first time without
validating the SSH server's public key. If saving the SSH server's public key is
selected during server authentication, the device automatically saves the SSH
server's public key after connecting to the server successfully for subsequent
server authentication. If saving the SSH server's public key is not selected, the
system asks you whether to save the SSH server's public key the next time
server authentication is performed.
a. Run system-view
The system view is displayed.
b. Run ssh client first-time enable
First-time authentication is enabled on the SSH client.
By default, first-time authentication is disabled on an SSH client.
● Configure the SSH client to assign a public key to the SSH server. In this
mode, the public key generated on the server is directly saved on the client to
ensure that the SSH server passes the validity check on the client's first login.
a. Run system-view
The system view is displayed.
b. Run rsa peer-public-key key-name [ encoding-type { der | openssh |
pem } ] or ecc peer-public-key key-name encoding-type { der | openssh
| pem }
The RSA or ECC public key view is displayed.
c. Run public-key-code begin
The public key editing view is displayed.
d. Enter the public key of the SSH server.
The entered public key must be a hexadecimal string complying with the
public key format. The string is randomly generated on the SSH server.
After entering the public key editing view, you can enter the RSA or ECC
public key generated by the server on the client.
e. Run public-key-code end
Exit the public key editing view.
f. Run peer-public-key end
Exit the public key view.
If the SSH server's public key saved on the SSH client does not take effect, run
the undo ssh client servername assign { rsa-key | ecc-key } command to unbind
the RSA or ECC public key from the SSH server and then run the command to
assign a new RSA or ECC public key to the SSH server.
Run either of the preceding commands based on the network address type.
● IPv4 mode:
run the stelnet [ -a source-address ] host-ip [ port-number ] [ [ -vpn-
instance vpn-instance-name ] | [ prefer_kex { dh_group1 |
dh_exchange_group } ] | [ prefer_ctos_cipher { des | 3des | aes128 | aes128-
ctr | aes192-ctr | aes256-ctr } ] | [ prefer_ctos_hmac { sha1 } ] |
[ prefer_stoc_cipher { des | 3des | aes128 | aes128-ctr | aes192-ctr | aes256-
ctr } ] | [ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 } ] |
[ prefer_stoc_hmac { sha1 | sha1_96 | md5 | md5_96 } ] ] * [ -ki aliveinterval
[ -kc alivecountmax ] ] command to log in to another device.
● IPv6 mode:
run the stelnet ipv6 [ -a source-address ] host-ipv6 [ -oi interface-type
interface-number ] [ port-number ] [ [ -vpn6-instance vpn-instance-name ] |
[ prefer_kex { dh_group1 | dh_exchange_group } ] | [ prefer_ctos_cipher
{ des | 3des | aes128 | aes128-ctr | aes192-ctr | aes256-ctr } ] |
[ prefer_stoc_cipher { des | 3des | aes128 | aes128-ctr | aes192-ctr | aes256-
ctr } ] | [ prefer_ctos_hmac { sha1 | sha1_96 | md5 | md5_96 } ] |
[ prefer_stoc_hmac { sha1 | sha1_96 | md5 | md5_96 } ] ] * [ -ki aliveinterval
[ -kc alivecountmax ] ] command to log in to another device.
When port 22 is specified as the protocol port number for the STelnet server, the
STelnet client can log in with no port number specified. If another port number is
specified as the protocol port number for the STelnet server, you must specify the
port number used by the client to log in.
When configuring an STelnet client to log in to an SSH server, you can specify the
source IP address, select a key exchange algorithm, an encryption algorithm, and
an HMAC algorithm, and enable the keepalive function on the client.
NOTE
DES, 3DES, MD5, MD5_96, SHA1, and SHA1_96 encryption algorithm cannot ensure
security. AES128, AES128-CTR, AES192-CTR or AES256-CTR encryption algorithm is
recommended.
----End
Pre-configuration Tasks
Before logging in to a device through redirection, complete the following tasks:
● Start a remote device.
● Use a TTY user interface: ensuring that the remote device is directly connected
to the 8AS card on the router using an asynchronous serial cable, and the
physical and protocol status of the asynchronous serial interface on the router
is Up.
NOTE
For details about the asynchronous serial cable, see "8AS Cable" in the Huawei AR
Series Access Routers Get to Know the Product - Hardware Description - Cables.
Context
The TTY user interface supports AAA authentication and password authentication.
● AAA authentication: Users must enter both user names and passwords for
login. If either a user name or a password is incorrect, the login fails.
● Password authentication: Users must enter passwords for login. Only after a
user enters the correct password does the device allow the users to log in.
Procedure
● Configure AAA authentication.
a. Run system-view
The system view is displayed.
b. Run user-interface tty tty-number
The TTY user interface view is displayed.
c. Run authentication-mode aaa
The authentication mode is set to AAA authentication.
d. Run quit
Exit the Console or TTY user interface view.
e. Run aaa
----End
Context
To manage a remote device that can transmit data only through a serial port,
configure the redirection function on the current device.
Router
Ethernet
Async0 Async3
Async1 Async2
PC
Network
Router
Async0 Async3
Async2
Async1
Procedure
Step 1 Enable the redirection function on the router.
1. Run system-view
When configuring the TTY user interface, pay attention to the following
points:
– After an 8AS interface card registers successfully, the device generates
random numbers for TTY user interfaces. To view the TTY user interface
number mapped to an asynchronous serial port, run the display user-
interface command.
– If the modem function is enabled on a TTY user interface, the redirection
function does not take effect on the TTY user interface.
6. (Optional) Run authentication-mode { password | aaa }
The device checks data redirected by a serial port and discards unidentifiable
data, damaging the original data. You can run this command to ensure the
original data integrity. The device will transparently transmit data without
checking it.
Password:
<Router>
● STelnet mode
Log in to a device from a terminal through redirection in STelnet mode. The
third-party software PuTTY is used as an example.
# Log in to the device using PuTTY. Set the protocol type to SSH, Host Name
to the IP address or host name of the redirection-enabled router, and Port to
the default port number (2000 plus TTY number) or the port number
specified using the redirect ssh listen-port command. (The following
information is only for reference.)
# Click Open. Enter the user name and password at the prompt, and press
Enter. You have logged in to the device. (The following information is only for
reference.)
login as: client001
[email protected]'s password:
<Router>
----End
Pre-configuration Tasks
Before logging in to a device through reverse Telnet, complete the following tasks:
For details about the asynchronous serial cable, see "SA Cable" in the Huawei AR Series
Access Routers Get to Know the Product - Hardware Description - Cables.
Context
The console or TTY user interface supports AAA authentication and password
authentication.
● AAA authentication: Users must enter both user names and passwords for
login. If either a user name or a password is incorrect, the login fails.
● Password authentication: Users must enter passwords for login. Only after a
user enters the correct password does the device allow the users to log in.
Procedure
● Configure AAA authentication.
a. Run system-view
The system view is displayed.
b. Run user-interface tty tty-number
The TTY user interface view is displayed.
c. Run authentication-mode aaa
The authentication mode is set to AAA authentication.
d. Run quit
Exit the Console or TTY user interface view.
e. Run aaa
The AAA view is displayed.
f. Run local-user user-name password { cipher | irreversible-cipher }
password
A local user account is created and a password is configured.
Context
As shown in Figure 9-12, a multimedia software terminal (dumb terminal) is
connected to the router with an asynchronous cable, and the router is connected
to a server. The terminal cannot communicate with the server directly. To enable
the dumb terminal to communicate with the server, you can configure reverse
Telnet on the router. The router then acts as a client to transmit data from the
terminal to the server.
Async2/0/0
Network
Procedure
Step 1 Run system-view
The system view is displayed.
After a 1SA, or a 2SA interface card registers successfully, the device generates
random numbers for TTY user interfaces. To view the TTY user interface number
mapped to an asynchronous serial port, run the display user-interface command.
NOTE
If the modem function is enabled on a TTY user interface, the reverse Telnet function does
not take effect on the TTY user interface.
To configure the calling end to add line break \n when sending carriage return
line break \r\n so that the calling and called ends have the same data, perform
this step to enable the function of adding a line break.
Step 9 Connect the dumb terminal to the router using an asynchronous cable and log in
to the remote server from the terminal.
----End
Context
As shown in Figure 9-13, a multimedia software terminal (dumb terminal) is
connected to the console interface of the router through a console cable, and the
router is connected to a server. The terminal cannot communicate with the server
directly. To enable the dumb terminal to communicate with the server, you can
configure reverse Telnet on the router. The router then acts as a client to transmit
data from the terminal to the server.
Console
Network
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run user-interface console 0
The console user interface view is displayed.
Step 3 Run connect host [ port-number ] [ -a source-ip-address | -i interface-type
interface-number ] [ -t interval ]
The dumb terminal is configured to set up a connection with the remote server
through the router.
By default, a dumb terminal cannot set up a connection with a remote server.
Step 4 (Optional) Run exline-breaker enable
The function of adding a line break is enabled.
By default, the function of adding a line break is disabled.
To configure the calling end to add line break \n when sending carriage return
line break \r\n so that the calling and called ends have the same data, perform
this step to enable the function of adding a line break.
Step 5 Run undo shell
The terminal service is disabled on the console user interface.
By default, the terminal service is enabled on the console user interface.
NOTE
For the device with the Config button, you can also press and hold down the config button
for less than 5s, the terminal service on the console user interface will be switched between
shell and undo shell once.
Step 6 Connect the dumb terminal to the console interface of the router using a console
cable and log in to the remote server from the terminal.
----End
AR3200 series routers do not support this function in active/standby switchover scenarios.
Users at a higher level can set an authentication password used to switch a user
from a lower level to a higher level. If a user wants to use a command whose level
is higher than the user level, the user can use the authentication password to
switch to the higher level.
1. Run the system-view command to enter the system view.
2. Run the super password [ level user-level ] cipher command to set an
authentication password used to switch a user from a lower level to a higher
level.
AR3200 series routers do not support this function in active/standby switchover scenarios.
You need to enter a password when switching from a low user level to a higher
one.
1. Run the super [ level ] command in the user view to switch the user level.
NOTE
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.
2. Enter the password as prompted.
If the password is correct, you will switch to a higher user level. If you enter
an incorrect password three times consecutively, the system returns to the
user view and the user level remains unchanged.
The matched upper-view command is only valid for current login users who run this
command.
You are not advised to configure the undo command to automatically match the
upper-level view, unless necessary.
After you run the lock command, the system prompts you to enter the lock
password and confirm password. If the two passwords are the same, the
current interface is locked successfully.
To unlock the user interface, you must press Enter and enter the correct login
password as prompted.
PC Router
Configuration Roadmap
The configuration roadmap is as follows:
1. Use the terminal simulation software to log in to the device through a
console port.
2. Configure the authentication mode of the console user interface.
NOTE
You can use the built-in terminal emulation software (such as the PuTTY) on the PC. If no
built-in terminal emulation software is available, use the third-party terminal emulation
software. For details, see the software user guide or online help.
Procedure
Step 1 Use the terminal simulation software to log in to the device through a console
port.
1. Insert the DB9 connector of the console cable delivered with the product to
the 9-pin serial port on the PC, and insert the RJ45 connector to the console
port of the device, as shown in Figure 9-15.
2. Start the terminal emulation software on the PC. Create a connection, select
the connected port, and set communication parameters.
NOTE
Password:
You can run commands to configure the device. Enter a question mark (?)
whenever you need help.
Step 2 Configure the authentication mode of the console user interface.
<Huawei> system-view
<Huawei> sysname Router
[Router] user-interface console 0
[Router-ui-console0] authentication-mode aaa
[Router-ui-console0] user privilege level 15
[Router-ui-console0] quit
[Router] aaa
[Router-aaa] local-user admin1234 password irreversible-cipher Helloworld@6789
[Router-aaa] local-user admin1234 privilege level 3
[Router-aaa] local-user admin1234 service-type terminal
After the preceding operations, you can re-log in to the device on the console user
interface only by entering the user name admin1234 and password
Helloworld@6789.
----End
Configuration Files
#
sysname Router
#
aaa
local-user admin1234 password irreversible-cipher %@%@HW=5%Mr;:2)/RX$FnU1HLO%-TBMp4wn%;~\#
%iAut}_~O%0L%@%@
local-user admin1234 privilege level 3
local-user admin1234 service-type terminal
#
user-interface con 0
authentication-mode aaa
#
return
Networking Requirements
As shown in Figure 9-16, the PC and the server (Huawei device) are reachable to
each other. To implement easy remote configuration and management of the
device, configure AAA authentication for Telnet users on the server and configure
an ACL security policy that allows only users in compliance with the security policy
to log in to the device.
Figure 9-16 Networking diagram for Configuring a Security Policy to Limit Telnet
Login
GE1/0/0
10.1.1.1/32 10.137.217.177/24
Network
PC Telnet Server
NOTE
The Telnet protocol poses a security risk, and therefore the STelnet V2 protocol is
recommended.
Configuration Roadmap
The following configurations are performed on the Router. The configuration
roadmap is as follows:
Procedure
Step 1 Set the server listening port number and enable the server function.
<Huawei> system-view
[Huawei] sysname Telnet Server
[Telnet Server] telnet server enable
[Telnet Server] telnet server port 1025
# Set the IP address of the device to which the user is allowed to log in.
[Telnet Server] acl 2001
[Telnet Server-acl-basic-2001] rule permit source 10.1.1.1 0
[Telnet Server-acl-basic-2001] quit
[Telnet Server] user-interface vty 0 7
[Telnet Server-ui-vty0-7] acl 2001 inbound
Press Enter, and enter the user name and password in the login window. If the
authentication is successful, the command line prompt of the user view is
displayed. The user view configuration environment is displayed.
Login authentication
Username:admin1234
Password:
<Telnet Server>
----End
Configuration Files
Telnet server configuration file
#
sysname Telnet Server
#
acl number 2001
rule 5 permit source 10.1.1.1 0
#
aaa
local-user admin1234 password irreversible-cipher %^%#*~Br";[g6Pv5Zf>$~{hY+N!`{$<[Y{;l02P)B,EBz\1FN!c
+%^%#
local-user admin1234 privilege level 3
local-user admin1234 service-type telnet
#
telnet server enable
telnet server port 1025
#
user-interface maximum-vty 8
user-interface vty 0 7
acl 2001 inbound
authentication-mode aaa
history-command max-size 20
idle-timeout 20 0
screen-length 30
#
return
10.137.217.10/24
PC1 10.137.217.203/24
10.137.217.20/24
PC3
NOTE
The STelnet V1 protocol poses a security risk, and therefore the STelnet V2 mode is
recommended.
Configuration Roadmap
The configuration roadmap is as follows:
1. Install the SSH server software on PC1. Install the key pair generation
software, public key conversion software, and SSH server login software on
PC2.
2. Generate a local key pair on the SSH server to implement secure data
exchange between the server and client.
3. Configure different authentication modes for the SSH users client001 and
client002 on the SSH server.
4. Enable the STelnet service on the SSH server.
5. Configure a security policy to ensure that only PC1 and PC2 can be used to
log in to the device.
6. Configure the STelnet server type for the SSH users client001 and client002
on the SSH server.
7. Log in to the SSH server as the client001 and client002 users through
STelnet.
Procedure
Step 1 Generate a local key pair on the server.
<Huawei> system-view
[Huawei] sysname SSH Server
[SSH Server] rsa local-key-pair create
The key name will be: Host
RSA keys defined for Host already exist.
Confirm to replace them? (y/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...
......................................................................................+++
....+++
.......................................++++++++
..............++++++++
# Create an SSH user named client002 and configure the RSA authentication
mode for the user.
[SSH Server] aaa
[SSH Server-aaa] local-user client002 password irreversible-cipher Helloworld@6789
[SSH Server-aaa] local-user client002 privilege level 3
[SSH Server-aaa] local-user client002 service-type ssh
[SSH Server-aaa] quit
[SSH Server] ssh user client002 authentication-type rsa
After the key is generated, click Save public key to save the key in the
key.pub file.
Click Save private key. The PuTTYgen Warning dialog box is displayed.
Click Yes. The private key is saved in the private.ppk file.
b. Run sshkey.exe on the client. Convert the generated public key to the
character string required for the device.
Open the key.pub file required by SSH that is generated in the previous
step.
Click Convert(C). You can see the public keys before and after
conversion.
# Enter the RSA public key generated on PC2 to the SSH server.
[SSH Server] rsa peer-public-key rsakey001
[SSH Server-rsa-public-key] public-key-code begin
[SSH Server-rsa-key-code] 30820108 02820101 00DD8904 1A5E30AA 976F384B 5DB366A7
[SSH Server-rsa-key-code] 048C0E79 06EC6B08 8BB9567D 75914B5B 4EA7B2E5 1938D118
[SSH Server-rsa-key-code] 4B863A38 BA7E0F0D BE5C5AE4 CA55B192 B531AC48 B07D21E3
[SSH Server-rsa-key-code] 62E3F2A5 8C04C443 CF51CF51 136B5B9E 812AB1B7 1250EB24
[SSH Server-rsa-key-code] A4AE5083 A1DB18EC E2395C9B B806E8F0 0BE24FB5 16958784
[SSH Server-rsa-key-code] 403B617F 8AAAB1F8 C6DE8C3C F09E4D23 7D1C17BF 4AAF09C4
[SSH Server-rsa-key-code] 74C083AF 17CD3075 3396B322 32C57FF0 B1991971 02F1033B
[SSH Server-rsa-key-code] 81AA6D47 44520F23 685FAF72 04BA4B6E 615EF224 14E64E2A
[SSH Server-rsa-key-code] 331EEB7F 188D9805 96DBFD30 0C947A5A BA879DC4 F848B769
[SSH Server-rsa-key-code] 513C35CD B52B2917 02B77693 F79910EE 5287F252 977F985E
[SSH Server-rsa-key-code] 5F186C94 93F26780 4E7F5F9D 5287350A 0A4F4988 1BF6AB7C
[SSH Server-rsa-key-code] 1B020125
[SSH Server-rsa-key-code] public-key-code end
[SSH Server-rsa-public-key] peer-public-key end
# Bind the RSA public key of the STelnet client to the SSH user client002 on
the SSH server.
[SSH Server] ssh user client002 assign rsa-key rsakey001
Step 4 Configure a security policy to ensure that only PC1 and PC2 can be used to log in
to the device.
[SSH Server] acl 2001
[SSH Server-acl-basic-2001] rule permit source 10.137.217.10 0
[SSH Server-acl-basic-2001] rule permit source 10.137.217.20 0
[SSH Server-acl-basic-2001] rule deny source 10.137.217.30 0
[SSH Server-acl-basic-2001] quit
[SSH Server] user-interface vty 0 4
[SSH Server-ui-vty0-4] acl 2001 inbound
[SSH Server-ui-vty0-4] quit
# Click Open. Enter the user name and password at the prompt, and press
Enter. You have logged in to the SSH server.
[email protected]'s password:
<SSH Server>
● Log in to the SSH server as the client002 user from PC2 using the RSA
authentication mode.
# Use the PuTTY software to log in to the device, enter the device IP address,
and select the SSH protocol type.
# Choose Connection > SSH in the navigation tree. The page shown in Figure
9-25 is displayed. Select 2 for Preferred SSH protocol version
# Choose Connection > SSH > Auth in the navigation tree. The page shown
in Figure 9-26 is displayed. Select the private.ppk file corresponding to the
public key configured on the server.
# Click Open. Enter the user name at the prompt, and press Enter. You have
logged in to the SSH server. The following information is for reference only.
login as: client002
Authenticating with public key "rsa-key"
<SSH Server>
----End
Configuration Files
SSH server configuration file
#
sysname SSH Server
#
acl number 2001
rule 5 permit source 10.137.217.10 0
rule 10 permit source 10.137.217.20 0
rule 15 deny source 10.137.217.30 0
#
rsa peer-public-key rsakey001
public-key-code begin
30820107
02820100
DD89041A 5E30AA97 6F384B5D B366A704 8C0E7906 EC6B088B B9567D75 914B5B4E
A7B2E519 38D1184B 863A38BA 7E0F0DBE 5C5AE4CA 55B192B5 31AC48B0 7D21E362
E3F2A58C 04C443CF 51CF5113 6B5B9E81 2AB1B712 50EB24A4 AE5083A1 DB18ECE2
395C9BB8 06E8F00B E24FB516 95878440 3B617F8A AAB1F8C6 DE8C3CF0 9E4D237D
1C17BF4A AF09C474 C083AF17 CD307533 96B32232 C57FF0B1 99197102 F1033B81
AA6D4744 520F2368 5FAF7204 BA4B6E61 5EF22414 E64E2A33 1EEB7F18 8D980596
DBFD300C 947A5ABA 879DC4F8 48B76951 3C35CDB5 2B291702 B77693F7 9910EE52
87F25297 7F985E5F 186C9493 F267804E 7F5F9D52 87350A0A 4F49881B F6AB7C1B
0201
25
public-key-code end
peer-public-key end
#
aaa
local-user client001 password irreversible-cipher %^%#*~Br";[g6Pv5Zf>$~{hY+N!`{$<[Y{;l02P)B,EBz\1FN!c+
%^%#
local-user client001 privilege level 3
local-user client001 service-type ssh
local-user client002 password irreversible-cipher %^%#HW=5%Mr;:2)/RX$FnU1HLO%-TBMp4wn%;~\#
%iAut}_~O%0L%^%#
local-user client002 privilege level 3
local-user client002 service-type ssh
#
ssh user client002 assign rsa-key rsakey001
ssh user client002 authentication-type rsa
stelnet server enable
#
user-interface vty 0 4
acl 2001 inbound
authentication-mode aaa
protocol inbound ssh
#
return
Figure 9-27 Networking diagram of configuring the device as the Telnet client to
log in to another device
Session Session
10.1.1.1/24 10.2.1.1/24
Network Network
PC Router1 Router2
NOTE
The Telnet protocol poses a security risk, and therefore the STelnet V2 protocol is
recommended.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the Telnet authentication mode and password on Router2.
2. Configure the Router2 to allow Router1 access with ACL.
3. Log in to Router2 from Router1 through Telnet.
Procedure
Step 1 Configure the Telnet authentication mode and password on Router2.
<Huawei> system-view
[Huawei] sysname Router2
[Router2] telnet server enable
[Router2] user-interface vty 0 4
[Router2-ui-vty0-4] user privilege level 3
[Router2-ui-vty0-4] authentication-mode aaa
[Router2-ui-vty0-4] quit
NOTE
# After the preceding configuration, you can log in to Router2 from Router1
through Telnet. You cannot log in to Router2 from other devices. The following
information is for reference only.
<Huawei> system-view
[Huawei] sysname Router1
[Router1] quit
<Router1> telnet 10.2.1.1
Login authentication
Username:admin1234
Password:
<Router2>
----End
Configuration Files
Router2 configuration file
#
sysname Router2
#
acl number 2000
rule 5 permit source 10.1.1.1 0
#
aaa
local-user admin1234 password irreversible-cipher %^%#*~Br";[g6Pv5Zf>$~{hY+N!`{$<[Y{;l02P)B,EBz\1FN!c
+%^%#
local-user admin1234 privilege level 3
local-user admin1234 service-type telnet
#
telnet server enable
#
user-interface vty 0 4
acl 2000 inbound
authentication-mode aaa
user privilege level 3
#
return
10.1.1.1/16
10.1.2.2/16 10.1.3.3/16
Client001 Client002
NOTE
The STelnet V1 protocol poses a security risk, and therefore the STelnet V2 mode is
recommended.
Configuration Roadmap
The configuration roadmap is as follows:
1. Generate a local key pair on the SSH server to implement secure data
exchange between the server and client.
2. Configure different authentication modes for the SSH users client001 and
client002 on the SSH server.
3. Enable the STelnet service on the SSH server.
4. Configure the STelnet server type for the SSH users client001 and client002
on the SSH server.
5. Set the SSH server listening port number on the SSH server to prevent
attackers from accessing the SSH service standard port and ensure security.
6. Log in to the SSH server as the client001 and client002 users through
STelnet.
Procedure
Step 1 Generate a local key pair on the server.
<Huawei> system-view
[Huawei] sysname SSH Server
[SSH Server] rsa local-key-pair create
The key name will be: Host
RSA keys defined for Host already exist.
Confirm to replace them? (y/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...
......................................................................................+++
....+++
.......................................++++++++
..............++++++++
=====================================================
Time of Key pair created: 2012-08-06 17:17:37+00:00
Key name: Host
Key type: RSA encryption Key
=====================================================
Key code:
30820109
02820100
CB0E88EC A1C2CFEA F97126F9 36919C08 0455127B
A3A48594 69517096 35626F55 E4FAF0EB FDA2B9E9
5E417B2B E09F38B0 D26FCA73 FE2E3FC4 DFBEC8CF
4ED0C909 E8D975E6 FFC73C81 D13FE71E 759DC805
B0F0E877 4FC9288E BE1E197C 2A7186B0 B56F5573
3A5EA588 29C63E3B 20D56233 8E63278D F941734F
6B359C69 BBAE5A52 EB842179 04B4204D 5DB31D72
97F0C085 DA771F66 0AAADC28 D264CEB9 5BADA92C
CDE9F116 D6D99C48 CEBA3A1D 868B053A 32941D85
CCAA9796 A4B55760 0A8108ED DB45DA12 F61634C9
59431600 341FEDEF 5379D565 A8D1953D DEA018A2
72F99FFC 63DE04BF 2A6219BD DF13D705 27D63DEF
83D556BC 5B44D983 8D5EA126 C1EB71CB
0203
010001
=====================================================
Time of Key pair created: 2012-08-06 17:17:44+00:00
Key name: Server
Key type: RSA encryption Key
=====================================================
Key code:
3067
0260
DF8AFF3C 28213B94 2292852E E98657EE 11DE5AF4
8A176878 CDD4BD31 55E05735 3080F367 A83A9034
47D534CA 81250C1D 35401DC3 464E9E5F A50202CF
A7AD09CD AC3F531C A763F0A0 4C8E51B9 18755400
76AF4A78 225C92C3 01FE0DFF 06908363
0203
010001
# Configure the RSA public key on the SSH server. (Information in bold in the
display command output is the RSA public key. Copy the information to the
server.)
[SSH Server] rsa peer-public-key rsakey001
[SSH Server-rsa-public-key] public-key-code begin
[SSH Server-rsa-key-code] 30820109
[SSH Server-rsa-key-code] 02820100
[SSH Server-rsa-key-code] CB0E88EC A1C2CFEA F97126F9 36919C08 0455127B
[SSH Server-rsa-key-code] A3A48594 69517096 35626F55 E4FAF0EB FDA2B9E9
[SSH Server-rsa-key-code] 5E417B2B E09F38B0 D26FCA73 FE2E3FC4 DFBEC8CF
[SSH Server-rsa-key-code] 4ED0C909 E8D975E6 FFC73C81 D13FE71E 759DC805
[SSH Server-rsa-key-code] B0F0E877 4FC9288E BE1E197C 2A7186B0 B56F5573
[SSH Server-rsa-key-code] 3A5EA588 29C63E3B 20D56233 8E63278D F941734F
[SSH Server-rsa-key-code] 6B359C69 BBAE5A52 EB842179 04B4204D 5DB31D72
[SSH Server-rsa-key-code] 97F0C085 DA771F66 0AAADC28 D264CEB9 5BADA92C
[SSH Server-rsa-key-code] CDE9F116 D6D99C48 CEBA3A1D 868B053A 32941D85
[SSH Server-rsa-key-code] CCAA9796 A4B55760 0A8108ED DB45DA12 F61634C9
[SSH Server-rsa-key-code] 59431600 341FEDEF 5379D565 A8D1953D DEA018A2
[SSH Server-rsa-key-code] 72F99FFC 63DE04BF 2A6219BD DF13D705 27D63DEF
[SSH Server-rsa-key-code] 83D556BC 5B44D983 8D5EA126 C1EB71CB
[SSH Server-rsa-key-code] 0203
[SSH Server-rsa-key-code] 010001
[SSH Server-rsa-key-code] public-key-code end
[SSH Server-rsa-public-key] peer-public-key end
# Bind the RSA public key of the STelnet client to the SSH user client002 on
the SSH server.
[SSH Server] ssh user client002 assign rsa-key rsakey001
Enter password:
Enter the password. The following information indicates that you have logged in
successfully:
<SSH Server>
The user enters the user view, indicating that login succeeds.
# Attackers fail to log in to the SSH server using the default listening port number
22.
[client002] stelnet 10.1.1.1
Please input the username:client002
Trying 10.1.1.1 ...
Press CTRL+K to abort
Error: Failed to connect to the remote host.
# Run the display ssh server status commands. You can see that the STelnet
service has been enabled. Run the display ssh user-information command.
Information about the configured SSH users is displayed.
----End
Configuration Files
● SSH server configuration file
#
sysname SSH Server
#
rsa peer-public-key rsakey001
public-key-code begin
30820109
02820100
E4653DA4 68032D8A B419276E 5B32743C 181FC72E AEDA3173 578EBE00 68606ED6
D1A79735 90043220 2492B6B1 CB96BD4C E74A3209 96A829E4 EFD550FA 70855E0F
CC622FD5 D76AD6D3 FF07F87D 19D77E06 0224D05E 481B639F 5CFB5E84 AE9FF40A
CA2ABD4F F00B6316 6EFDADA4 7945CCC9 04C65675 22AE45C3 A2822708 AA764A40
FBAC61F6 FB42F90C F55B1FA7 B51A58BB 4ACACD2E 7764FCCE E3B296FC 1380C0C0
5E4A6BEE 92FB7793 E6D66E64 A3E4D581 8462C601 83C22BBF BFDF9B33 78840397
99946916 356103D8 A791AE04 95C8A11C 3490E857 6363115B EF6A162C 6B8593A5
8ECF3A3F 6C562154 D93B010C 932C3D18 1573F8CB D626EEA7 54F0C4E2 642BA909
0203
010001
public-key-code end
peer-public-key end
#
aaa
local-user client001 password irreversible-cipher %^%#HW=5%Mr;:2)/RX$FnU1HLO%-TBMp4wn%;~
\#%iAut}_~O%0L%^%#
local-user client001 privilege level 3
local-user client001 service-type ssh
local-user client002 password irreversible-cipher %^%#*~Br";[g6Pv5Zf>$~{hY+N!`{$<[Y{;l02P)B,EBz
\1FN!c+%^%#
local-user client002 privilege level 3
local-user client002 service-type ssh
#
ssh user client002 assign rsa-key rsakey001
ssh user client002 authentication-type rsa
stelnet server enable
SSH server port 1025
#
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
#
return
NOTE
For details about the asynchronous serial cable, see "8AS Cable" in the Huawei AR Series
Access Routers Get to Know the Product - Hardware Description - Cables.
Session
GE0/0/1
10.1.1.1/24
vpna Async2/0/1
Network
Console
PC RouterA RouterB
Configuration Roadmap
The configuration roadmap is as follows:
1. Connect the console port of RouterB to an asynchronous serial port of
RouterA.
2. Enable the redirection function on RouterA.
Procedure
Step 1 Configure the asynchronous serial port to work in flow mode.
<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] interface async 2/0/1
[RouterA-Async2/0/1] async mode flow
Step 2 Obtain the TTY user interface number corresponding to the asynchronous serial
port.
[RouterA] display user-interface
Idx Type Tx/Rx Modem Privi ActualPrivi Auth Int
0 CON 0 9600 - 15 - N -
41 TTY 41 9600 inout 0 - N 2/0/0
42 TTY 42 9600 - 0 - N 2/0/1
43 TTY 43 9600 - 0 - N 2/0/2
44 TTY 44 9600 - 0 - N 2/0/3
45 TTY 45 9600 - 0 - N 2/0/4
46 TTY 46 9600 - 0 - N 2/0/5
47 TTY 47 9600 - 0 - N 2/0/6
48 TTY 48 9600 - 0 - N 2/0/7
+ 129 VTY 0 - 15 4 N -
130 VTY 1 - 15 - N -
131 VTY 2 - 15 - N -
132 VTY 3 - 15 - N -
133 VTY 4 - 15 - N -
145 VTY 16 - 0 - P -
146 VTY 17 - 0 - P -
147 VTY 18 - 0 - P -
148 VTY 19 - 0 - P -
149 VTY 20 - 0 - P -
Step 4 Enable the redirection function on RouterA and associate the redirection function
with the VPN instance vpna.
[RouterA] user-interface tty 42
[RouterA-ui-tty42] undo shell
[RouterA-ui-tty42] redirect enable
[RouterA-ui-tty42] redirect binding vpn-instance vpna
[RouterA-ui-tty42] authentication-mode password
[RouterA-ui-tty42] set authentication password cipher
Enter Password(<8-128>):
Confirm password:
[RouterA-ui-tty42] quit
[RouterA] quit
NOTE
If the redirection function is not associated with the VPN instance to which the private
users belong, all users on public and private networks can log in to RouterB.
Step 5 Check the port number allocated to the TTY user interface.
<RouterA> display tcp status
TCPCB Tid/Soid Local Add:port Foreign Add:port VPNID State
19fde824 9 /2 0.0.0.0:22 0.0.0.0:0 23553 Listening
19fde6c0 9 /1 0.0.0.0:23 0.0.0.0:0 23553 Listening
19fde130 109/1 0.0.0.0:80 0.0.0.0:0 23553 Listening
19fdef18 9 /4 0.0.0.0:2042 0.0.0.0:0 23553 Listening
19fde55c 7 /1 0.0.0.0:7547 0.0.0.0:0 0 Listening
19fdf07c 9 /9 10.137.217.211:23 10.138.77.61:2567 0 Established
19fdf344 9 /10 10.137.217.211:23 10.138.77.69:2824 0 Time_Wait
Connected to 10.1.1.1...
Login authentication
Password:
<RouterB>
----End
Configuration Files
● Configuration file of RouterA
#
sysname RouterA
#
ip vpn-instance vpna
ipv4-family
route-distinguisher 1:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
interface Async2/0/1
async mode flow
#
interface GigabitEthernet0/0/1
ip binding vpn-instance vpna
ip address 10.1.1.1 255.255.255.0
#
user-interface tty 42
authentication-mode password
set authentication password cipher %^%##N&)XdgB87~RcnU9upv6,.d;,uXe*#IeE-ywBaSmj:\@.d>,%^
%#
redirect enable
redirect binding vpn-instance vpna
#
return
Networking Requirements
On the network shown in Figure 9-30, an NMS, Router A, and AAA server are
connected over a VPN. The NMS is integrated with the SSH client and SFTP server
functions. The SSH client uses SSH to log in to and communicate with the Router
A. The SFTP server uses SFTP for file transfer with the Router A functioning as an
SFTP client.
GE3/0/0
GE2/0/0
10.3.1.1/24
AAA Server 10.2.1.2/24
10.2.1.1/24
Network
RouterA
NMS GE1/0/0
SSH Client 10.1.1.2/24
10.1.1.1/24
NOTE
Precautions
Ensure that the route between the device and NMS is reachable.
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure a VPN instance.
2. Bind the interfaces connecting the device to the NMS and HWTACACS server
to the VPN instance.
3. Configure a default VPN instance used by the NMS to manage the device.
4. Configure an HWTACACS server.
5. Configure a local AAA user and set its access mode to SSH and authentication
mode to HWTACACS.
6. Configure an SSH user and set its authentication and service modes.
7. Configure an SNMPv3 USM user to allow the NMS to access the device.
8. Configure an SFTP client to use SFTP for file transfer.
Procedure
Step 1 Configure a VPN instance.
<Huawei> system-view
[Huawei] sysname RouterA
[RouterA] ip vpn-instance vrf1
[RouterA-vpn-instance-vrf1] ipv4-family
[RouterA-vpn-instance-vrf1-af-ipv4] route-distinguisher 22:1
[RouterA-vpn-instance-vrf1-af-ipv4] vpn-target 111:1 both
[RouterA-vpn-instance-vrf1-af-ipv4] quit
[RouterA-vpn-instance-vrf1] quit
Step 3 Configure a default VPN instance used by the NMS to manage the device.
[RouterA] set net-manager vpn-instance vrf1
NOTE
The VPN configured using this command affects the following service modules on the
device: TFTP client, FTP client, SFTP client, SCP client, Info Center, SNMP, PM, IP FPM, and
TACACS. To access the public network, you must set the public-net parameter.
[RouterA-aaa-domain-huawei] hwtacacs-server ht
[RouterA-aaa-domain-huawei] quit
Step 5 Create a local AAA user named sshuser001. Set the access mode to SSH and
authentication mode to HWTACACS.
# Configure a local user named sshuser001 in the huawei domain. After the
configuration is complete, the sshuser001 user uses the authentication and
authorization modes in the huawei domain.
[RouterA-aaa] local-user sshuser001@huawei password
Please configure the password (8-128)
Enter Password:
Confirm Password:
[RouterA-aaa] local-user sshuser001@huawei service-type ssh
[RouterA-aaa] quit
Step 8 Configure an SNMPv3 USM user to allow the NMS to access the device.
# Enable the SNMP agent function.
[RouterA] snmp-agent
# Configure a user group and users in the group, and authenticate and encrypt
user data.
[RouterA] snmp-agent group v3 admin privacy write-view iso notify-view iso read-view iso
[RouterA] snmp-agent usm-user v3 nms-admin group admin
[RouterA] snmp-agent usm-user v3 nms-admin authentication-mode sha
Please configure the authentication password (10-255)
Enter Password:
Confirm Password:
[RouterA] snmp-agent usm-user v3 nms2-admin privacy-mode aes128
Please configure the privacy password (10-255)
Enter Password:
Confirm Password:
Step 9 Enable the device functioning as an SFTP client to transfer files with the NMS
functioning as an SFTP server over the VPN.
[RouterA] ssh client first-time enable
[RouterA] sftp 10.1.1.1
[RouterA] put aaa.cfg
----End
Configuration Files
● Router A configuration file
#
sysname RouterA
#
hwtacacs enable
#
ip vpn-instance vrf1
ipv4-family
route-distinguisher 22:1
vpn-target 111:1 export-extcommunity
vpn-target 111:1 import-extcommunity
#
hwtacacs-server template ht
hwtacacs-server authentication 10.2.1.1 vpn-instance vrf1
hwtacacs-server authorization 10.2.1.1 vpn-instance vrf1
hwtacacs-server shared-key cipher %^%#x@ZaCImt|
X79[^A&]DEYC6[>U]OD(8n&BVHvsu2R{=zVSySB'|H[;I`|ef#%^%#
#
aaa
local-user sshuser001@huawei password irreversible-cipher $1c$\h[;D"`M79$GN]A=y;*4EFG
%t>vIJI=rJvxWe/V%Xbd;(J+AzC+$
local-user sshuser001@huawei service-type ssh
#
authentication-scheme scheme1
authentication-mode hwtacacs
#
authorization-scheme scheme2
authorization-mode hwtacacs
#
accounting-scheme default0
#
accounting-scheme default1
#
domain huawei
authentication-scheme scheme1
authorization-scheme scheme2
hwtacacs-server ht
#
interface GigabitEthernet1/0/0
undo shutdown
ip binding vpn-instance vrf1
ip address 10.1.1.2 255.255.255.0
interface GigabitEthernet2/0/0
undo shutdown
ip binding vpn-instance vrf1
ip address 10.2.1.2 255.255.255.0
interface GigabitEthernet3/0/0
undo shutdown
Fault Description
Login through the console port fails.
Procedure
Step 1 Check whether the serial port parameters are correctly configured. (The third-
party software PuTTY is used as an example here.)
Check whether a correct serial port is connected. Some PCs provide multiple serial
ports with corresponding numbers. When connecting a serial port, ensure that the
correct serial port number is selected.
Check that the serial port settings on the PC are the same as the console port
settings on the device, as shown in Figure 9-31. The default console port settings
are as follows:
● Baud rate: 9600
● Data bits: 8
● Stop bits: 1
● Parity: None
● Flow control: None
Step 2 Check whether the serial cable is securely connected. If necessary, replace the
current cable with a properly-functioning one.
----End
Fault Description
The Telnet server fails to be logged in through Telnet.
Procedure
Step 1 Check whether the number of login users reaches the upper limit.
Log in to the device through the console port and run the display users command
to check whether all VTY user interfaces are in use. By default, the maximum
number of VTY user interfaces is 5. You can run the display user-interface
maximum-vty command to check the maximum number of login users allowed
by the device.
If the number of login users reaches the upper limit, run the user-interface
maximum-vty 15 command to increase the maximum number of login users to
15.
Step 2 Check whether an ACL is configured in the VTY user interface view (Telnet IPv4 is
used as an example).
Run the user-interface vty command on the Telnet server to enter the user
interface view and then run the display this command to check whether an ACL is
configured in the VTY user interface view. If so, record the ACL number.
Run the display acl acl-number command on the Telnet server to check whether
the IP address of the Telnet client is denied in the ACL. If so, run the undo rule
rule-id command in the ACL view to delete the deny rule and then run the
corresponding command to modify the ACL and permit the IP address of the
client.
Step 3 Check whether the access protocol is correctly configured in the VTY user interface
view.
Run the user-interface vty command on the Telnet server to enter the user
interface view and then run the display this command to check whether protocol
inbound is set to telnet or all. By default, the system supports the SSH and Telnet
protocol. If not, run the protocol inbound { telnet | all } command to allow
Telnet users to connect to the device.
Step 4 Check whether an authentication mode is set for login users in the user interface
view.
● If password authentication is configured using the authentication-mode
password command, you must enter the password upon login.
● If AAA authentication is configured using the authentication-mode aaa
command, you must run the local-user command to create a local AAA user.
----End
Fault Description
The SSH server fails to be logged in through STelnet.
Procedure
Step 1 Check whether the SSH service is enabled on the SSH server.
Log in to the SSH server through the console port or using Telnet and run the
display ssh server status command to check the SSH server configuration.
If the STelnet service is disabled, run the stelnet server enable command to
enable the STelnet service on the SSH server.
Step 2 Check whether the access protocol is correctly configured in the VTY user interface
view.
Run the user-interface vty command on the SSH server to enter the user
interface view and then run the display this command to check whether protocol
inbound is set to ssh or all. If not, run the protocol inbound { ssh | all }
command to allow STelnet users to log in to the device.
Step 3 Check whether an RSA public key is configured on the SSH server.
A local key pair must be configured when the device works as the SSH server.
Run the display rsa local-key-pair public command on the SSH server to check
the current key pair. If no information is displayed, no key pair is configured on the
server. Run the rsa local-key-pair create command to create a key pair.
NOTICE
If not, the initial login of the SSH client fails because validity check on the public
key of the SSH server fails. Run the ssh client first-time enable command to
enable first-time authentication on the SSH client.
----End
NOTE
For security purposes, you are advised to change the default password for the device.
Procedure
When you forget the password for logging in through the console port, use either
of the following two methods to set a new password.
NOTICE
The following uses the command lines and outputs of logging in to the device
using STelnet as an example. After logging in to the device through STelnet,
perform the following operations.
# Take AAA authentication as an example. Set the user name and password to
admin123 and Huawei@123, respectively.
<Huawei> system-view
[Huawei] user-interface console 0
[Huawei-ui-console0] authentication-mode aaa
[Huawei-ui-console0] quit
[Huawei] aaa
[Huawei-aaa] local-user admin123 password irreversible-cipher Huawei@123
[Huawei-aaa] local-user admin123 privilege level 15
[Huawei-aaa] local-user admin123 service-type terminal
[Huawei-aaa] return
<Huawei> save
2. In the BootROM menu, select Password Manager and then Clear the
console login password.
3. Then select the Return and Default Startup options in turn to restart the
device.
4. After the system starts, you can log in through the console port without
password authentication. After logging in to the system, set an authentication
mode and password for the console user interface as required. The
configuration is similar to that of Logging In to the Device Through STelnet/
Telnet to Set a New Password, and is not provided here.
NOTE
Configuring the authentication mode and password for the console user interface is
necessary; otherwise, after the device is restarted, users still need to be authenticated
using the original password when they log in to the device through the console port.
More Information
● When you log in to the device through STelnet/Telnet to set a new password:
Ensure that you have an STelnet/Telnet account and administrator rights.
● When you clear the lost password using the BootROM Menu, if you do not
press Ctrl+B within the timeout (several seconds), you have to restart the
router again.
Procedure
If you forget the Telnet login password, log in to the device through the console
port and set a new password for Telnet login.
# Take password authentication for VTY0 login as an example. Set the password
to Huawei@123.
<Huawei> system-view
[Huawei] user-interface vty 0
[Huawei-ui-vty0] authentication-mode password
[Huawei-ui-vty0] set authentication password cipher
Warning: The "password" authentication mode is not secure, and it is strongly re
commended to use "aaa" authentication mode.
Enter Password(<8-128>):
Confirm password:
[Huawei-ui-vty0] user privilege level 15
[Huawei-ui-vty0] return
<Huawei> save
# Take AAA authentication for VTY0 login as an example. Set the user name and
password to admin123 and Huawei@123, respectively.
<Huawei> system-view
[Huawei] user-interface vty 0
[Huawei-ui-vty0] protocol inbound telnet
[Huawei-ui-vty0] authentication-mode aaa
[Huawei-ui-vty0] quit
[Huawei] aaa
[Huawei-aaa] local-user admin123 password irreversible-cipher Huawei@123
[Huawei-aaa] local-user admin123 service-type telnet
[Huawei-aaa] local-user admin123 privilege level 15
[Huawei-aaa] return
<Huawei> save
More Information
By default, a user only needs to pass password authentication to log in to the
device from the console user interface. To prevent unauthorized users from
accessing the device, change the authentication mode of the console user
interface to AAA authentication.
You can run the free user-interface { ui-number | ui-type ui-number1 } command
to remove a user from a specified user interface, that is, disconnect the user from
the device.
This command does not take effect for the current user. For example, if the user
interface of the current user is VTY 2, the free user-interface vty 2 command
does not take effect and the system displays an error message.
<Huawei> free user-interface 0
Warning: User interface Console1 will be freed. Continue? [Y/N]:y
This chapter describes how to log in to a device through the web system to
manage and maintain the device.
AR routers support the web system. You can run commands to configure a device's
management IP address, upload and load the web page file, create a web system
account, and configure web system parameters. After the configuration is
complete, you can log in to and maintain the device through the web system.
You can also use the default factory settings to directly log in to the web system
for device management and maintenance. For details, see Logging In to the
Device.
10.1 Overview of Web System Login
10.2 Licensing Requirements and Limitations for Web System Login
This section provides the configuration precautions of web system login.
10.3 Default Settings for Web System Login
This section describes the default settings for web system login.
10.4 Configuring Device Login Through the Web System
This section describes how to configure device login through the web system.
10.5 Configuration Examples for Web System Login
This section provides an example for configuring device login through the web
system.
10.6 Common Misconfigurations
This section describes common faults caused by incorrect configurations and
provides the troubleshooting procedure.
10.7 FAQ About Web System Login
This section describes common problems you may encounter during the
configuration and provides the solutions to these problems.
Definition
The web system is a built-in web server on the device and provides a graphical
user interface (GUI) for users. Before using the web system to manage and
maintain a device, you need to log in to the device from a terminal using
Hypertext Transfer Protocol Secure (HTTPS).
Purpose
You can manage a device on the command line interface (CLI) or web system.
● The CLI mode requires you to use commands to manage and maintain the
device. This mode realizes fine-grained device management, but requires you
to be familiar with the commands.
● The web system mode allows you to easily manage and maintain the device
on a GUI. However, you can only use this mode to manage and maintain
some functions on the device.
You can select a proper management mode based on actual requirements.
To use the CLI, you must log in to the device through the console port or MiniUSB
port, or using Telnet or STelnet. To use the web system, you must log in to the
device using HTTPS.
NOTE
For details about how to log in to a device through the console port or MiniUSB port, or using
Telnet or STelnet, see CLI Login Configuration.
Licensing Requirements
Web System Login is a basic feature of a router and is not under license control.
Feature Limitations
None
Table 10-1 lists the default settings for web system login.
Pre-configuration Tasks
Before configuring device login through the web system, complete the following
task:
Log in to the device using the CLI mode. For details, see CLI Login Configuration.
Configuration Process
Procedure
Step 1 Run system-view
NOTE
The factory settings of the device include the IP address 192.168.1.1 and subnet mask
255.255.255.0. The access interface is the management interface under which the silkscreen
Management or MGMT is printed.
----End
Context
The system software contains the web page file. The web page file is loaded on
the device when the system software is loaded. If new system software is
uploaded to the device, you do not need to perform the following operations.
Procedure
Step 1 Upload the web page file.
You can upload the web page file using SFTP or other modes. For details, see
Local File Management.
NOTE
After uploading the web page file, run the dir command in the user view to check whether
the web page file on the device has the same size as that on the file server. If not, an
exception may occur during file upload. Upload the file again.
By default, the web page file in the system software is loaded on the device.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run http server enable
The web system function is enabled.
By default, the web system function is enabled on the device.
Step 3 Run http server-source { -a source-ip-address | -i interface-type interface-
number }
The source IP address of the web system is configured.
By default, the source IP address of the web system is not configured.
If the source IP address is not specified for the web system, the device selects a
source IP address according to routing entries to send packets. Specify an interface
in stable state, such as a loopback interface, as the source interface. Before
specifying a source interface, ensure that clients have reachable routes to the
source interface. Otherwise, the configuration will fail.
Step 4 Run http secure-server port port-number
The port number of the HTTPS server is configured.
The default port number of the HTTPS server is 443.
If the default port number is used, attackers may access this port continuously,
consuming bandwidth resources and degrading security performance of the server.
As a result, authorized users cannot access the device. If the default port number
is used by another service, users cannot log in to the device through the web
system.
NOTE
Only users at level 3 and higher levels can log in to the web platform through the
management port.
By default, no ACL is configured for the HTTPS server, that is, web users using
any clients can establish HTTPS connections with the device.
By default, all interfaces on the device allow clients to access the web system.
NOTE
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.
By default, the EasyOperation edition is used for web platform login to a router.
NOTE
----End
Context
The device supports customization of the logo image on the web page. You can
change the logo image based on actual requirements so that the logo image on
the web page is more beautiful.
The logo image must be stored using the required file name and size in the
subdirectory for storing the logo image. After the storage directory of the logo
image on the web page is set, 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.
Procedure
Step 1 Run mkdir directory
A subdirectory is created for storing the logo image under the directory logo-path
of the default working directory on the device.
Step 2 Run system-view
The system view is displayed.
Step 3 Run set logo-path subpathname
The storage directory of the logo image on the web page is set.
By default, the storage directory of the Huawei logo image is used.
----End
Context
You can log in to the web system only after entering the correct user name and
password. The network administrator can configure the user name, password,
level, and service type to create a web system user. After the configuration is
complete, you can log in to the web system using the configured web system
account.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run aaa
The AAA view is displayed.
Step 3 Run local-user user-name password irreversible-cipher password
A web system user name and password are configured.
By default, the system has a local user whose user name is admin. The default
username and password are available in AR Router Default Usernames and
Passwords (Enterprise Network or Carrier). If you have not obtained the access
permission of the document, see Help on the website to find out how to obtain it.
Step 4 Run local-user user-name service-type http
The service type is set to HTTP.
By default, the service type of the local user admin is HTTP.
Step 5 Run local-user user-name privilege level level
The user level is configured.
By default, the level of the local user admin is 15, that is, the local user is a super
administrator.
NOTE
If the level of a user is 0 or no level is configured for the user, the user does not have the
right to log in to the web system. The mapping between user levels and users is as follows:
● If the user level is 1, the user is a common administrator.
● If the user level is 2, the user is an enterprise administrator.
● If the user level is 3 to 15, the user is a super administrator.
----End
Context
As shown in Figure 10-1, a PC connects to a router through an IP network. After
configuring the router's IP address, web system parameters, and a web system
account, you can configure and manage the router on the PC through the web
system.
Router
Procedure
Step 1 Open the browser on the PC. Windows IE8.0 is used in this example. Enter
https://ip address in the address box and press Enter. The web system login page
is displayed, as shown in Figure 10-2.
NOTE
You can use the web mode to configure voice services only when the device works in PBX
mode.
If the device supports the voice self-service system, you can log in to the voice self-service
system using either of the following methods:
● On the web platform, click Enter voice self-service system.
● Before logging in to the voice self-service system, run the self-service-http-server
command in the voice view to access the self-service HTTP server configuration view,
and then run the self-service http secure-server enable command to enable the self-
service HTTPS server. You can enter https://ip address:1443/professional/user/
login.html in the address box to access the voice self-service system. In the
configuration view of the self-service HTTPS server, you can run the self-service http
secure-server port command to change the port number of the self-service HTTPS
server. The default port number is 1443.
Check the cause of the login failure based on the prompt message. If the
number of incorrect password attempts reaches the upper limit, the current
account will be locked. By default, a locked account is automatically unlocked
after 5 minutes.
NOTE
After a user logs in, the web system automatically displays the last login time, IP address,
and login mode of the user.
NOTE
● If the parameters are marked with a red asterisk (*), the system forcibly requires you
to change the password. After changing the password, click OK. If the password is
changed successfully, the system displays the message "Your password has been
modified successfully". Click OK. The login page is displayed. If you do not change the
password, click Cancel. The login page is displayed and you cannot log in to the web
system.
● If the parameters are not marked with a red asterisk (*), the system asks you to
change the password. After changing the password, click OK. If the password is
changed successfully, the system displays the message "Your password has been
modified successfully". Click OK. The login page is displayed. If you do not change the
password, click Cancel. The Device Information page is displayed.
Step 4 Click Logout in the upper right corner of the page to return to the login page.
Step 5 If you do not perform any operations within a period (10 minutes by default) after
logging in to the web system, the system automatically logs you out. Click OK to
return to the login page.
----End
Context
After completing the configuration, run the following commands in any view on
the CLI to check information about online web users and the web system.
Procedure
Step 1 Run the display http server command to check information about the web
system.
Step 2 Run the display http user [ username username ] command to check
information about online web users.
----End
Networking Requirements
As shown in Figure 10-5, there are reachable routes between the device and PC. It
is required that the device be managed and maintained through the web system.
Figure 10-5 Networking diagram for configuring device login through the web
system
Network
PC Router
Configuration Roadmap
The configuration roadmap is as follows:
1. Log in to the device through the console port.
2. Configure a management IP address for the device.
3. Create a web system account.
4. Enable the web system function.
5. Log in to the web system.
Procedure
Step 1 Log in to the device through the console port. For details, see Example for
Configuring First Login Through the Console Port.
Step 2 Configure a management IP address for the device.
<Huawei> system-view
[Huawei] interface gigabitethernet 0/0/0
[Huawei-GigabitEthernet0/0/0] ip address 10.1.1.1 24
[Huawei-GigabitEthernet0/0/0] quit
NOTE
Before configuring a web user, you can run the display this command in the AAA view to
check user names of local users. Ensure that the user name of the configured web user
does not conflict with that of an existing local user; otherwise, the new web user may
overwrite the existing local user.
Enter the web user name and password, and click Login or press Enter. The web
system homepage is displayed.
Step 6 Verify the configuration.
# After the configuration is complete, you can successfully log in to the device
through the web system.
# Run the display http server command on the device to check the SSL policy
name and HTTPS server status.
<Huawei> display http server
HTTP server status : Enabled (default: disable)
HTTP server port : 80 (default: 80)
HTTP timeout interval : 10 (default: 10 minutes)
Current online users : 0
Maximum users allowed : 5
HTTPS server status : Enabled (default: disable)
HTTPS server port : 443 (default: 443)
HTTPS SSL Policy :
----End
Configuration Files
Configuration file of the device
#
pki-realm default
#
aaa
local-user admin password irreversible-cipher %^%#R!d3>ji-.u1+N2gSK>3&2P1AM6jfU:"x/3g[5U,lvqP
+sf=70+%^E7,,SF7+%^%#
local-user admin privilege level 15
local-user admin service-type http
#
interface GigabitEthernet0/0/0
ip address 10.1.1.1 255.255.255.0
#
http server enable
#
return
Symptom
The device cannot be logged in through the web system.
Procedure
Step 1 Check whether the device and client can ping each other.
Access the Windows Command Prompt and run the ping command to check
whether the PC and device are reachable to each other. If the system displays
"Request time out", the target device is unreachable.
Check whether the physical interface that receives ping packets is blocked. If the
physical interface is not blocked, check whether the correct gateway address is
configured on the device, and whether the device and PC are on the same
network segment. If they are on different network segments, run the ip address
ip-address { mask | mask-length } command in the interface view to reconfigure
the management IP address of the device in the target network segment.
Run the display this command in the system view to check whether the http
secure-server enable configuration exists. If not, the HTTPS service is disabled.
Run the http secure-server enable command in the system view to enable the
HTTPS service.
Step 4 Check whether the number of online web users reaches the maximum.
Run the display http server command in any view to check the maximum
number of access users allowed by the web system. Run the display http user
command in any view to check the number of online web users. If the number of
online web users reaches the maximum number of access users allowed by the
web system, you can log in to the device only after other users go offline.
Run the display this command in the interface view to check whether the
configured IP address is correct. If not, run the ip address ip-address { mask |
mask-length } command in the interface view to reconfigure the management IP
address of the device.
Run the display this command in the AAA view to check whether the web user is
correctly configured.
● If the local-user user-name privilege level level configuration exists, the level
of the user user-name is level.
● If the local-user user-name service-type http configuration exists, the service
type of the user user-name is HTTP.
If any of the preceding configurations does not exist, run the following commands
in the AAA view:
● Run the local-user user-name password irreversible-cipher password
command to configure the web user name and password.
● Run the local-user user-name privilege level level command to set the web
user level.
● Run the local-user user-name service-type http command to set the web
user's service type to HTTP.
Step 7 Check whether access control on web users is configured on the device.
Run the display this command in the system view to check whether the http acl
acl-number configuration exists. If so, record the value of acl-number.
Run the display acl acl-number command in any view to check whether the web
user's client IP address is denied in the ACL. If so, run the undo rule rule-id
command in the ACL view to delete the deny rule, and run the corresponding
command to modify the ACL so that the web user's client IP address is allowed.
----End
Symptom
After successful device login through the web system, the web system page is not
completely displayed, or only several options are displayed.
Procedure
Step 1 Check whether the web user level is too low.
If the user level is 1, the user is a common administrator and can only access
Device Information and change the password in User Management. If the user
level is 2, the user is an enterprise administrator and has most operating rights in
the web system. If the user level is 3 to 15, the user is a super administrator and
has all operating rights in the web system.
Run the display this command in the AAA view to check the web user level. If the
value of level is too small in the local-user user-name privilege level level
configuration, some functions cannot be displayed in the web system. Run the
local-user user-name privilege level level command in the AAA view to set the
web user level to 3 or higher so that the web user has all operating rights in the
web system.
Step 2 Check whether the device version is correct.
Run the display version command in any view to check the device version. If the
value of Version is too small in the VRP (R) software, Version Version
configuration, the device does not support some functions in the web system.
Upgrade the device to a proper version.
----End
NOTE
Telnet has security vulnerabilities. You are advised to log in to the device using STelnet V2.
# Set the password to Huawei@123 for the user admin123. The configuration is
as follows:
<Huawei> system-view
[Huawei] aaa
[Huawei-aaa] local-user admin123 password irreversible-cipher Huawei@123
[Huawei-aaa] local-user admin123 service-type http
[Huawei-aaa] local-user admin123 privilege level 15
[Huawei-aaa] return
<Huawei> save
NOTE
For security purposes, you are advised to change the default password for the device.
Procedure
You can run the http secure-server port port-number command in the system
view to reconfigure the port number of the HTTPS server.
More Information
● Changing the port number of the HTTPS service forces all online users to go
offline. Therefore, exercise caution when performing this operation.
● The default port number of the HTTPS server is 443. If you access and control
the device through the web platform, you do not need to specify the port
number. If the default port number is used, attackers may access this port
continuously, consuming bandwidth resources and degrading security
performance of the server. As a result, authorized users cannot access the
device. If the default port number is used by another service, users cannot log
in to the device through the web platform. This command allows you to set
another port number for the HTTPS service to avoid such attacks.
11 File Management
Storage Medium
The AR100&AR120&AR150&AR160&AR200&AR1200 series, AR2201-48FE,
AR2202-48FE, AR2204-27GE, AR2204-24GE, AR2204-27GE-P, AR2204-51GE-P,
AR2204-48GE-P, AR2204E, AR2204E-D, AR2204-51GE, AR2204-51GE-R, AR2220L-
DC, AR2220L-AC and AR3670 support the flash memory and USB flash drive. The
AR2220-AC, AR2220-DC, AR2220E, AR2240C support the flash memory, hard disk
and USB flash drive. The AR2204, AR2240 and AR3260 (using SRU40, SRU60,
SRU80, SRU100, SRU100E, SRU200E, SRU200 and SRU400) support the flash
memory, Micro SD card, and USB flash drive. The AR2240 and AR2204XE support
the Micro SD card and USB flash drive.
NOTE
● A USB flash drive is mainly used for USB-based deployment or system file loading. If the
USB flash drive contains activated system software or patch software, the USB flash
drive is a key component of the system and cannot be removed. The USB flash drive
must use the FAT32 format. Set the format to FAT32 (format the USB flash drive) before
using the USB flash drive.
● The external memory is used to store logs. Do not store software packages,
configuration files, license files, and patch files in the external memory.
If names of files in the storage medium on the device are case-sensitive, you need
to enter case-sensitive file names when operating the files in the FTP client view
or SFTP client view.
NOTE
● In the file operation command format, filename indicates the file name.
● In the file operation command format, directory indicates the path (drive + path).
Users can log in to a device or use the File Transfer Protocol (FTP), Trivial File
Transfer Protocol (TFTP), or Secure File Transfer Protocol (SFTP) mode to manage
files.
Table 11-1 describes file management modes and their advantages and
disadvantages.
In the scenario of
managing storage
media, directories,
and files, log in to You can log in to the Only files on the
Log in to the device through device directly to local device can be
the the console port, manage storage managed. File
device Telnet, or STelnet. media, directories, transfer is not
This login mode is and files. supported.
mandatory for
storage medium
management.
Licensing Requirements
File management is a basic feature of a router and is not under license control.
Feature Limitations
None
Context
NOTICE
When downloading files to the device or performing other operations on the
device, ensure that the power supply of the device is working properly; otherwise,
the downloaded file or the file system may be damaged. As a result, the storage
medium on the device may be damaged or the device cannot be properly started.
Configuration Process
After a user logs in to the device on a terminal, the user can perform operations
on storage media, directories, and files.
Users can perform the following operations in any sequence and select one or
more action items according to requirements.
Procedure
● Perform operations on directories.
● The directory to be
deleted must be
empty.
Delete a directory. rmdir directory ● A deleted directory
and its files cannot be
restored from the
recycle bin.
To delete a file
Remove a file from reset recycle-bin
permanently, remove the
the recycle bin. [ filename | devicename ]
file from the recycle bin.
NOTICE
When a user performs operations that may cause data loss or damage on a
device, the system generates notifications or alarms. Users can configure the
notification mode of the file system.
----End
Pre-configuration Tasks
Before managing files using TFTP, complete the following task:
● Configure reachable routes between the TFTP server and TFTP client.
Configuration Process
NOTE
The TFTP protocol has security risks; therefore, SFTPv2 is recommended for file
management.
Table 11-6 describes the configuration process for managing files using TFTP.
Uploading or
Access the device
2 Downloading Files -
from a TFTP client.
Using TFTP
Procedure
● Configure the TFTP server function and related parameters.
Table 11-7 Configuring the TFTP server function and related parameters
Procedure Command Description
Configure a
By default, no working
working directory set default tftp-
directory is configured for
for the TFTP directory directory
the TFTP server.
server.
----End
Pre-configuration Tasks
Before connecting to the FTP server to manage files, complete the following tasks:
● Ensure that routes are reachable between the terminal and the device.
● Ensure that the terminal functions as the FTP client.
Configuration Process
NOTE
The FTP protocol will bring risk to device security. The SFTPv2 mode is recommended.
Table 11-8 describes the procedure for managing files when the device functions
as an FTP server.
Table 11-8 Managing files when the device functions as an FTP server
Connect to the
Connect to the device
4 device using FTP -
using FTP
from the terminal.
Procedure
● Set FTP server parameters.
Enable the FTP ftp [ ipv6 ] server By default, the FTP server
server function. enable function is disabled.
(Optional)
Specify physical ftp server permit
By default, clients can
interfaces on the interface { interface-
connect to all the physical
FTP server to type interface-number }
interfaces on the FTP server.
which clients can &<1-5>
connect.
NOTE
● If the FTP service is enabled, the port number of the FTP service cannot be
changed. To change the port number, run the undo ftp [ ipv6 ] server command
to disable the FTP service first.
● After operations on files are complete, run the undo ftp [ ipv6 ] server to disable
the FTP server function to ensure the device security.
● Configure local FTP user information.
Before performing operations on files using FTP, configure the local user name
and password, service type, and authorized directory on the FTP server.
Configure the
local-user user-name By default, a local user can
service type for
service-type ftp use any access type.
local users.
Return to the
quit -
system view.
Configure a basic
ACL for the FTP ftp [ ipv6 ] acl acl-number -
server.
– Enter the user name and password as prompted and press Enter. If
command prompt ftp> is displayed in the FTP client view, the user
accesses the working directory on the FTP server. (The following
information is only for reference.)
C:\Windows\System32> ftp 192.168.150.208
Connected to 192.168.150.208.
220 FTP service ready.
User(192.168.150.208:(none)):huawei
331 Password required for huawei.
Password:
230 User logged in.
ftp>
NOTE
Change the
working
cd remote-directory -
directory on the
server.
Change the -
current working
cdup
directory to its
parent directory.
Display the -
working
pwd
directory on the
server.
Delete a
directory from rmdir remote-directory -
the server.
Delete a file
delete remote-filename -
from the server.
put local-filename
Upload a file. -
[ remote-filename ]
get remote-filename
Download a file. -
[ local-filename ]
----End
Pre-configuration Tasks
Before connecting to the SFTP server to manage files, complete the following
tasks:
● Ensure that routes are reachable between the terminal and the device.
● Ensure that the SSH client software has been installed on the terminal.
Configuration Process
NOTICE
The SFTPv1 protocol will bring risk to device security. The SFTPv2 mode is
recommended.
Table 11-14 describes the procedure for managing files when the device functions
as an SFTP server.
Table 11-14 Managing files when the device functions as an SFTP server
Time for updating the key pair of the 0, indicating the key pair of the server
server is never updated.
Procedure
● Set SFTP server parameters.
By default, encryption
algorithms except DES-CBC
are in the encryption
algorithm list of an SSH
server.
During the negotiation
process, the client and server
negotiate the encryption
algorithm for packet
ssh server transmission. You can
cipher{ 3des_cbc | perform this step to
(Optional) configure an encryption
aes128_cbc |
Configure an algorithm list for the SSH
aes128_ctr |
encryption server. The server compares
aes192_ctr |
algorithm list for the encryption algorithm list
aes256_ctr |
the SSH server. sent by the client with its
blowfish_cbc |
des_cbc } * own encryption algorithm
list, and selects the first
encryption algorithm on the
client's list that matches an
encryption algorithm on its
own list as the encryption
algorithm for packet
transmission. If no algorithm
on the client's list matches
an algorithm on the server's
list, the negotiation fails.
(Optional)
By default, the SSH
Configure the SSH ssh server timeout
authentication timeout
authentication seconds
duration is 60 seconds.
timeout duration.
(Optional)
Configure the ssh server By default, the number of
number of SSH authentication- SSH authentication retries is
authentication retries times 3.
retries.
(Optional) Specify
ssh server permit
physical interfaces By default, clients can
interface { interface-
on the SSH server connect to all the physical
type interface-
to which clients can interfaces on the SSH server.
number } &<1-5>
connect.
– When the local RSA or ECC key pair is generated, two key pairs (a server
key pair and a host key pair) are generated at the same time. Each key
pair contains a public key and a private key. The length of the two key
pairs ranges from 512 bits to 2048 bits. The default length is 2048 bits.
● Configure the VTY user interface for SSH users to log in to the device.
SSH users use the VTY user interface to log in to the device using SFTP.
Attributes of the VTY user interface must be configured.
Table 11-17 Configuring the VTY user interface for SSH users to log in to the
device
Operation Command Description
user-interface vty
Enter the VTY user
first-ui-number [ last- -
interface view.
ui-number ]
By default, no authentication
mode is configured for the
VTY user interface.
Set the
authentication The authentication mode of
authentication-mode the VTY user interface must
mode of the VTY
aaa be set to AAA. Otherwise,
user interface to
AAA. you cannot configure the
protocol inbound ssh
command and users cannot
log in to the device.
– If the SSH user uses the password authentication mode, only the SSH
server needs to generate the RSA, or ECC key. If the SSH user uses the
RSA authentication mode, both the SSH server and client need to
generate the RSA, or ECC key and configure the public key of the peer
end locally.
local-user user-name
password
Create SSH users. -
irreversible-cipher
password
The local user
level must be set
to 3 or higher.
This operation
cannot be
performed if the
local-user user-name
Configure the SSH user level. user level in the
privilege level level
VTY interface view
has been set to 3
or higher using
the user privilege
level level
command.
By default, the
authorized
local-user user-name directory for an
Configure the authorized
ftp-directory SSH user is the
directory for SSH users.
directory root directory of
the default
storage medium.
rsa peer-public-key
key-name
[ encoding-type
Enter the RSA
{ der | openssh |
or ECC public -
pem } ] or ecc peer-
key view.
public-key key-name
encoding-type { der
| openssh | pem }
Return to the
peer-public-key end -
system view.
Assign an RSA
ssh user user-name
or ECC public
assign rsa-key | ecc- -
key to an SSH
key } key-name
user.
The SSH client software supporting SFTP must be installed on the terminal to
ensure that the terminal can connect to the device using SFTP to manage
files. The following describes how to connect to the device using the OpenSSH
and the Windows CLI.
– For details how to install the OpenSSH, see the OpenSSH installation
description.
– To use the OpenSSH to connect to the device using SFTP, run the
OpenSSH commands. For details about OpenSSH commands, see
OpenSSH help.
– Windows command prompt can identify commands supported by the
OpenSSH only when the OpenSSH is installed on the terminal.
Access the Windows CLI and run the commands supported by the OpenSSH
to connect to the device using SFTP to manage files.
If command prompt sftp> is displayed in the SFTP client view, the user
accesses the working directory on the SFTP server. (The following information
is only for reference.)
C:\Documents and Settings\Administrator> sftp [email protected]
Connecting to 192.168.200.161...
The authenticity of host '192.168.200.161 (192.168.200.161)' can't be established.
RSA key fingerprint is 46:b2:8a:52:88:42:41:d4:af:8f:4a:41:d9:b8:4f:ee.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.200.161' (RSA) to the list of known hosts.
[email protected]'s password:
sftp>
In the SFTP client view, you can perform one or more file-related operations
listed in Table 11-19 in any sequence.
NOTE
In the SFTP client view, the system does not support predictive command input.
Therefore, you must enter commands in full name.
A maximum of 10
directories can be
deleted at one time.
Before running the rmdir
Delete directories rmdir remote-directory command to delete
from the server. &<1-10> directories, ensure that
the directories do not
contain any files.
Otherwise, the deletion
fails.
Create a directory
mkdir remote-directory -
on the server.
Download a file
get remote-filename
from the remote -
[ local-filename ]
server.
A maximum of 10 files
Delete files from the remove remote-filename
can be deleted at one
server. &<1-10>
time.
----End
● Run the display ssh server status command to view global configuration of
the SSH server.
● Run the display ssh server session command to view session information of
the SSH client on the SSH server.
Pre-configuration Tasks
Before connecting to a device as a TFTP client to manage files, complete the
following tasks:
● Ensure that routes are reachable between the current device and the TFTP
server.
● Obtain the host name or IP address of the TFTP server and the directory for
storing files to be downloaded or uploaded.
Configuration Process
NOTE
The TFTP protocol will bring risk to device security. The SFTPv2 mode is recommended.
Table 11-20 describes the procedure for managing files when the device functions
as a TFTP client.
Table 11-20 Procedure for managing files when the device functions as a TFTP
client
Procedure
● (Optional) Configure the TFTP client source address.
When you specify the source address in an ACL, use the address of an
interface in stable state, for example, a loopback interface. This simplifies the
ACL rule and security policy configuration. After the client source address is
configured as the source or destination address in the ACL rule, IP address
differences and interface status impact are shielded, and incoming and
outgoing packets are filtered.
An ACL can define multiple rules. ACLs are classified into basic ACLs,
advanced ACLs, and Layer 2 ACLs.
TFTP supports only the basic ACL whose number ranges from 2000 to 2999.
ACL rule:
tftp [ -a source-ip-address | -i
interface-type interface-number ]
tftp-server [ public-net | vpn-
IPv4 address
instance vpn-instance-name ] Run either of the
{ get | put } source-filename commands based on
[ destination-filename ] the IP address type.
tftp ipv6 [ -a source-ip-address ] ● get: downloads a
tftp-server-ipv6 [ -oi interface-type file.
interface-number ] [ vpn6- ● put: uploads a file.
IPv6 address
instance vpn6-instance-name ]
{ get | put } source-filename
[ destination-filename ]
NOTE
You can use either or both of the following methods to increase the TFTP uploading or
downloading rate.
● Use the third-party software TFTPD32 (Windows operating system) or TFTPD-HPA
(Linux operating system) on the TFTP server.
● Configure CPCAR on the TFTP client to increase the rate threshold. After
performing the TFTP operation, run the undo cpu-defend-policy [ global | slot
slot-id ] command to cancel the application of an attack defense policy.
The source address or interface specified in the tftp command has a higher
priority than that specified in the tftp client-source command. If you specify
different source addresses or interfaces in the tftp client-source and tftp
commands, the source address or interface specified in the tftp command
takes effect. The source address or interface specified in the tftp client-
source command applies to all TFTP connections. The source address or
interface specified in the tftp command applies only to the current TFTP
connection.
----End
Pre-configuration Tasks
Before connecting to a device as an FTP client to manage files, complete the
following tasks:
● Ensure that routes are reachable between the current device and the FTP
server.
● Obtain the host name or IP address of the FTP server, FTP user name, and
password.
● Obtain the listening port number of the FTP server if the default listening port
number is not used.
Configuration Process
NOTICE
The FTP protocol will bring risk to device security. The SFTPv2 mode is
recommended.
Table 11-23 describes the procedure for managing files when the device functions
as an FTP client.
Table 11-23 Procedure for managing files when the device functions as an FTP
client
(Optional) Change
4 -
the login user
Procedure
● (Optional) Configure the FTP client source address.
When you specify the source address in an ACL, use the address of an
interface in stable state, for example, a loopback interface. This simplifies the
ACL rule and security policy configuration. After the client source address is
configured as the source or destination address in the ACL rule, IP address
differences and interface status impact are shielded, and incoming and
outgoing packets are filtered.
The FTP client source address must be set to the loopback interface IP address
or loopback interface.
Table 11-25 Running FTP commands to connect to the FTP server (with an
IPv4 address)
Operation Command Description
NOTE
● Before connecting to the FTP server, run the set net-manager vpn-instance
command to set the VPN instance to the default VPN instance.
● The source address specified in the ftp command has a higher priority than that
specified in the ftp client-source command on an IPv4 network. If you specify
different source addresses in the ftp client-source and ftp commands, the source
address specified in the ftp command takes effect. The source address specified in
the ftp client-source command applies to all TFTP connections. The source
address specified in the ftp command applies only to the current TFTP connection.
Table 11-26 Running FTP commands to connect to the FTP server (with an
IPv6 address)
Connect to the
FTP server in the ftp ipv6 host-ipv6 [ vpn6-
user view when instance vpn6-instance-name ]
the server uses [ port-number ]
an IPv6 address. Select one of them.
To enter the FTP
Connect to the ftp client view, run the
FTP server in the ftp command.
FTP client view
when the server open ipv6 host-ipv6 [ port-
uses an IPv6 number ]
address.
Users must enter the correct user name and password to connect to the
server.
● Run FTP commands to perform file-related operations.
After connecting to the FTP server, users can run FTP commands to perform
file-related operations including performing operations on directories and
files, configuring the file transfer mode, and viewing the online help about
FTP commands.
NOTE
Change the
working
cd remote-directory -
directory on the
server.
Change the -
current working
cdup
directory to its
parent directory.
Display the -
working
pwd
directory on the
server.
Delete a
directory from rmdir remote-directory -
the server.
Delete a file
delete remote-filename -
from the server.
put local-filename
Upload a file. -
[ remote-filename ]
get remote-filename
Download a file. -
[ local-filename ]
----End
Pre-configuration Tasks
Before connecting to a device as an SFTP client to manage files, complete the
following tasks:
● Ensure that routes are reachable between the current device and the SSH
server.
● Obtain the host name or IP address of the SSH server and SSH user
information.
● Obtain the listening port number of the SSH server if the default listening
port number is not used.
NOTICE
Because a longer key pair provides higher security, you are advised to use key
pairs of the largest length.
Configuration Process
Table 11-28 describes the procedure for managing files when the device functions
as an SFTP client.
Table 11-28 Procedure for managing files when the device functions as an SFTP
client
No. Task Description Remark
s
Procedure
● (Optional) Configure the SFTP client source address.
When you specify the source address in an ACL, use the address of an
interface in stable state, for example, a loopback interface. This simplifies the
ACL rule and security policy configuration. After the client source address is
configured as the source or destination address in the ACL rule, IP address
differences and interface status impact are shielded, and incoming and
outgoing packets are filtered.
The SFTP client source address must be set to the loopback interface IP
address or loopback interface.
sftp client-source { -a
Configure the SFTP source-ip-address | -i The default source
client source address. interface-type interface- address is 0.0.0.0.
number }
Perform this step only when the device logs in to the SSH server in RSA, or ECC
authentication mode, not the password authentication mode.
Enter the
system-view -
system view.
By default, the client cannot connect to the SSH server because the client
does not save the public key of the SSH server. Configure the initial SSH
connection in either of the following ways:
– Enable the initial authentication function on the client. With the function
enabled, the client connects to the SSH server without checking the
public key of the SSH server. When the initial SSH connection succeeds,
the client automatically saves the public key of the SSH server for the
next SSH connection. For details, see Table 11-31.
– Save the public key of the SSH server on the client so that the client can
authenticate the SSH server successfully. For details, see Table 11-32.
This method ensures higher security but becomes more complex than the
first method.
Table 11-31 Actions for enabling first authentication for the SSH client
Action Command Description
Enter the
system-view -
system view.
Enable first
By default, first
authentication ssh client first-time
authentication is disabled on
for the SSH enable
the SSH client.
client.
Table 11-32 Actions for configuring the SSH client to assign the RSA or ECC
public key to the SSH server
Action Command Description
Enter the
system-view -
system view.
Return to the
peer-public-key end -
system view.
Enter the
system system-view -
view.
Operatio
Command Description
n
Command example:
[Huawei] sftp 10.137.217.201
NOTE
In the SFTP client view, the system does not support predictive command input.
Therefore, you must enter commands in full name.
A maximum of 10
directories can be
deleted at one time.
Before running the rmdir
Delete directories rmdir remote-directory command to delete
from the server. &<1-10> directories, ensure that
the directories do not
contain any files.
Otherwise, the deletion
fails.
Create a directory
mkdir remote-directory -
on the server.
Download a file
get remote-filename
from the remote -
[ local-filename ]
server.
A maximum of 10 files
Delete files from the remove remote-filename
can be deleted at one
server. &<1-10>
time.
----End
Networking Requirements
After logging in to the device through the console interface, Telnet, or STelnet,
perform the following operations:
Procedure
Step 1 View files and subdirectories in the current directory.
<Huawei> system-view
[Huawei] sysname Switch
[Switch] quit
<Switch> dir
Directory of flash:/
Step 2 Create the test directory, copy the vrpcfg.zip file to test, and rename vrpcfg.zip
as backup.zip.
NOTE
If no target file name is specified, the source file and target file have the same name.
----End
Configuration File
Configuration file of the Switch
#
sysname Switch
#
return
Networking Requirements
As shown in Figure 11-1, there are reachable routes between the TFTP server and
client. You need to obtain system software from the TFTP server to upgrade the
TFTP client.
10.1.1.1/24 10.1.1.2/24
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the TFTP server function and related parameters.
2. Set up a connection between the TFTP server and client, and download
system software from the TFTP server to the TFTP client.
Procedure
Step 1 Configure the TFTP server function and parameters.
<Huawei> system-view
[Huawei] sysname TFTP Server
[TFTP Server] set default tftp-directory flash:
[TFTP Server] tftp server enable
[TFTP Server] quit
Step 2 Set up a connection between the TFTP server and client, and download system
software from the TFTP server to the TFTP client.
<Huawei> system-view
[Huawei] sysname TFTP Client
[TFTP Client] quit
<TFTP Client> tftp 10.1.1.1 get devicesoft.cc
Info: Transfer file in binary mode.
Downloading the file from the remote TFTP server. Please wait...
----End
Configuration Files
● Configuration file of the TFTP server
#
sysname TFTP Server
#
Networking Requirements
As shown in Figure 11-2, PC1 connects to the device, and the IP address of the
management network interface on the device is 10.136.23.5. The device needs to
be upgraded. The device is required to function as the FTP server to upload the
system software from PC1 to the device and save the configuration file to PC1 for
backup. A security policy is configured to ensure that only PC1 is allowed to access
the FTP server.
Figure 11-2 Networking diagram for managing files when the device functions as
an FTP server
10.136.23.10/24 10.136.23.5/24
PC1
Configuration Roadmap
The configuration roadmap is as follows:
1. Configure the FTP function and FTP user information including user name,
password, user level, service type, and authorized directory on the FTP server.
2. Configure access permissions on the FTP server.
3. Save the vrpcfg.zip file on the FTP server.
4. Connect to the FTP server from the PC.
5. Upload devicesoft.cc to and download vrpcfg.zip from the FTP server.
Procedure
Step 1 Configure the FTP function and FTP user information on the FTP server.
<Huawei> system-view
[Huawei] sysname FTP_Server
[FTP_Server] ftp server enable
[FTP_Server] aaa
[FTP_Server-aaa] local-user admin1234 password irreversible-cipher Helloworld@6789
[FTP_Server-aaa] local-user admin1234 privilege level 15
[FTP_Server-aaa] local-user admin1234 service-type ftp
[FTP_Server-aaa] local-user admin1234 ftp-directory flash:
[FTP_Server-aaa] quit
Step 4 Connect to the FTP server from the PC as the admin1234 user whose password is
Helloworld@6789 and transfer files in binary mode.
Assume that the PC runs the Window XP operating system.
C:\Documents and Settings\Administrator> ftp 10.136.23.5
Connected to 10.136.23.5.
220 FTP service ready.
User (10.136.23.5:(none)): admin1234
331 Password required for admin1234.
Password:
230 User logged in.
ftp> binary
200 Type set to I.
ftp>
Step 5 Upload devicesoft.cc to and download vrpcfg.zip from the FTP server.
# Upload the devicesoft.cc file to the FTP server.
ftp> put devicesoft.cc
200 Port command okay.
150 Opening BINARY mode data connection for devicesoft.cc
226 Transfer complete.
ftp: 93832832 bytes sent in 136.34Seconds 560.79Kbytes/sec.
NOTE
The devicesoft.cc file to be uploaded and the vrpcfg.zip file to be downloaded are stored
in the local directory on the FTP client. Before uploading and downloading files, obtain the
local directory on the client. The default FTP user's local directory on the Windows XP
operating system is C:\Documents and Settings\Administrator.
----End
Configuration File
#
sysname FTP_Server
#
aaa
local-user admin1234 password irreversible-cipher %^%#D2cW%k[R=*_*l"E^X9M6Ra'6D\iS(Xqg%U@4,I!
$zbBUa'9R%^%#
local-user admin1234 privilege level 15
local-user admin1234 ftp-directory flash:
local-user admin1234 service-type ftp
#
interface GigabitEthernet1/0/0
ip address 10.136.23.5 255.255.255.0
#
acl number 2001
rule 5 permit source 10.136.23.10 32
#
ftp server enable
ftp acl 2001
#
return
Networking Requirements
As shown in Figure 11-3, PC1 connects to the device, and the IP address of the
management network interface on the device is 10.136.23.4. Files need to be
securely transferred between PC1 and the device. Configure the device as the SSH
server to provide the SFTP service so that the SSH server can authenticate the
client and encrypt data in bidirectional mode, ensuring secure file transfer. A
security policy is configured to ensure that only PC1 is allowed to access the SSH
server.
Figure 11-3 Networking diagram for managing files using SFTP when the device
functions as an SSH server
10.136.23.10/24 10.136.23.4/24
PC1
Configuration Roadmap
The configuration roadmap is as follows:
1. Generate a local key pair and enable the SFTP server function on the SSH
server so that the server and client can securely exchange data.
2. Configure the VTY user interface on the SSH server.
3. Configure SSH user information including the authentication mode, user
name, and password.
4. Configure access permissions on the SSH server to control SSH users.
5. Connect to the SSH server using the third-party software OpenSSH on the PC.
Procedure
Step 1 Generate a local key pair on the SSH server, and enable the SFTP server.
<Huawei> system-view
[Huawei] sysname SSH Server
[SSH Server] sftp server enable
[SSH Server] 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...
......................................................................................+++
....+++
.......................................++++++++
..............++++++++
Step 3 Configure SSH user information including the authentication mode, user name,
and password.
[SSH Server] aaa
[SSH Server-aaa] local-user client001 password irreversible-cipher Huawei@123
[SSH Server-aaa] local-user client001 privilege level 15
[SSH Server-aaa] local-user client001 service-type ssh
[SSH Server-aaa] quit
[SSH Server] ssh user client001 authentication-type password
Step 5 Connect to the SSH server using the third-party software OpenSSH on the PC.
The Windows CLI can identify OpenSSH commands only when the OpenSSH is
installed on the PC.
After you connect to the SSH server through third-party software, the SFTP view is
displayed. Then you can perform file-related operations in the SFTP view.
----End
Configuration File
Configuration file of the SSH_Server
#
sysname SSH Server
#
acl number 2001
rule 5 permit source 10.136.23.10 0
rule 10 deny source 10.136.23.20 0
#
aaa
local-user client001 password irreversible-cipher %^%#<R<G9j0<_;@]`h@]TnCUuGP-1Za*%2i*k!
X<~Q4Ha1B0GP0u%^%#
local-user client001 privilege level 15
local-user client001 service-type ssh
#
sftp server enable
#
user-interface vty 0 14
acl 2001 inbound
authentication-mode aaa
protocol inbound ssh
#
return
Networking Requirements
As shown in Figure 11-5, the remote device at 10.1.1.1/24 functions as the TFTP
server. The device at 10.2.1.1/24 functions as the TFTP client. Routes between the
device and the server are reachable.
The device needs to be upgraded. To upgrade the device, you must download
system software devicesoft.cc from and upload the configuration file vrpcfg.zip
to the TFTP server.
Figure 11-5 Networking diagram for managing files when the device functions as
a TFTP client
10.2.1.1/24 10.1.1.1/24
Internet
GE1/0/0
TFTP Client TFTP Server
Configuration Roadmap
The configuration roadmap is as follows:
1. Run the TFTP software on the TFTP server and configure the working
directory.
2. Run TFTP commands to download devicesoft.cc from and upload vrpcfg.zip
to the TFTP server.
Procedure
Step 1 Run the TFTP software on the TFTP server and configure the working directory.
(For details, see related third-party documentation.)
Step 2 Run TFTP commands to download devicesoft.cc from and upload vrpcfg.zip to
the TFTP server.
<Huawei> tftp 10.1.1.1 get devicesoft.cc
Info: Transfer file in binary mode.
Downloading the file from the remote TFTP server. Please wait...\
TFTP: Downloading the file successfully.
93832832 bytes received in 722 seconds.
<Huawei> tftp 10.1.1.1 put vrpcfg.zip
Info: Transfer file in binary mode.
Uploading the file to the remote TFTP server. Please wait...|
TFTP: Uploading the file successfully.
7717 bytes send in 1 second.
<Huawei> dir
Directory of flash:/
# Access the working directory on the TFTP server and check the vrpcfg.zip file.
----End
Networking Requirements
As shown in Figure 11-6, the remote device at 10.1.1.1/24 functions as the FTP
server. The device at 10.2.1.1/24 functions as the FTP client. Routes between the
device and the server are reachable.
The device needs to be upgraded. To upgrade the device, you must download
system software devicesoft.cc from and upload the configuration file vrpcfg.zip
to the FTP server.
Figure 11-6 Networking diagram for managing files when the device functions as
an FTP client
10.2.1.1/24 10.1.1.1/24
Internet
GE1/0/0
FTP Client FTP Server
Configuration Roadmap
The configuration roadmap is as follows:
1. Run the FTP software on the FTP server and configure FTP user information.
2. Connect to the FTP server.
Procedure
Step 1 Run the FTP software on the FTP server and configure FTP user information. (For
details, see related third-party documentation.)
Step 2 Connect to the FTP server.
<Huawei> ftp 10.1.1.1
Trying 10.1.1.1 ...
Press CTRL+K to abort
Connected to 10.1.1.1.
220 FTP service ready.
User(10.1.1.1:(none)):admin
331 Password required for admin.
Enter password:
230 User logged in.
[Huawei-ftp]
Step 3 Run FTP commands to download devicesoft.cc from and upload vrpcfg.zip to the
FTP server.
[Huawei-ftp] binary
[Huawei-ftp] get devicesoft.cc
[Huawei-ftp] put vrpcfg.zip
[Huawei-ftp] quit
# Access the working directory on the FTP server and check the vrpcfg.zip file.
----End
Networking Requirements
SSH secures file transfer on a traditional insecure network by authenticating the
client and encrypting data in bidirectional mode. The client uses SFTP to securely
connect to the SSH server and transfer files.
As shown in Figure 11-7, routes between the SSH server and clients client001 and
client002 are reachable. In this example, Huawei device functions as an SSH
server.
Client001 connects to the SSH server using the password authentication mode,
and client002 using the RSA authentication mode.
Figure 11-7 Networking diagram for managing files when the device functions as
an SFTP client
GE1/0/0
10.2.1.1/24
client001 10.1.1.1/24
Internet
GE1/0/0
SSH Server
10.3.1.1/24
client002 GE1/0/0
Configuration Roadmap
The configuration roadmap is as follows:
1. Generate a local key pair and enable the SFTP server function on the SSH
server so that the server and client can securely exchange data.
2. Create users client001 and client002 and set their authentication modes on
the SSH server.
3. Generate a local key pair on client002 and configure the RSA public key of
client002 on the SSH server so that the server can authenticate the client
when the client connects to the server.
4. Log in to the SSH server as users client001 and client002 using SFTP and
manage files.
Procedure
Step 1 Generate a local key pair and enable the SFTP server function on the SSH server.
<Huawei> system-view
[Huawei] sysname SSH Server
[SSH Server] sftp server enable
[SSH Server] 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).
# Create the client001 user and set the authentication mode to password for the
user.
# Create an SSH user client002 and set the authentication mode to rsa for the
user.
[SSH Server] aaa
[SSH Server-aaa] local-user client002 password irreversible-cipher Helloworld@6789
[SSH Server-aaa] local-user client002 service-type ssh
[SSH Server-aaa] local-user client002 privilege level 3
[SSH Server-aaa] quit
[SSH Server] ssh user client002 authentication-type rsa
Step 3 Generate a local key pair on client002 and configure the RSA public key of
client002 on the SSH server.
# Generate a local key pair on client002.
<Huawei> system-view
[Huawei] sysname client002
[client002] 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...
......................................................................................+++
....+++
.......................................++++++++
..............++++++++
=====================================================
Time of Key pair created: 2012-08-06 17:17:37+00:00
Key name: Host
Key type: RSA encryption Key
=====================================================
Key code:
30820109
02820100
CB0E88EC A1C2CFEA F97126F9 36919C08 0455127B
A3A48594 69517096 35626F55 E4FAF0EB FDA2B9E9
5E417B2B E09F38B0 D26FCA73 FE2E3FC4 DFBEC8CF
4ED0C909 E8D975E6 FFC73C81 D13FE71E 759DC805
B0F0E877 4FC9288E BE1E197C 2A7186B0 B56F5573
3A5EA588 29C63E3B 20D56233 8E63278D F941734F
6B359C69 BBAE5A52 EB842179 04B4204D 5DB31D72
97F0C085 DA771F66 0AAADC28 D264CEB9 5BADA92C
CDE9F116 D6D99C48 CEBA3A1D 868B053A 32941D85
CCAA9796 A4B55760 0A8108ED DB45DA12 F61634C9
59431600 341FEDEF 5379D565 A8D1953D DEA018A2
72F99FFC 63DE04BF 2A6219BD DF13D705 27D63DEF
83D556BC 5B44D983 8D5EA126 C1EB71CB
0203
010001
=====================================================
Time of Key pair created: 2012-08-06 17:17:44+00:00
Key name: Server
Key type: RSA encryption Key
=====================================================
Key code:
3067
0260
DF8AFF3C 28213B94 2292852E E98657EE 11DE5AF4
8A176878 CDD4BD31 55E05735 3080F367 A83A9034
47D534CA 81250C1D 35401DC3 464E9E5F A50202CF
A7AD09CD AC3F531C A763F0A0 4C8E51B9 18755400
76AF4A78 225C92C3 01FE0DFF 06908363
0203
010001
# Configure the RSA public key on the SSH server. (Information in bold in the
display command output is the RSA public key. Copy the information to the
server.)
[SSH Server] rsa peer-public-key rsakey001
[SSH Server-rsa-public-key] public-key-code begin
[SSH Server-rsa-key-code] 30820109
[SSH Server-rsa-key-code] 02820100
[SSH Server-rsa-key-code] CB0E88EC A1C2CFEA F97126F9 36919C08 0455127B
[SSH Server-rsa-key-code] A3A48594 69517096 35626F55 E4FAF0EB FDA2B9E9
[SSH Server-rsa-key-code] 5E417B2B E09F38B0 D26FCA73 FE2E3FC4 DFBEC8CF
[SSH Server-rsa-key-code] 4ED0C909 E8D975E6 FFC73C81 D13FE71E 759DC805
[SSH Server-rsa-key-code] B0F0E877 4FC9288E BE1E197C 2A7186B0 B56F5573
[SSH Server-rsa-key-code] 3A5EA588 29C63E3B 20D56233 8E63278D F941734F
[SSH Server-rsa-key-code] 6B359C69 BBAE5A52 EB842179 04B4204D 5DB31D72
[SSH Server-rsa-key-code] 97F0C085 DA771F66 0AAADC28 D264CEB9 5BADA92C
[SSH Server-rsa-key-code] CDE9F116 D6D99C48 CEBA3A1D 868B053A 32941D85
[SSH Server-rsa-key-code] CCAA9796 A4B55760 0A8108ED DB45DA12 F61634C9
[SSH Server-rsa-key-code] 59431600 341FEDEF 5379D565 A8D1953D DEA018A2
[SSH Server-rsa-key-code] 72F99FFC 63DE04BF 2A6219BD DF13D705 27D63DEF
[SSH Server-rsa-key-code] 83D556BC 5B44D983 8D5EA126 C1EB71CB
[SSH Server-rsa-key-code] 0203
[SSH Server-rsa-key-code] 010001
[SSH Server-rsa-key-code] public-key-code end
[SSH Server-rsa-public-key] peer-public-key end
Enter password:
sftp-client>
sftp-client>
# Run the display ssh server status command. You can see that the SFTP service
has been enabled. Run the display ssh user-information command. Information
about the configured SSH users is displayed.
----End
Configuration Files
● Configure file on the SSH server
#
sysname SSH Server
#
rsa peer-public-key rsakey001
public-key-code begin
30820109
02820100
CB0E88EC A1C2CFEA F97126F9 36919C08 0455127B A3A48594 69517096 35626F55
E4FAF0EB FDA2B9E9 5E417B2B E09F38B0 D26FCA73 FE2E3FC4 DFBEC8CF 4ED0C909
E8D975E6 FFC73C81 D13FE71E 759DC805 B0F0E877 4FC9288E BE1E197C 2A7186B0
B56F5573 3A5EA588 29C63E3B 20D56233 8E63278D F941734F 6B359C69 BBAE5A52
EB842179 04B4204D 5DB31D72 97F0C085 DA771F66 0AAADC28 D264CEB9 5BADA92C
CDE9F116 D6D99C48 CEBA3A1D 868B053A 32941D85 CCAA9796 A4B55760 0A8108ED
DB45DA12 F61634C9 59431600 341FEDEF 5379D565 A8D1953D DEA018A2 72F99FFC
63DE04BF 2A6219BD DF13D705 27D63DEF 83D556BC 5B44D983 8D5EA126 C1EB71CB
0203
010001
public-key-code end
peer-public-key end
#
aaa
local-user client001 password irreversible-cipher %^%#HW=5%Mr;:2)/RX$FnU1HLO%-TBMp4wn%;~
\#%iAut}_~O%0L%^%#
local-user client001 privilege level 3
local-user client001 service-type ssh
local-user client002 password irreversible-cipher %^%#*~Br";[g6Pv5Zf>$~{hY+N!`{$<[Y{;l02P)B,EBz
\1FN!c+%^%#
local-user client002 privilege level 3
local-user client002 service-type ssh
#
ssh user client002 assign rsa-key rsakey001
ssh user client002 authentication-type rsa
sftp server enable
#
user-interface vty 0 4
authentication-mode aaa
user privilege level 3
protocol inbound ssh
#
return
Cause Analysis
● The FTP server is not running.
● The listening port number of the FTP server is not the default one, and no
port number is specified when you log in to the FTP server.
● The authentication information, authorized directory, and user level of the
FTP user are not configured.
● The number of online FTP users who have logged in to the FTP server reaches
the upper threshold 5.
● An ACL is configured on the FTP server, and the FTP client IP address is not
specified in the ACL.
Procedure
Step 1 Check whether the FTP server is running properly.
Run the display ftp-server command in any view to check the FTP server status.
● The following information indicates that the FTP server is not running:
<Huawei> display ftp-server
Info: The FTP server is already disabled.
Run the ftp server enable command in the system view to start the FTP
server.
<Huawei> system-view
[Huawei] ftp server enable
Info: Succeeded in starting the FTP server.
● The following information indicates that the FTP server is running properly:
<Huawei> display ftp-server
FTP server is running
Max user number 5
User count 0
Timeout value(in minute) 30
Listening port 21
Acl number 0
FTP server's source address 0.0.0.0
Step 2 Check whether the listening port number of the FTP server is the default port
number 21.
1. Run the display tcp status command in any view to check the current TCP
port listening status.
<Huawei> display tcp status
TCPCB Tid/Soid Local Add:port Foreign Add:port VPNID State
2a67f47c 6 /1 0.0.0.0:21 0.0.0.0:0 23553 Listening
2b72e6b8 115/4 0.0.0.0:22 0.0.0.0:0 23553 Listening
3265e270 115/1 0.0.0.0:23 0.0.0.0:0 23553 Listening
2a6886ec 115/23 10.137.129.27:23 10.138.77.43:4053 0 Establish
ed
2a680aac 115/14 10.137.129.27:23 10.138.80.193:1525 0 Establish
ed
2a68799c 115/20 10.137.129.27:23 10.138.80.202:3589 0 Establish
ed
2. Run the display ftp-server command in any view to check the listening port
number of the FTP server.
<Huawei> display ftp-server
FTP server is running
Max user number 5
User count 0
Timeout value(in minute) 30
Listening port 21
Acl number 0
FTP server's source address 0.0.0.0
If the listening port number is not 21, run the ftp server port command to set the
listening port number to 21.
<Huawei> system-view
[Huawei] undo ftp server
Info: Succeeded in closing the FTP server.
[Huawei] ftp server port 21
[Huawei] ftp server enable
Info: Succeeded in starting the FTP server.
Alternatively, enter the port number configured on the server when you set up an
FTP connection on the FTP client.
Step 3 Check whether the authentication information, authorized directory, and user level
of the FTP user are correctly configured.
The FTP user name, password, authorized directory, and user level must be
configured. If the FTP authorized directory and user level are not configured, login
fails.
The service type is optional. By default, the system does not support any service
type.
Run the local-user user-name service-type ftp command to set the service types
for the FTP user.
Step 4 Check whether the number of online FTP users who have logged in to the FTP
server reaches the upper threshold.
Run the display ftp-users command to check the number of online FTP users.
If an ACL is configured on the FTP server, only IP addresses specified in the ACL
can log in to the FTP server.
----End
Cause Analysis
● The FTP source or destination directory name consists of unsupported
characters.
Procedure
Step 1 Check whether the FTP source and destination directory names consist of
unsupported characters.
The following characters and spaces are not supported: ~ */ \ : ' "
If the directory names consist of any unsupported characters, modify the directory
names.
Step 2 Check whether the storage space of the FTP root directory is sufficient.
Run the dir command on the FTP server to check the free space of the FTP root
directory.
If the space of the FTP root directory is insufficient, run the delete /unreserved
command in the user view to delete unnecessary files.
----End
In V200R006C10 and later versions, if the router functions as an FTP client and
downloads a file from the FTP server, the router supports resumable download. If
the router is powered off during the download process, the file may be damaged.
If you need to resume the download after the router restarts, you are advised to
use the newly downloaded file to overwrite the originally downloaded file, or
delete the originally downloaded file and re-download the file. Otherwise, the
download may fail.
NOTE
Resumable FTP download takes effect for only one file. If you need to resume the
download when the content of the target file changes, you are advised to use the newly
downloaded file to overwrite the originally downloaded file, or delete the originally
downloaded file and re-download the file. Otherwise, the file content may be incorrect.
Context
The AR100&AR120&AR150&AR160&AR200&AR1200 series, AR2201-48FE,
AR2202-48FE, AR2204-27GE, AR2204-24GE, AR2204-27GE-P, AR2204-51GE-P,
AR2204-48GE-P, AR2204E, AR2204E-D, AR2204-51GE, AR2204-51GE-R, AR2220L-
DC, AR2220L-AC and AR3670 support the flash memory and USB flash drive. The
AR2220-AC, AR2220-DC, AR2220E, AR2240C support the flash memory, hard disk
and USB flash drive. The AR2204, AR2240 and AR3260 (using SRU40, SRU60,
SRU80, SRU100, SRU100E, SRU200E, SRU200 and SRU400) support the flash
memory, Micro SD card, and USB flash drive. The AR2240 and AR2204XE support
the Micro SD card and USB flash drive.
NOTE
If the USB flash drive contains activated system software or patch software, the USB flash drive
is a key component of the system and cannot be removed.
In this chapter, the Micro SD card is used as an example of the storage device.
12.1 Overview of System Startup
12.2 Licensing Requirements and Limitations for System Startup
This section provides the configuration precautions of configuring System Startup.
12.3 Managing Configuration Files
12.4 Configuring System Startup Files
12.5 Restarting the Device
12.6 Configuration Examples for System Startup
● The upgrade of a device is closely related to the released software versions. The
corresponding upgrade guide is released with each new version and you can upgrade
the device according to the guide. To obtain the upgrade guides, visit https://
support.huawei.com/enterprise and download the upgrade guide based on the
product name and version.
● When the message "Start Memory Test ? ('t' or 'T' is test):" is displayed during the
device startup, you can press T to start the memory detection.
● For details about commands used for device upgrade, see "Basic Configurations
Commands - Upgrade Commands" in the Huawei AR Series Access Routers Command
Reference.
System Software
The device software includes BootROM software and system software. After the
device is powered on, it runs the BootROM software to initialize the hardware and
display the hardware parameters. Then the device runs the system software. The
system software provides drivers and adaptation functions for hardware, and
offers services features. The BootROM software and system software are
prerequisite for device startup and operation, providing support, management, and
services for the device.
NOTE
The BootROM software is included in the system software package (.cc file) of the device.
The BootROM software is automatically upgraded in system software upgrade.
Configuration File
A configuration file is a collection of command lines. The current configurations
are saved in configuration files, and continue to take effect after the device
restarts. You can view configurations in configuration files or upload the files to
other devices to implement batch configuration.
A configuration file is in the text format and meets the following requirements:
The following table describes the factory configuration, configuration file and
current configuration.
Configurati When the device is powered on, ● Run the display startup
on file the device reads the command to check the
configuration file from the current and next startup
default directory to boot the configuration files.
system. Therefore, the ● Run the display saved-
configuration in the file is configuration command to
called the initial configuration. check the configuration file
If no configuration file is stored for next startup.
in the default directory, the
device uses the default
parameters for initialization.
If you modify the current configuration and want to use the modified
configuration as the next startup configuration, run the save command to save
the new configuration to the default storage device.
NOTE
If a command in incomplete form is configured, the system saves the command to the
configuration file in its complete form, which may cause the command to have more than
510 characters. (The maximum length of a command supported by the system is 510
characters.) The incomplete command cannot be recovered after the system restarts.
Patch File
A patch is a kind of software compatible with the system software. It is used to
remove a few issues in the software that need to be solved immediately. Patches
can also fix errors or improve adaptation of the system software. For example,
patches can fix defects of the system and optimize some functions to meet service
requirements.
The patches are released in patch files. A patch file may contain one or more
patches with different functions. When patch files are loaded from the storage
device to the patch area in the memory, they are assigned unique sequence
number for users to identify, manage, and operate the patches.
Patch classification
According to impact on services, patches can be classified into hot patch and cold
patch.
● Hot patch (HP): The services are not interrupted when the HP is loaded and
activated, which reduces upgrade costs and eliminates upgrade risks.
● Cold Patch (CP): You must restart the device for the CP to take effect. Services
are interrupted during the restart.
According to patch dependency, patches can be classified into incremental and
non-incremental patches.
● An incremental patch is dependent on previous patches. A new patch file
contains all the patch information in the previous patch file. You can install
the patch file without uninstalling the original patch file.
● A non-incremental patch is exclusive in the current system. To install another
patch file when there is already one, uninstall the existing patch file, and then
install and run the new patch file.
NOTE
The currently released patches are hot patches and incremental patches. All the patches
mentioned in the subsequent sections are hot patches and incremental patches unless
otherwise specified.
Status of Patches
Each patch has its own state that can only be changed with command line.
Idle The patch file is saved to the When a patch in the storage
storage device but has not device is loaded to the patch
been loaded to the patch area, the patch is in the
area. running state.
Running When a patch is stored in the You can unload the patch that
patch area and runs is in the running state so that
permanently, the patch is in it can be deleted from the
the running state. If a board patch area.
is reset, the running patch on
the board remains in the
running state.
Idle Running
Delete a patch
Installing Patches
● The hot patches are generally installed while the device is running without
interrupting services. This is an advantage of hot patches.
For details on how to install patches, see the corresponding patch installation
guide. For details about commands used for device upgrade, see "Basic
Configurations Commands - Upgrade Commands" in the Huawei AR Series
Access Routers Command Reference.
● Another way is to specify a patch file for next startup, which is described in
this chapter. The patch file takes effect after the device reboots. The method
is often used during a system upgrade.
Licensing Requirements
configuring System Startup is a basic feature of a router and is not under license
control.
Feature Limitations
Creating and modifying the configuration file locally are not recommended
because the file format may be incorrect. As a result, configuration restoration will
fail.
Configuration Process
Perform one or multiple of the following tasks:
Context
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 still take effect after a restart, save the current configuration in
the configuration file before restarting the device. Use either of the following
methods to save the current configuration:
● Configure the automatic save function.
Procedure
● Save the configurations automatically.
NOTICE
▪ The default interval is 0 seconds, indicating that the system does not
save the configurations automatically.
In automatic save mode, the system automatically saves configurations to the current
startup configuration file. You can run the display startup command to check the
name of the current startup configuration file.
● Save the configurations manually.
– Run save [ all ] [ configuration-file ]
The current configuration is saved.
The configuration file name extension must be .zip or .cfg. The system
startup file must be stored in the root directory of the storage device.
Run the save all command to save all the current configurations,
including the configurations of the boards that are not running, to the
current storage directory.
▪ You can run the pwd (user view) command in the user view to
check the current storage directory.
▪ You can run the cd (user view) command in the user view to modify
the current storage directory.
----End
NOTE
Procedure
● Run compare configuration [ configuration-file [ current-line-number save-
line-number ] ]
The system starts to check whether the current configurations are identical
with the next startup configuration file or the specified configuration file.
If parameters are not specified, the configuration files are compared from the
first line. The parameters current-line-number and save-line-number are used
to continue the comparison, neglecting the differences, after differences are
found.
----End
Procedure
● Copying the content in the display on the screen
Run the display current-configuration command and copy all command
outputs to a .txt file. The configuration file is backed up in the hard disk of
the maintenance terminal.
NOTE
If a configuration is too long, it may be displayed in two lines on the terminal screen,
depending on the terminal software. When copying a two-line configuration from the
screen to a .txt file, ensure that the configuration is displayed in only one line.
Otherwise, configuration restoration may fail when the .txt file is used.
● Backing up the configuration file to the storage device
The current configuration file can be backed up immediately to the SD card of
the device. After the device starts, run the following commands to back up
the configuration file to the SD card of the device:
<Huawei> save config.cfg
<Huawei> copy config.cfg backup.cfg
To save the configuration in a directory other than the default storage device,
specify an absolute path.
● Backing up the configuration file using FTP, TFTP, or SFTP
The device supports configuration file backup through FTP, TFTP, or SFTP.
Configuration file backup through FTP or TFTP is simple, but there are
security risks. In scenarios with high security requirements, configuration file
backup through SFTP is recommended. The following describes the
configuration file backup process using FTP as an example. For details about
TFTP and SFTP, see "File Management" in Huawei AR Series Access Routers
Configuration Guide - Basic Configurations.
a. Start the FTP service when the device works as the FTP server.
Enable the FTP server function on the device. Create an FTP user with the
name huawei and password Helloworld@6789. The user is authorized to
access the sd1 directory.
<Huawei> system-view
[Huawei] ftp server enable
Info: Succeeded in starting the FTP server.
[Huawei] aaa
[Huawei-aaa] local-user huawei password irreversible-cipher Helloworld@6789
[Huawei-aaa] local-user huawei ftp-directory sd1:
On the PC, set up an FTP connection to the device through the FTP client.
Assume that the device IP address is 10.110.24.254.
C:\Documents and Setting\Administrator> ftp 10.110.24.254
Connected to 10.110.24.254.
220 FTP service ready.
User (10.110.24.254:(none)): huawei
331 Password required for huawei.
Password:
230 User logged in.
If the FTP user is authenticated, the FTP client displays the prompt
character of ftp>. Enter binary following the prompt character, and
specify the path c:\temp the uploaded file is to be saved on the FTP
client.
ftp> binary
200 Type set to I.
ftp> lcd c:\temp
Local directory now C:\temp.
On the PC, run the get command to load the configuration file to the
specified path and save the file as backup.cfg.
ftp> get config.cfg backup.cfg
e. Check whether the config.cfg and backup.cfg files have the same size. If
they have the same size, the backup is successful.
----End
Context
When incorrect configurations are performed and functions are abnormal, you can
use one of the following methods:
● Recover the configuration file that is backed up in the storage device.
● Recover the configuration file using FTP, TFTP, or SFTP.
NOTE
After recovering the configuration file, you must restart the device to make the file take
effect. Run the startup saved-configuration command to specify the next startup
configuration file. If the configuration file name is unchanged, you do not need to run this
command. Run the reboot command to restart the device. When Warning: All the
configuration will be saved to the next startup configuration. Continue? [y/n]: is
displayed, enter n to prevent the current configurations of the device from being saved to
the backup configuration file.
Procedure
● Recover the configuration file that is backed up in the SD card.
This step recovers the backup configuration file stored in the SD card of the
device to the current system configuration file. When the device is working
properly, run the following command:
a. Recover the backup configuration file stored in the SD card of the device
to the current system configuration file.
Enable the FTP server function on the device. Create an FTP user with the
name huawei and password Helloworld@6789. The user is authorized to
access the sd1 directory.
<Huawei> system-view
[Huawei] ftp server enable
Info: Succeeded in starting the FTP server.
[Huawei] aaa
[Huawei-aaa] local-user huawei password irreversible-cipher Helloworld@6789
[Huawei-aaa] local-user huawei ftp-directory sd1:
[Huawei-aaa] local-user huawei service-type ftp
[Huawei-aaa] local-user huawei privilege level 15
On the PC, set up an FTP connection to the device through the FTP client.
Assume that the device IP address is 10.110.24.254.
C:\Documents and Setting\Administrator> ftp 10.110.24.254
Connected to 10.110.24.254.
220 FTP service ready.
User (10.110.24.254:(none)): huawei
331 Password required for huawei.
Password:
230 User logged in.
If the FTP user is authenticated, the FTP client displays the prompt
character of ftp>. Enter binary following the prompt character, and
specify the path C:\temp where the uploaded file is to be saved on the
FTP client.
ftp> binary
200 Type set to I.
ftp> lcd c:\temp
Local directory now C:\temp.
----End
NOTICE
Exercise caution when you run the reset saved-configuration command. You are
advised to run this command under the guide of technical support personnel.
Procedure
● Run the reset saved-configuration command to clear the next startup
configuration file and cancel the configuration file used for next startup. The
default device configurations are restored.
NOTE
● If the current startup configuration file is the same as the next startup
configuration file when you run the reset saved-configuration command, the
current startup configuration file is also cleared.
● After you run this command and manually restart the device, the system displays a
message asking you whether to save the configurations. Select N to clear the
configurations.
● 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.
----End
NOTICE
If you press and hold down the RESET button for at least 5 seconds, the device will
restore to the latest factory settings after a restart. If the device needs to restore
to the factory defaults, run the set factory-configuration from default command
in the system view. It is recommended that you perform this operation under the
guidance of technical support personnel.
Procedure
Step 1 Run set factory-configuration from { current-configuration | filename |
default }
The current configuration, existing configuration file, or default factory
configuration is configured as the factory configuration.
Step 2 (Optional) Run set factory-configuration operate-mode { reserve-configuration
| delete-configuration }
The mode of restoring the factory configuration is set to reserve or delete.
Reserve mode: The current configuration file will be reserved after you restore
factory configurations.
Delete mode: The current configuration file will be deleted after you restore
factory configurations.
By default, the system reserves the previous configuration file when restoring the
factory configuration.
Step 3 (Optional) Run factory-configuration reset
The device is configured to restore the factory configuration after it restarts.
Step 4 Run system-view
The system view is displayed.
Step 5 (Optional) Run factory-configuration prohibit
The command disables the function that restores the factory configurations of a
device by holding down RESET.
If you want to restore the factory configurations of a device by holding down
RESET, run the undo factory-configuration prohibit command to enable this
function.
NOTE
----End
NOTE
After downloading the system startup files from the server to the device, you can check
whether the system startup files are damaged during the download process, for example,
whether the files are 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
system software files, run the display system { file-md5 | file-sha256 } filename command
on the device to calculate the MD5 or SHA256 value of the downloaded system software
files, and compare the two values calculated on the server and device. If the two values are
the same, the system startup files are not damaged. If the two values are different, the
system startup files are damaged, and you need to download the files again.
Context
Before specifying the files for next startup, you can run the display startup
command to view the specified files for next startup.
● If no system software is specified for next startup, the device will start with
current system software. To change the system software to be loaded for next
startup (during an upgrade for example), upload the new system software to
the device and specify it as the system file for next startup. The system
software package must use .cc as the file name extension and be saved to the
root directory of the storage device. If the device has double SRUs, make sure
that the system software is saved in the master SRU. When the system
software is specified for the slave SRU, the device automatically copies the
system software to the slave SRU.
● If no configuration file is specified for next startup, the device will start with
the default configuration file (vrpcfg.zip for example). If no configuration file
is stored in the default directory, the device uses the default parameters for
initialization. The configuration file name extension must be .cfg or .zip. In
addition, the configuration file must be saved to the root directory of the
storage device.
● A patch file uses .pat as the file name extension. The specified patch file to be
loaded for next startup must also be saved to the root directory of the storage
device. If the device has double SRUs, make sure that the patch file is saved in
the master SRU. When the patch file is specified for the slave SRU, the device
automatically copies the patch file to the slave SRU.
NOTE
Procedure
● Run startup system-software filename [ verify | signature sign-filename ]
NOTE
You cannot start the system software package in the system using an external hard disk.
If the device has dual SRUs, run the startup system-software filename
[ slave-board | all ] command to specify the system software for the slave
SRU to load during the next startup.
NOTE
Specify the same system software for the master and slave SRUs.
Specify the verify parameter to check the validity of the system software. If
the verification fails, you cannot specify it as the system software to be
loaded for next startup. This avoids startup failures caused by invalid system
software.
Context
Use one of the following methods to restart the device:
● Restart the device immediately after configuration: The device restarts
immediately after the reboot command is run.
● Restart the device at scheduled time: The device can be restarted at a
specified time later. When the configuration is complete, you can configure
the device to restart at time when few services are running to minimize the
impact of device restart on services.
The device restarts with the specified startup software. If the specified startup
software is damaged, the device restarts with the backup startup software. If the
restart still fails, the device searches the valid startup software package on the
storage devices in the sequence "Flash memory-> SD card-> USB flash drive." If
more than one valid startup software package is discovered, the device starts with
the first discovered. When the device finds valid system software packages and
configuration files on the storage device, it selects a rollback version and restarts
with the selected version. If the device does not find valid system software and
configuration file, it repeats the preceding operations.
NOTE
NOTICE
● Do not restart the device unless necessary because device restart causes service
interruption in a short time.
● Save the current configuration so that it will take effect after the device
restarts.
Procedure
● Restart the device immediately.
In the user view, run the reboot [ fast ] command to restart the device.
– The fast parameter indicates quick restart of the device. The system does
not ask you whether to save the configuration file in fast startup.
● Restart the device at scheduled time.
In the user view, run the schedule reboot { at time | delay interval }
command to restart the device at scheduled time.
– at time specifies the specific time to restart the device.
– delay interval specifies the waiting time before restarting the device.
----End
Network
Configuration Roadmap
The configuration roadmap is as follows:
1. Save the configuration file.
2. Back up the configuration file through TFTP.
NOTICE
Configuration file backup through TFTP is simple, but there are security risks.
In scenarios with high security requirements, configuration file backup
through SFTP is recommended. The following describes the configuration file
backup process using TFTP as an example.
Procedure
Step 1 Save configurations to the config.cfg file.
<Huawei> save config.cfg
----End
Network
Configuration Roadmap
The configuration roadmap is as follows:
1. Recover the configuration file that is backed up on the PC through TFTP.
NOTICE
Configuration file recovery through TFTP is simple, but there are security risks.
In scenarios with high security requirements, configuration file recovery
through SFTP is recommended. The following describes how to recover the
configuration file that is backed up on a PC through TFTP.
Procedure
Step 1 Recover the configuration file that is backed up on the PC through TFTP.
1. Start the TFTP server program.
Start the TFTP server program on the PC. Set the path for transmitting the
configuration file, and the IP address and port number of the TFTP server.
2. Transfer the configuration file.
# Run the tftp command in the user view.
<Huawei> tftp 10.110.24.254 get backup.cfg config.cfg
Step 2 Specify the recovered configuration file for the next startup.
----End
GE1/0/0
10.1.1.1/24
Network
PC Router
Configuration Roadmap
The configuration roadmap is as follows:
1. Upload the new system software to the root directory of the device.
2. Save the current configuration so that it remains active after upgrade.
3. Specify the system software for next startup.
4. Specify the configuration file for next startup of the device.
5. Restart the device to complete upgrade.
Procedure
Step 1 Upload the new system software to the root directory of the device.
Before configuration, run the display startup command to view the files for next
startup.
<Huawei> system-view
[Huawei] sysname Router
[Router] quit
<Router> display startup
MainBoard:
Startup system software: sd1:/basicsoft.cc
Next startup system software: sd1:/basicsoft.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
# Upload the new system software to the device. This example uses FTP to
transfer the system software. Configure the device as an FTP server and upload
the system software to the device from the FTP client. Make sure there is enough
space in the storage device before uploading files. If the space is insufficient,
delete unnecessary files to free up space in the storage device.
<Router> system-view
[Router] ftp server enable
[Router] aaa
[Router-aaa] local-user huawei password irreversible-cipher Helloworld@6789
[Router-aaa] local-user huawei service-type ftp
[Router-aaa] local-user huawei ftp-directory sd1:
[Router-aaa] local-user huawei privilege level 15
[Router-aaa] quit
[Router] quit
# Run the ftp 10.1.1.1 command in the command line window of the PC to set up
an FTP connection with the device. Run the put command to upload new system
software newbasicsoft.cc. After the upload completes, run the dir command to
check the system software.
<Router> dir
Directory of sd1:/
NOTE
In step 1, you can run the display startup command to check the configuration file for next
startup. The message "Next startup saved-configuration file: sd1:/vrpcfg.zip" will be
displayed. This means the vrpcfg.zip configuration file has been specified for next startup,
so you do not need to perform this step. To specify another file for next startup, perform
this step.
----End
Configuration File
#
aaa
local-user huawei password irreversible-cipher %^%#,))E=[pEbYRK$p4\_no/Mjz3#bSXH4+'!So.E/(xr}|+jz6M
%^%#
local-user huawei privilege level 15
local-user huawei ftp-directory sd1:
local-user huawei service-type ftp
#
interface GigabitEthernet1/0/0
ip address 10.1.1.1 255.255.255.0
#
ftp server enable
#
return
13 BootROM Menu
NOTE
● Restore or upgrade the system when the system stops responding and the
command line interface (CLI) cannot be displayed.
● Back up the configuration file to prevent configuration loss.
● Change the password for accessing the BootROM menu, preventing
unauthorized users from accessing the BootROM menu.
● Access this menu to log in to the device using the console port without
entering the password when you forget the password.
Licensing Requirements
BootROM menu introduction is a basic feature of a router and is not under license
control.
Feature Limitations
In a dual-MPU scenario, when the console port password is cleared using the
BootROM, the console port password needs to be cleared once on the two MPUs.
For details about how to log in to the device using the console port, see 9.4.4 Logging In
to a Device Through the Console Port. To use third-party terminal emulation software, set
the communication parameters correctly. If the parameter settings are incorrect, the third-
party software may enter excess characters, leading to abnormal BIOS menu functions.
Restart the device. Press Ctrl+B in 3 seconds to enter the BootROM main menu
when the following message is displayed.
Press Ctrl+B to break auto startup ... 3
Enter Password:******
Main Menu
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
NOTE
Press Ctrl+B to break auto startup Press Ctrl+B in 3 seconds to access the
BootROM menu.
You can access the BootROM menu for
debugging after failing to access the CLI
on the device.
To set the startup waiting time, select 5.
Set Startup Waiting Time in 4. Startup
Select. The default time is 3 seconds.
Item Description
Item Description
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
Serial Menu
1. Update Bootrom
2. Update CPLD Chip 0
3. Modify baud rate
0. Return
The AR161&AR161W&AR161G-L&AR161G-Lc&AR161EW&AR161EW-
M1&AR169&AR169W&AR169G-L&AR169EGW-L&AR169-P-M9&AR169W-P-
M9&AR169RW-P-M9&AR120&AR100 series routers do not support the submenus
Update Bootrom and Update CPLD Chip 0.
Item Description
2. Update CPLD Chip 0 Update the CPLD through the serial interface.
Item Description
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
1. Display parameter
2. Modify parameter
3. Save parameter
4. Download file
5. Upload file
0. Return
Item Description
1. Display parameter
2. Modify parameter
3. Save parameter
4. Download file
5. Upload file
0. Return
Net type :0
File name : cfg.zip
Ethernet ip address : 192.168.1.3
Ethernet ip mask : ffffff00
Gateway ip address :
Ftp host ip address : 192.168.1.11
Ftp user : huawei
● Start the TFTP or FTP software on the PC. (For details, see help document
about the third-party software.)
NOTE
Use this menu to set network interface parameters in FTP or TFTP mode. The PC must
function as the FTP or TFTP server. Ensure that the PC is directly connected to the
management interface of the device and can communicate on the same network
segment.
● Set network interface parameters.
The parameter values can contain only letters, numerals, underlines, and dots.
Spaces are not allowed.
– Net type: FTP client or TFTP client. By default, the device functions as the
FTP client.
– File name: Name of the file to be transferred.
– Ethernet ip address: IP address of the management interface on the
device. By default, the IP address of the management interface is
192.168.1.20.
– Ethernet ip mask: Subnet mask.
– Gateway ip address: Gateway IP address.
– Ftp host ip address: TFTP or FTP server IP address.
– Ftp user: Name of the user who connects to the FTP server.
– Ftp password: Password for accessing the FTP server.
NOTE
When the device transfers files using TFTP, the Ftp user and Ftp password parameters
is not required. You only need to press Enter.
If the device and server belong to different network segments, the Gateway ip
address parameter must be set. If the device and server belong to the same network
segment, the Gateway ip address parameter is not required.
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
1. Display Startup
2. Set Boot File
3. Set Config File
4. Startupfile Check Manage
2. Set Boot File Specify the system software for next startup.
Before upgrading or degrading the system,
specify the system software for the next startup
using this menu.
3. Set Config File Specify the configuration file for the next
startup.
Before upgrading or degrading the system,
specify the configuration file for the next startup
using this menu.
1. Display Startup
2. Set Boot File
3. Set Config File
4. Startupfile Check Manage
5. Set Startup Waiting Time
0. return
Displays files used in the current and last startup, such as the system software and
configuration file.
1. Display Startup
2. Set Boot File
3. Set Config File
4. Startupfile Check Manage
5. Set Startup Waiting Time
0. return
1. Flash
2. SDCard[1]
0. Return
Startup Select
1. Display Startup
2. Set Boot File
3. Set Config File
4. Startupfile Check Manage
5. Set Startup Waiting Time
0. return
1. flash
0. Return
0. Flash
1. Display Startup
2. Set Boot File
3. Set Config File
4. Startupfile Check Manage
5. Set Startup Waiting Time
0. return
1. Flash
2. SDCard[1]
0. Return
To specify the configuration file for startup based on users' requirements, use this
menu.
Select the serial number of the storage device where the configuration file locates.
The storage device can be the flash memory, micro SD card, or USB disk.
To view or modify startup file check configurations, manages startup file check
using this menu.
Startup Select
1. Display Startup
2. Set Boot File
3. Set Config File
4. Startupfile Check Manage
5. Set Startup Waiting Time
0. return
1. Set FileCheck Flag Set the check flag for the system software. The
check flag is used for performing the system
software check.
2. Clear FileCheck Flag Cancel the check flag for the system software.
3. Query FileCheck Flag Check whether the check flag for the system
software is set.
4. Set SignatureCheck Set the check flag for the digital signature file of the
Flag system software. The check flag is used for
performing the validity check for the digital
signature file of the system software.
5. Clear SignatureCheck Cancel the check flag for the digital signature file of
Flag the system software.
6. Query SignatureCheck Check whether the check flag for the digital
Flag signature file of the system software is set.
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
● Access the main menu and select 1 to access the flash file system menu.
File Menu
NOTE
The Check Flash file system item is added to the menu only for the
AR150&AR160&AR200&AR2200 series.
● Access the main menu and select 2 to access the SD card file system menu.
File Menu
NOTICE
After the storage device is formatted, all data including historical system
software and configuration files are lost. Therefore, use this menu with
caution.
Format success!
– Select 5 to access the Check SDCard[1] menu.
Enter your choice(0-5):5
Check SD Card[1] file system. Please wait....
sd1:/ - Volume is OK
1. List file in flash/SDCard[1] Display all files in the flash memory or the micro
SD card.
2. Delete file in flash/ Delete files in the flash memory or the micro SD
SDCard[1] card.
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
PassWord Menu
To prevent unauthorized users from accessing the BootROM main menu, select
Modify the menu password to change the password for access the BootROM
main menu.
When you forget the password for login using the console interface, select Clear
the console login password to clear the login password.
Figure 13-1 Networking for login through BootROM when the console login
password is forgotten
Console
PC RouterA
When performing operations, ensure that users on the serial port are kept online.
2. Restart RouterA. Press Ctrl+B to enter the BootROM menu when the
following information is displayed:
BIOS Creation Date : Nov 10 2011, 14:41:12
DDR DRAM init : OK
Start Memory Test ? ('t' or 'T' is test):skip
Copying Data : Done
Uncompressing : Done
USB2 Host Stack Initialized.
USB Hub Driver Initialized
USBD Wind River Systems, Inc. 562 Initialized
Octeon Host Controller Initialize......Done.
NOTE
After pressing Ctrl+B, you need to enter the password to enter the BootROM menu.
The default username and password are available in AR Router Default Usernames
and Passwords (Enterprise Network or Carrier). If you have not obtained the access
permission of the document, see Help on the website to find out how to obtain it.
3. Select choice 7 to enter the Password Manager menu.
Main Menu
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
PassWord Menu
Configuring the authentication mode and password for the console user interface is
necessary; otherwise, after the device is restarted, users still need to be authenticated
using the original password when they log in to the device through the console port.
Main Menu
1. Default Startup
2. Serial Menu
3. Network Menu
4. Startup Select
5. File Manager
6. Reboot
7. Password Manager
The BootLoader menu on the AR3600 provides system software upgrade and
console port password deletion. When the AR3600 becomes faulty and the
command line interface cannot be accessed, you can use the BootLoader menu to
restore the device status.
● When the system breaks down and the command line interface cannot be
accessed, use the BootLoader menu to restore or upgrade the system.
Licensing Requirements
The BootLoader menu is a basic feature of a router and is not under license
control.
Feature Limitations
None
For details on how to connect the console port to the device, see 9.4.4 Logging In to a
Device Through the Console Port. If third-party terminal simulation software is used, set
communication parameters. If parameter settings are incorrect, the third-party software
may input additional characters when you perform operations through the BIOS menu. As a
result, some operations may fail to be performed.
Restart the device. When the system displays the following information, press Ctrl
+B within 3s to access the BootLoader menu.
Press Ctrl+B to break auto startup ... 3
Enter Password:******
BootLoader Menu
1. Default Startup
2. Serial SubMenu
3. Ethernet SubMenu
4. Modify Startup Parameters
5. File System
6. Password Manager
7. Reboot
The AR3600 supports the flash memory and USB flash drive.
Item Description
Press Ctrl+B to break auto startup Press Ctrl+B within 3s to access the
BootLoader menu.
Generally, when the command line
interface cannot be accessed, access the
BootLoader menu to debug the device.
Item Description
1. Default Startup
2. Serial SubMenu
3. Ethernet SubMenu
4. Modify Startup Parameters
5. File System
6. Password Manager
7. Reboot
Serial SubMenu
Item Description
1. Default Startup
2. Serial SubMenu
3. Ethernet SubMenu
4. Modify Startup Parameters
5. File System
6. Password Manager
7. Reboot
1. Update CPLD
2. Update Software
3. Display Parameters
4. Modify Parameters
5. Save Parameters
0. Return
Item Description
Item Description
1. Update CPLD
2. Update Software
3. Display Parameters
4. Modify Parameters
5. Save Parameters
0. Return
Ftp type :0
File name : ar3600.cc
Ethernet ip address : 192.168.1.3
Ethernet ip mask : 255.255.255.0
Host ip address : 192.168.1.11
Ftp user : huawei
Ftp password : **********
You can use FTP or TFTP to set network parameters through this menu. The PC must
function as the FTP or TFTP server and connects to the management port of the
device, and the PC must be on the same network segment as the device.
● Set network parameters.
The parameter values can contain only letters, numerals, underscores, and
dots. Blanks are not allowed.
– Ftp type: Configure the device as the FTP or TFTP client. By default, the
device functions as the FTP client.
If the device uses TFTP to transfer files, press Enter. You do not need to set Ftp user
and Ftp password.
1. Default Startup
2. Serial SubMenu
3. Ethernet SubMenu
4. Modify Startup Parameters
5. File System
6. Password Manager
7. Reboot
Item Description
1. Display Current View the system software and configuration file for
Startup Configuration current and next startup.
Before system upgrade or downgrade, access this
menu to check whether the system software and
configuration file are correct.
Item Description
You can access this menu to view the system software and configuration file for
current and next startup.
1. Flash
2. USB[0]
0. Return
Before system upgrade or downgrade, access this menu to specify system software
for next startup.
Select the flash memory or USB flash drive where the system software is stored.
You can select the serial number.
If the check flag for the digital signature file of the system software is set based
on 14.6.4 Startupfile Check Manage, the procedure for specifying the startup
system software is as follows:
Modify Startup Parameters
1. Flash
2. USB[0]
0. Return
1. Flash
2. USB[0]
0. Return
To check or modify the system software check configuration, access this menu to
manage the system software check.
Select 1. Set SignatureCheck Flag to set the check flag for the digital signature
file of the system software. The check flag is used for performing the validity
check for the digital signature file of the system software. Select 2. Clear
SignatureCheck Flag to cancel the check flag for the digital signature file of the
system software. Select 3. Query SignatureCheck Flag to check whether the
check flag for the digital signature file of the system software is set.
1. Default Startup
2. Serial SubMenu
3. Ethernet SubMenu
4. Modify Startup Parameters
5. File System
6. Password Manager
7. Reboot
Select 1 to access the Flash file system submenu. The flash file system is used as
an example, and the USB flash drive file system is similar.
File System
Format success!
grub.efi
download file : grub.efi
Downloading ....
file downloading is completed,writing file:[ flash:/grub.efi ]to file system .OK!
1. List file in flash/USB[0/1] View the file list in the flash memory or USB
flash drive.
2. Delete file in flash/USB[0/1] Delete files from the flash memory or USB
flash drive.
5. Format flash/USB[0/1] file Format the flash memory or USB flash drive.
system
6. Upload file to server Upload files from the flash memory or USB
flash drive to the server.
7. Download file from server Download files from the server to the flash
memory or USB flash drive.
1. Default Startup
2. Serial SubMenu
3. Ethernet SubMenu
4. Modify Startup Parameters
5. File System
6. Password Manager
7. Reboot
Password Manager
To prevent unauthorized users from accessing the BootLoader menu, access the
Modify bootloader Password menu to modify the password for accessing the
BootLoader menu.
When you fail to log in to the device because the console port password is
forgotten, access the Clear the console login password menu to delete the
console port password.
Networking Requirements
The console port of RouterA connects to the PC. When the console port password
is forgotten, you can log in to the device through the BootLoader.
PC RouterA
Procedure
Step 1 Log in to the router through the console port.
NOTE
When performing operations, ensure that users on the serial port are kept online.
Step 2 Restart RouterA. Press Ctrl+B to access the BootLoader menu when the following
information is displayed:
Bios Version : V100R001C00B013
Created date of Bios : Nov 12 2014 - 14:06:29
Memory Information:
Memory Size : 24GB
Memory Freq : DDR3-1333
Board Information:
Intel(R) Xeon(R) CPU E5-1428L v2 @ 2.20GHz
NumCores : 6
Cpu Freq : 2214 MHz
MicroCodeVers : 416
CacheSize : 32
Pci Initializing... ok
Usb Initializing... ok
?
Boot from Main Grub
bootloader start!...
Press Ctrl+B to break auto startup ... 3
NOTE
Enter the password to access the BootLoader menu. The default username and password
are available in AR Router Default Usernames and Passwords (Enterprise Network or
Carrier). If you have not obtained the access permission of the document, see Help on the
website to find out how to obtain it.
1. Default Startup
2. Serial SubMenu
3. Ethernet SubMenu
4. Modify Startup Parameters
5. File System
6. Password Manager
7. Reboot
Step 4 Select 2 to access the Clear the console login password menu.
Password Manager
Password Manager
Step 5 Select 1 to start the device. You will log in to the device after the start.
BootLoader Menu
1. Default Startup
2. Serial SubMenu
3. Ethernet SubMenu
4. Modify Startup Parameters
5. File System
6. Password Manager
7. Reboot
----End
15 Android OS Management
This document describes how to use and upgrade the Android OS and how to
deploy applications in the Android OS.
NOTE
Licensing Requirements
Android OS management function is a basic feature of a router and is not under
license control.
Feature Limitations
Only the AR161FW-P-M5 supports the Android OS.
Prerequisites
The mouse, keyboard, and display have been prepared.
Procedure
Step 1 Connect a mouse and a keyboard to the USB (Host) ports of the router.
NOTE
The AR161FW-P-M5 supports Bluetooth connections. You can connect the mouse and
keyboard using Bluetooth.
Step 2 Connect the router to the display screen through a video cable. The router login
page is displayed on the screen, as shown in Figure 15-1.
Step 3 Enter the initial password. You successfully log in to the router, as shown in Figure
15-2. The default username and password are available in AR Router Default
Usernames and Passwords (Enterprise Network or Carrier). If you have not
obtained the access permission of the document, see Help on the website to find
out how to obtain it.
Use the keyboard and mouse to view and set menus on the APPS page of the router.
● You can right-click on the main interface to return to the upper-level menu.
● You can also press ESC to return to the upper-level menu.
Step 5 Configure the security settings of the router, as shown in Figure 15-4.
● Choose Settings > Security > Change password to change the login
password.
NOTE
----End
APP Type
Table 15-1 describes the types of APPs on a router.
Preparation
Deploy an APP server
Figure 15-5 Networking diagram for installing and deploying an APP server
Internet
APP server
Router
192.168.1.1/24
Edit the APP detection file on the APP server and set APP information. The format
of the APP detection file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<list>
<apk>
<name>com.busap.busapbackground</name>
<version>1.0</version>
<target>ARMaster</target>
<status>install</status>
<url>http://192.168.1.1/appmanager/apk/BusapBackground.apk</url>
<startinfo>com.busap.busapbackground,com.busap.busapbackground.MainActivity</startinfo>
</apk>
</list>
Field Description
Field Description
Precautions
● If the router powers off or the network is disconnected during the remote APP
download, the download process is interrupted. After the router is powered on
or the network connection is recovered, the router redownloads the APP and
overwrites the downloaded content.
● Before deploying an APP, ensure that the router has a reachable route to the
APP server.
● Before deploying the APP, log in to the Android OS of the router. For the login
procedure, see 15.2 Logging In to and Operating the Android OS.
Perform this step when you want to immediately download, install, upgrade, or
uninstall third-party APPs.
2. Download, install, upgrade, and uninstall a third-party APP.
– Download and installation
The router reads the APP detection file. When detecting that an APP with
the operation type of install does not exist, the router automatically
downloads the APP from the APP server and installs the APP in the
internal storage.
– Upgrade and installation
The router reads the APP detection file. When detecting that an APP with
the operation type of install has a different version from the local APP
version, the router automatically downloads the APP of the latest version
from the APP server and installs the APP in the internal storage.
– Uninstallation
The router reads the APP detection file. When detecting that an APP with
the operation type of uninstall exists, the router automatically uninstalls
the APP from the internal storage.
3. After the preceding operations are complete, search for the installed APP by
choosing All Applications > Installed Applications, and check whether the
router operates the APP according to the configuration in the APP detection
file.
▪ SanDisk: CZ50 (8 GB, 16 GB), CZ36 (8 GB, 16 GB), CZ43 (16 GB)
▪ TOSHIBA: UHYBS-016GH/008GH
● once.cfg: indicates the one-time upgrade. That is, the system is upgraded only
for once in the period when the USB flash drive is installed. This file is
recommended for the system upgrade.
NOTE
Copy files
Create the dload folder in the root directory of the USB flash drive, and copy the
files update.zip and once.cfg, or update.zip and unlmt.cfg to the dload folder.
NOTE
● Do not power off the router when the router is copying files. Otherwise, the upgrade fails or
the router cannot start.
● Do not remove the USB flash drive before the upgrade is complete. Otherwise, data in the
USB flash drive may be damaged.
Process
Install the USB flash drive and start the upgrade.
● One-time upgrade: After the USB flash drive is installed, the router checks
whether the sizes of the update.zip files in use and in the USB flash drive are
the same. If not, the router performs the upgrade. When the upgrade
succeeds, the router automatically restarts and runs the upgrade update.zip
file. In this case, the update.zip files in use and in the flash drive have the
same size. The router does not perform an upgrade if restarted.
● Unlimited upgrade: After the USB flash drive is installed, the router
automatically restarts and performs the upgrade without comparing the sizes
of the update.zip files in use and in the USB flash drive. When the upgrade
succeeds, the upgrade success message is displayed on the screen connected
to the router. The router does not restart or upgrade. After the USB flash drive
is removed, the router restarts. The upgrade is complete.
Internet
Files to be loaded
Files to be loaded for the upgrade include the upgrade file of the Android OS, with
the file name extension .zip. The name of the upgrade file is update.zip.
NOTE
Field Description
Store the upgrade file in the specified directory on the upgrade server, which must
be consistent with the directory specified by the <url></url> field in the upgrade
detection file. In this example, the upgrade file is stored in the /appmanager/apk
directory of the root directory on the upgrade server.
Precautions
● If the router powers off or the network is disconnected during the upgrade
file download, the download process is interrupted. After the router is
powered on or the network connection is recovered, the router continues to
download the upgrade file but does not redownload the upgrade file. If the
upgrade file after the power-off changes, the new upgrade file overrides the
downloaded one.
● Before performing an upgrade, ensure that the router has a reachable route
to the upgrade server.
● Before performing an upgrade, log in to the Android OS of the router. For the
login procedure, see 15.2 Logging In to and Operating the Android OS.
Process
The upgrade process is as follows:
NOTE
Perform this step when you want to immediately upgrade the Android OS and system
software.
2. Upgrade the system.
Store the upgrade file to the upgrade directory and set the upgrade flag.
Upon the next startup, the router performs the upgrade when detecting the
upgrade flag.
Pre-configuration Tasks
The device provides a USB 2.0 interface. Before configuring USB-based deployment
in the Android operating system (OS), prepare the following hardware
environment:
▪ Toshiba: UHYBS-016GH/008GH
Context
The device supports USB-based deployment using the Android OS software and
configuration file.
● If only the Android OS software is used, the deployment files are update.zip
and once.cfg, or update.zip and unlmt.cfg.
● If only the configuration file is used, the deployment files are osp_settings.db
and once.cfg, osp_settings.db and unlmt.cfg, osp_settings.zip and once.cfg,
or osp_settings.zip and unlmt.cfg.
NOTE
NOTE
The files once.cfg and unlmt.cfg are empty text files used for one-time upgrade and
unlimited upgrade respectively. The two files are mutually exclusive.
The file osp_settings.db can only be used for the first USB-based deployment when the
device does not have a compression password for USB-based deployment (no compression
password is configured when the device is delivered). If the file osp_settings.zip is used for
USB-based deployment, the device must have the compression password for USB-based
deployment. For details about how to set the password, see 15.5.4 Setting the Password
of the Compressed Configuration File for USB-based Deployment. The files
osp_settings.db and osp_settings.zip are mutually exclusive.
Configuration Process
If only the Android OS software is used, see 15.5.1 USB-based Deployment Using
Only the Android OS Software for the deployment process. If only the
configuration file is used, see 15.5.2 USB-based Deployment Using Only the
Configuration File for the deployment process. If both the Android OS software
and configuration file are used, see 15.5.3 USB-based Deployment Using the
Android OS Software and Configuration File for the deployment process.
● once.cfg: indicates the one-time upgrade. If this file is loaded, the device with
the USB flash drive installed is upgraded only once. After the upgrade
succeeds, the device will not be upgraded again.
NOTE
Copying Files
Create the folder dload in the root directory of the USB flash drive, and copy the
files update.zip and once.cfg, or update.zip and unlmt.cfg to the folder dload.
Upgrade Process
After the Android OS runs properly and you log in the system, install the USB flash
drive and start the upgrade.
NOTE
● Do not power off the device when the device is copying files. Otherwise, the upgrade
may fail or the device cannot start.
● Do not remove the USB flash drive before the upgrade is complete. Otherwise, data in
the USB flash drive may be damaged.
● Do not install multiple USB flash drives simultaneously for USB-based deployment.
● One-time upgrade: After the USB flash drive is installed, the device checks
whether the sizes (byte-level precision) of the file update.zip in use and that
in the USB flash drive are the same. If not, the device performs the upgrade.
After the upgrade succeeds, the device automatically restarts and runs the
upgrade file update.zip. In this case, the file update.zip in use and that in the
USB flash drive have the same size. The device will not perform an upgrade if
it restarts.
● Unlimited upgrade: After the USB flash drive is installed, the device
automatically restarts and performs the upgrade without comparing the sizes
of the file update.zip in use and that in the USB flash drive. After the upgrade
succeeds, an upgrade success message is displayed on the screen connected to
the device. The device does not restart or keep upgrading. After the USB flash
drive is removed, the device restarts, and the upgrade is complete.
Preparation
Files to Be Loaded
The file osp_settings.db can only be used for the first USB-based deployment when the
device does not have a compression password for USB-based deployment (no compression
password is configured when the device is delivered). The file osp_settings.zip is an
encrypted and compressed configuration file. If the file osp_settings.zip is used for USB-
based deployment, the device must have the compression password for USB-based
deployment. The files osp_settings.db and osp_settings.zip are mutually exclusive.
Currently, the device supports only the following two encryption modes:
● Simple text encryption: For example, when you compress a .db 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 .db 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 mode is
recommended because it is more secure.
To improve security, you are advised to encrypt the configuration file to be loaded. The
encryption password of the configuration file must be the same as the password of the
compressed configuration file for USB-based deployment on the device. For details about
how to configure the password of the compressed configuration file, see 15.5.4 Setting the
Password of the Compressed Configuration File for USB-based Deployment.
The files once.cfg and unlmt.cfg are two empty text files created by users. The two files
are mutually exclusive.
Copying Files
Create the folder dload in the root directory of the USB flash drive, and copy the
files osp_settings.db and once.cfg, osp_settings.db and unlmt.cfg,
osp_settings.zip and once.cfg, or osp_settings.zip and unlmt.cfg to the folder.
NOTE
● Do not power off the device when the device is copying files. Otherwise, the USB-based
deployment may fail or the device cannot start.
● Do not remove the USB flash drive before the device restarts. Otherwise, data in the USB
flash drive may be damaged or the USB-based deployment may fail.
● Do not install multiple USB flash drives simultaneously for USB-based deployment.
● Configuration file: osp_settings.db
This file can only be used for the first USB-based deployment when the device
does not have the password of the compressed configuration file for USB-
based deployment. The deployment files can be osp_settings.db and
once.cfg, or osp_settings.db and unlmt.cfg.
The file osp_settings.db needs to carry the password of the compressed
configuration file for the second USB-based deployment. The password is
used for decompressing the configuration file osp_settings.zip in future USB-
based deployments.
After the USB flash drive is installed, the device copies the configuration file
osp_settings.db. After the USB-based deployment is complete, the device
automatically restarts. After the device restarts and displays the Android OS
login page, remove the USB flash drive.
● Configuration file: osp_settings.zip
This file applies to USB-based deployment scenarios where the device has the
password of the compressed configuration file.
– One-time USB-based deployment using the deployment files
osp_settings.zip and once.cfg
After the USB flash drive is installed, the device checks whether the
timestamp on the device is the same as that in the configuration file
osp_settings.zip. If not, the device decompresses and loads the
configuration file osp_settings.zip. After the device restarts and displays
the Android OS login page, remove the USB flash drive.
– Unlimited USB-based deployment using the deployment files
osp_settings.zip and unlmt.cfg
After the USB flash drive is installed, the device decompresses the
configuration file osp_settings.zip and automatically restarts. After the
device restarts and displays the Android OS login page, remove the USB
flash drive.
The file osp_settings.db can only be used for the first USB-based deployment when the
device does not have a compression password for USB-based deployment (no compression
password is configured when the device is delivered). The file osp_settings.zip is an
encrypted and compressed configuration file. If the file osp_settings.zip is used for USB-
based deployment, the device must have the compression password for USB-based
deployment. The files osp_settings.db and osp_settings.zip are mutually exclusive.
Currently, the device supports only the following two encryption modes:
● Simple text encryption: For example, when you compress a .db 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 .db 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 mode is
recommended because it is more secure.
To improve security, you are advised to encrypt the configuration file to be loaded. The
encryption password of the configuration file must be the same as the password of the
compressed configuration file for USB-based deployment on the device. For details about
how to configure the password of the compressed configuration file, see 15.5.4 Setting the
Password of the Compressed Configuration File for USB-based Deployment.
The files once.cfg and unlmt.cfg are two empty text files created by users. The two files
are mutually exclusive.
Copying Files
Create the folder dload in the root directory of the USB flash drive, and copy one
of the following deployment file combinations to the folder:
● update.zip, osp_settings.db, and once.cfg
● update.zip, osp_settings.db, and unlmt.cfg
● update.zip, osp_settings.zip, and once.cfg
● update.zip, osp_settings.zip, and unlmt.cfg
NOTE
● Do not power off the device when the device is copying files. Otherwise, the USB-based
deployment may fail or the device cannot start.
● Do not remove the USB flash drive before the USB-based deployment is complete.
Otherwise, data in the USB flash drive may be damaged or the USB-based deployment
may fail.
● Do not install multiple USB flash drives simultaneously for USB-based deployment.
Context
If the configuration file osp_settings.zip is used for USB-based deployment, the
password for the configuration file osp_settings.zip must be the same as the
password of the compressed configuration file for USB-based deployment in the
Android OS on the device; otherwise, the USB-based deployment fails. In the first
USB-based deployment, if the device does not contain the password of the
compressed configuration file for USB-based deployment in the Android OS or the
password is forgotten, you need to perform the following operations to set the
password.
Procedure
Step 1 Choose Settings > Security. The Security page is displayed, as shown in Figure
15-7.
Step 2 Click Set password for compression profiles. In the dialog box that is displayed,
enter the Android OS login password and the password of the compressed
configuration file for USB-based deployment in the Android OS, and click OK, as
shown in Figure 15-8.
Figure 15-8 Setting the password of the compressed configuration file for USB-
based deployment
----End
Procedure
Step 1 Choose Settings > Display. The PERSONALIZED page is displayed, as shown in
Figure 15-9.
Step 2 Click Screen Orientation Landscape. The Landscape settings dialog box is
displayed. Click OK to configure the screen rotation function. The function takes
effect after the device restarts.
----End
Procedure
Step 1 Choose Settings > Display. The PERSONALIZED page is displayed, as shown in
Figure 15-10.
Step 2 Click HDMI setting. Select the screen resolution in the HDMI settings dialog box
that is displayed, as shown in Figure 15-11.
Step 3 After the screen resolution is selected, the system displays a dialog box. Click ok.
The device restarts immediately. The configured screen resolution takes effect
after the device restarts. If you click cancel or do not click ok within 10 seconds,
the system restores the original screen resolution.
----End
Context
The Display settings dialog box provides three options: Lock aspect ratio, Stretch
to full screen, and Manual.
● Lock aspect ratio: A page is displayed in the normal aspect ratio. Most
televisions use this mode.
● Stretch to full screen: This mode applies to displays. A page is displayed in
full screen mode. If the page is not displayed in full screen mode or cannot be
displayed clearly, select this mode to adjust the display effect.
● Manual: You can manually adjust the display effect based on the display or
television.
Configure display settings based on the actual situation.
Procedure
Step 1 Choose Settings > Display. The PERSONALIZED page is displayed, as shown in
Figure 15-12.
Step 2 Click Display settings. Set the display in the Display settings dialog box that is
displayed.
● If you select Lock aspect ratio or Stretch to full screen, the configuration
takes effect immediately.
● If you select Manual, go to Step 3.
Step 3 Click Manual. The Screen resize dialog box is displayed. Set the width and height
based on actual display requirements, and click OK, as shown in Figure 15-14. The
configuration takes effect.
----End