0% found this document useful (0 votes)
22 views40 pages

01 02 Auto Config Configuration

Uploaded by

Andrei Stelmach
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views40 pages

01 02 Auto Config Configuration

Uploaded by

Andrei Stelmach
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Huawei AR Series Access Routers

CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

2 Auto-Config Configuration

About This Chapter

Auto-Config enables a device to automatically load version files including system


software, patch files and configuration files. This simplifies configuration. Devices
can be managed in a centralized manner and debugged remotely.

2.1 Overview of Auto-Config


This section describes definition of Auto-Config and purpose of this feature.
2.2 Understanding Auto-Config
This section describes implementation of Auto-Config.
2.3 Application Scenarios for Auto-Config
This section describes application scenarios for the Auto-Config feature.
2.4 Licensing Requirements and Limitations for Auto-Config
This section provides prerequisites for configuring Auto-Config, interfaces that
support Auto-Config, and configuration notes.
2.5 Default Settings for Auto-Config
This section provides the default settings for Auto-Config.
2.6 Configuring Auto-Config on Devices that are on the Same Network Segment
with the DHCP Server
The device to be configured that is on the same network segment as the DHCP
server can be configured with Auto-Config to automatically load the system
software, patch file, and configuration file, realizing remote device deployment.
2.7 Configuring Auto-Config Across Different Network Segments
The device that is on a different network segment than the DHCP server can have
Auto-Config configured to automatically load the system software, patch file, and
configuration file for remote device deployment.
2.8 Maintaining Auto-Config
You can monitor the running status of Auto-Config in each phase to ensure that
Auto-Config runs normally.
2.9 Configuration Examples for Auto-Config

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 21


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

This section provides Auto-Config configuration examples including networking


requirements and configuration roadmap.

2.1 Overview of Auto-Config


This section describes definition of Auto-Config and purpose of this feature.

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.

2.2 Understanding Auto-Config


This section describes implementation of Auto-Config.

2.2.1 Auto-Config Fundamentals


In Figure 2-1, Auto-Config runs on Router A, Router B, Router C, and Router D.
These devices function as DHCP clients and periodically send DHCP Request
packets to the DHCP server to obtain configuration. The DHCP server responds
with DHCP Reply packets that contain information about IP addresses assigned to
devices to be configured, the IP address of the file server, the file server login
method, and configuration of version files (the configuration of version files can
be obtained through the intermediate file. The intermediate file must be
configured in advance and saved on the file server). After receiving the DHCP
Reply packets, devices obtain version files from the file server and automatically
load version files after restarting.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 22


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Figure 2-1 Auto-Config networking diagram

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.

2.2.2 Working Process of Auto-Config


Figure 2-2 shows the Auto-Config working process.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 23


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Figure 2-2 Basic process of Auto-Config


Auto-Config starts

Parse the Option field


Periodically send DHCP
in DHCP Reply packets
Request packets

Whether No
receives DHCP
Reply packets

Yes

No
Whether Reply
packets are valid

Yes

Parse Option parameters

Whether Reply Yes


Auto-Config process is packets contain ACS Configure ACS
suspended Option information

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?

Yes Yes Yes

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

No No Start the timer and


Phase of restarting

Whether the device Whether the device configure the delay in


obtains the system obtains the patch file? restarting the device
software ?
the device

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

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 24


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

The Auto-Config process involves three phases:


● Parse the Option field in the DHCP Reply packet.
a. Obtain information about the IP address and configuration of the file
server.
i. The device automatically enables the DHCP client function on uplink
Ethernet interfaces in Up state and broadcasts DHCP Request packets
(the IP address pool, Option parameters, and gateway have been
configured on the DHCP server).
ii. The DHCP server sends DHCP Reply packets to the device. These
packets contain information about IP addresses of the device to be
configured and the FTP/TFTP/SFTP server, FTP/SFTP user name,
password, and default gateway.
NOTE

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

If the DHCP server assigns ACS configuration to devices that needs to be


configured, remote deployment of devices is realized through the Auto-
Configuration server (for details about Auto-Config implementation through
ACS, see CWMP) not the Auto-Config process. For details about CWMP, see
"CWMP" in Feature Description-Network Management.
ii. If the received DHCP Reply packet does not contain Option 67, the
intermediate file is required. Then the device downloads the
intermediate file from the FTP/TFTP/SFTP server and obtains
information about version files that need to be downloaded from the
intermediate file. The process of obtaining files is started. If the
received DHCP Reply packet contains Option 67, the process of
obtaining version files is started directly.
● Obtain version files.
a. (Optional) Download the system software.
i. Obtain the system software name and version ID from the
intermediate file or the DHCP server.
ii. Download system software from the file server and set the
downloaded file as the startup file for the next startup.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 25


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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.

2.2.3 Option Parameters


A DHCP server sends DHCP packets with the Option field carrying configuration
parameters to clients to implement the Auto-Config function.

Table 2-1 shows DHCP Option parameters used in Auto-Config.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 26


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Table 2-1 DHCP Option parameters


Option Description

Option 43 Configuration of the ACS server


assigned to DHCP clients.
● sub-option 1: information about
ACS URL. Format:
URL=URL_INFO;
Example:
URL=http://192.168.1.40:80/acs;

● sub-option 2: ACS user name and


password. Format:
username=USERNAME;password=PASSWORD;
Example:
username=user;password=huawei;

Option 67 Name of the configuration file


assigned to DHCP clients.
NOTE
The configuration file path can be
specified, The total length of the file path
and name cannot exceed 64 bytes. By
default, the file path is the server's root
directory.
For example, if the server's root directory is
flash:/, and the configuration file
vrpcfg.cfg is saved to the config folder in
the flash:/ directory, the file name with the
file path can be specified as config/
vrpcfg.cfg.

Option 141 FTP/SFTP user name assigned to DHCP


clients.

Option 142 FTP/SFTP password assigned to DHCP


clients.

Option 143 FTP server IP address assigned to


DHCP clients.

Option 145 Information about the non-


configuration file assigned to DHCP
clients, for example: information about
the system software, version ID and
patch file. Format:
vrpfile=VRPFILENAME;vrpver=VRPVERSION;patchfil
e=PATCHFILENAME;
Example:
vrpfile=auto_V200R010.cc;vrpver=V200R010;patchfi
le=auto_V200R010.pat;

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 27


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Option Description

Option 146 User-defined settings, including file


deletion policy used when memory
space is insufficient and delay in
activating the configuration file.
Format:
● opervalue = 0: indicates that no
system software will be deleted
from the file system when the
space is insufficient. opervalue=1:
indicates that system software will
be deleted from the file system
when the space is insufficient. By
default, no file will be deleted from
the file system when the space is
insufficient.
● delaytime: specifies the delay in
restarting a device after a
configuration file is downloaded to
the device, in seconds. By default,
the delay is 0 seconds.
NOTE
The maximum delay in restarting a device
is 1 day, namely, 86400 seconds. If the
configured delay exceeds 1 day, the delay
is calculated as 1 day.

Option 147 Authentication information used by


devices to be configured to
authenticate the DHCP server for
device deployment. Option 147 is
optional. If Option 147 is required, it
must be configured as AutoConfig.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 28


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Option Description

Option 148 Agile Controller-Branch's IP address


and port number assigned to DHCP
clients.
Option 148 is in the following format:
agilemode=AGILEMODE;agilemanage-
mode=AGILEMANAGE-MODE;agilemanage-
domain=AGILEMANAGE-DOMAIN;agilemanage-
port=AGILEMANAGE-PORT;

● agilemode: indicates the agile


mode. agilemode=tradition:
indicates the traditional mode.
● agilemanage-mode: indicates that
the agilemanage-domain field is an
IP address or a domain name.
agilemanage-mode=ip: indicates
that the agilemanage-domain field
is an IP address. agilemanage-
mode=domain: indicates that the
agilemanage-domain field is a
domain name.
● agilemanage-domain: indicates an
IP address in case of agilemanage-
mode=ip or indicates a domain
name in case of agilemanage-
mode=domain.
● agilemanage-port: indicates the
Agile Controller-Branch's port
number assigned to DHCP clients.
For example, in the Cloud VPN
scenario, if the Agile Controller-
Branch's IP address and port number
assigned to DHCP clients are
10.17.15.84 and 10020, Option 148 is
as follows:
agilemode=tradition;agilemanage-
mode=ip;agilemanage-
domain=10.17.15.84;agilemanage-port=10020;

Option 149 SFTP server IP address and port


number assigned to DHCP clients. For
example, if the SFTP server IP address
is 10.10.10.1 and port number is 22,
the Option 149 field is:
option 149 ascii ipaddr=10.10.10.1;port=22;

Option 150 TFTP server IP address assigned to


DHCP clients.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 29


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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.

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

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.

For example, if the MAC address of a device is 0018-82C5-AA89, the ESN is


9300070123456789, the version file name is auto_V200R010.cc, the version is
V200R010, the patch file is auto_V200R010.pat, the configuration file is
auto_V200R010.cfg, the intermediate file content is as follows:
MAC=0018-82C5-
AA89;vrpfile=auto_V200R010.cc;vrpver=V200R010;patchfile=auto_V200R010.pat;cfgfile=auto_V200R010.cfg;

NOTE

● The intermediate file name is arnet.ini.


● If multiple devices are configured, each row in the intermediate file records
configuration information about each device.
● When configuring the intermediate file, enter the MAC address and ESN, or either of
them. 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. The version number (vrpver) must be included in the system
software information (vrpfile).

2.3 Application Scenarios for Auto-Config


This section describes application scenarios for the Auto-Config feature.

Configuring Auto-Config on Devices that are on the Same Network Segment


with the DHCP Server
If a device with no configuration file is on the same network segment as the
DHCP server, you can configure Auto-Config based on the networking diagram as
shown in Figure 2-3. The configuration file (mandatory), system software

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 30


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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

Figure 2-3 Auto-Config networking on the same network segment

RouterA

RouterB DHCP server FTP/TFTP/SFTP server

RouterC

Configuring Auto-Config on Devices That are on Different Network


Segments than the DHCP Server
If a device with no configuration file is on a different network segment than the
DHCP server, you can configure Auto-Config based on the networking diagram as
shown in Figure 2-4. The configuration file (mandatory), system software
(optional), patch file (optional), and intermediate file (optional) are saved on the
FTP/TFTP/SFTP server. Routes between the FTP/TFTP/SFTP server, devices with no
configuration file (devices have obtained IP addresses), the DHCP relay agent, and
DHCP server are reachable. After software engineers configure the DHCP relay
agent, DHCP server and FTP/TFTP/SFTP server, devices can use Auto-Config to
obtain version files including the configuration file (mandatory), system software
(optional), and patch file (optional) from the FTP/TFTP/SFTP server and load
version files.
This configuration method applies to a large network where devices with no
configuration file are sparsely distributed. Devices on multiple network segments
share one DHCP server, reducing costs and facilitating centralized management.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 31


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Figure 2-4 Auto-Config networking across different network segments

RouterA

Enterprise
sever group
RouterB DHCP relay DHCP server

RouterC

FTP/TFTP/SFTP server

2.4 Licensing Requirements and Limitations for Auto-


Config
This section provides prerequisites for configuring Auto-Config, interfaces that
support Auto-Config, and configuration notes.

Involved Network Elements


None

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.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 32


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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

2.5 Default Settings for Auto-Config


This section provides the default settings for Auto-Config.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 33


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Table 2-2 Default settings for Auto-Config


Parameter Default Setting

Auto-Config function Enabled

2.6 Configuring Auto-Config on Devices that are on the


Same Network Segment with the DHCP Server
The device to be configured that is on the same network segment as the DHCP
server can be configured with Auto-Config to automatically load the system
software, patch file, and configuration file, realizing remote device deployment.

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.

2.6.1 Enabling Auto-Config


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

● This task is performed on the device with no startup configuration file.


● By default, Auto-Config is enabled. Therefore, Auto-Config does not need to be
performed on the new device.

Auto-Config can be disabled in the following way:

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 34


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

● 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

Check whether Auto-Config is enabled.

Step 2 Run system-view

The system view is displayed.

Step 3 Run autoconfig enable

Auto-Config is enabled.

----End

2.6.2 (Optional) Configuring the Intermediate File

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:

● Configure Option 67 on the DHCP server to obtain the configuration file is


used when fewer devices need to load the same configuration file.
● Use the intermediate file on the file server to obtain the configuration file is
used when many devices need to load different configuration files.

The intermediate file is saved on the FTP/TFTP/SFTP 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 FTP/TFTP/SFTP server, the device
downloads the intermediate file from the FTP/TFTP/SFTP server, searches for the
system software, system software version, patch file, and configuration file names
that match its own MAC address or ESN, and downloads files from the FTP/TFTP/
SFTP server based on the obtained names.

You can check the label on the device to obtain the MAC address and ESN.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 35


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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:

1. Create a file and name the file arnet.ini.


2. Configure the intermediate file. For example, if the MAC address of a device is
0018-82C5-AA89, the ESN is 9300070123456789, the version file name is
auto_V200R010.cc, the version is V200R010, the patch file is
auto_V200R010.pat, and the configuration file is auto_V200R010.cfg, the
contents of the intermediate file arnet.ini are as follows:
MAC=0018-82C5-
AA89;ESN=9300070123456789;vrpfile=auto_V200R010.cc;vrpver=V200R010;patchfile=auto_V200R010.p
at;cfgfile=auto_V200R010.cfg;

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.

2.6.3 Configuring the DHCP Server

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

● The DHCP server must be configured with Option parameters.


● A router is used as an example to describe the procedure for configuring the DHCP
server. When the router functions as the DHCP server, configure the DHCP server
according to DHCP Configuration. The following example describes the procedure for
configuring the DHCP server based on the global address pool.
● After the Auto-Config configuration is complete, delete Auto-Config configuration on
the DHCP server to prevent the configuration information from affecting other
configurations.

Procedure
Step 1 Run system-view

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 36


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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.
Step 5 Run dhcp select global
The interface is configured to use the global address pool.
Step 6 Run quit
Return to the system view.
Step 7 Run ip pool ip-pool-name
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.

Step 9 Run gateway-list ip-address &<1-8>


The egress gateway address for DHCP clients is specified.
Step 10 Run option code [ sub-option sub-code ] { ascii ascii-string | hex hex-string |
cipher cipher-string | ip-address ip-address &<1-8> }URL=URL_INFO;URL=http://
192.168.1.40:80/
acs;username=USERNAME;password=PASSWORD;vrpfile=VRPFILENAME;vrpver=VR
PVERSION;patchfile=PATCHFILENAME;Example:vrpfile=auto_V200R010.cc;vrpver=V
200R010;patchfile=auto_V200R010.pat;
Option parameters are configured for the DHCP server.

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.

If Option 67 is not configured, Auto-Config enables devices to load configuration


files using the intermediate file. For details about how to edit the intermediate
file, see "2.6.2 (Optional) Configuring the Intermediate File".

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 37


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Table 2-3 shows DHCP Option parameters used in Auto-Config.

Table 2-3 DHCP Option parameters


Option Description

Option 43 Information about the ACS server:


● sub-option 1: ACS URL. Format:
For example:
● sub-option 2: ACS user name and password.
Format:
NOTE
The router cannot function as the ACS server. For details
about ACS configurations, see corresponding manuals.

Option 67 Name of the configuration file assigned to DHCP


clients.

Option 141 FTP/SFTP user name assigned to DHCP clients.

Option 142 FTP/SFTP password assigned to DHCP clients.

Option 143 FTP server IP address assigned to DHCP clients.

Option 145 Information about the non-configuration file


assigned to DHCP clients, for example:
information about the system software, version
ID, and patch file. Format:
NOTE
● vrpver information must be included in the vrpfile
information.

Option 146 User-defined settings, including file deletion


policy used when memory space is insufficient
and delay in activating the configuration file.
Format:
● opervalue = 0: indicates that no system
software will be deleted from the file system
when the space is insufficient. opervalue=1:
indicates that system software will be deleted
from the file system when the space is
insufficient. By default, no file will be deleted
from the file system when the space is
insufficient.
● delaytime: specifies the delay in restarting a
device after a configuration file is downloaded
to the device, in seconds. By default, the delay
is 0 seconds.
NOTE
The maximum delay in restarting a device is 1 day,
namely, 86400 seconds. If the configured delay exceeds
1 day, the delay is calculated as 1 day.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 38


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Option Description

Option 147 Authentication information. Option 147 is


optional. If Option 147 is required, it must be
configured as AutoConfig.

Option 148 Agile Controller-Branch's IP address and port


number assigned to DHCP clients.
Option 148 is in the following format:
agilemode=AGILEMODE;agilemanage-mode=AGILEMANAGE-
MODE;agilemanage-domain=AGILEMANAGE-
DOMAIN;agilemanage-port=AGILEMANAGE-PORT;

● agilemode: indicates the agile mode.


agilemode=tradition: indicates the traditional
mode.
● agilemanage-mode: indicates that the
agilemanage-domain field is an IP address or a
domain name. agilemanage-mode=ip:
indicates that the agilemanage-domain field is
an IP address. agilemanage-mode=domain:
indicates that the agilemanage-domain field is
a domain name.
● agilemanage-domain: indicates an IP address
in case of agilemanage-mode=ip or indicates a
domain name in case of agilemanage-
mode=domain.
● agilemanage-port: indicates the Agile
Controller-Branch's port number assigned to
DHCP clients.
For example, in the Cloud VPN scenario, if the
Agile Controller-Branch's IP address and port
number assigned to DHCP clients are 10.17.15.84
and 10020, Option 148 is as follows:
agilemode=tradition;agilemanage-mode=ip;agilemanage-
domain=10.17.15.84;agilemanage-port=10020;

Option 149 SFTP server IP address and port number assigned


to DHCP clients. For example, if the SFTP server IP
address is 10.10.10.1 and port number is 22, the
Option 149 field is: option 149 ascii
ipaddr=10.10.10.1;port=22.

Option 150 TFTP server IP address assigned to DHCP clients.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 39


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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

2.6.4 Configuring the File Server

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.

Step 3 Run interface interface-type interface-number

The interface view is displayed.

Step 4 Run ip address ip-address { mask | mask-length }

The IP address of the SFTP server is configured.

----End

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 40


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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.

2.6.5 Powering on the Device to Start Auto-Config


After preceding configurations are complete, the device is powered on or
restarted. The Auto-Config process runs automatically.

2.6.6 Verifying the Configuration

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

2.7 Configuring Auto-Config Across Different Network


Segments
The device that is on a different network segment than the DHCP server can have
Auto-Config configured to automatically load the system software, patch file, and
configuration file for remote device deployment.

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.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 41


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

● Ensure that no startup configuration file exists on the device.

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.

2.7.1 Enabling Auto-Config

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

● This task is performed on the device with no startup configuration file.


● By default, Auto-Config is enabled. Therefore, Auto-Config does not need to be
performed on the new device.

Auto-Config can be disabled in the following way:


● 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

Check whether Auto-Config is enabled.

Step 2 Run system-view

The system view is displayed.

Step 3 Run autoconfig enable

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 42


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Auto-Config is enabled.

----End

2.7.2 (Optional) Configuring the Intermediate File

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:

● Configure Option 67 on the DHCP server to obtain the configuration file is


used when fewer devices need to load the same configuration file.
● Use the intermediate file on the file server to obtain the configuration file is
used when many devices need to load different configuration files.

The intermediate file is saved on the FTP/TFTP/SFTP 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 FTP/TFTP/SFTP server, the device
downloads the intermediate file from the FTP/TFTP/SFTP server, searches for the
system software, system software version, patch file, and configuration file names
that match its own MAC address or ESN, and downloads files from the FTP/TFTP/
SFTP server based on the obtained names.

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:

1. Create a file and name the file arnet.ini.


2. Configure the intermediate file. For example, if the MAC address of a device is
0018-82C5-AA89, the ESN is 9300070123456789, the version file name is
auto_V200R010.cc, the version is V200R010, the patch file is
auto_V200R010.pat, and the configuration file is auto_V200R010.cfg, the
contents of the intermediate file arnet.ini are as follows:
MAC=0018-82C5-
AA89;ESN=9300070123456789;vrpfile=auto_V200R010.cc;vrpver=V200R010;patchfile=auto_V200R010.p
at;cfgfile=auto_V200R010.cfg;

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 43


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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.

2.7.3 Configuring the DHCP Server


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

● The DHCP server must be configured with Option parameters.


● A router is used as an example to describe the procedure for configuring the DHCP
server. When the router functions as the DHCP server, configure the DHCP server
according to DHCP Configuration. The following example describes the procedure for
configuring the DHCP server based on the global address pool.
● After the Auto-Config configuration is complete, delete Auto-Config configuration on
the DHCP server to prevent the configuration information from affecting other
configurations.

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.

Step 5 Run dhcp select global

The interface is configured to use the global address pool.

Step 6 Run quit

Return to the system view.

Step 7 Run ip pool ip-pool-name

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 44


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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.

Step 9 Run gateway-list ip-address &<1-8>


The egress gateway address for DHCP clients is specified.
Step 10 Run option code [ sub-option sub-code ] { ascii ascii-string | hex hex-string |
cipher cipher-string | ip-address ip-address &<1-8> }URL=URL_INFO;URL=http://
192.168.1.40:80/
acs;username=USERNAME;password=PASSWORD;vrpfile=VRPFILENAME;vrpver=VR
PVERSION;patchfile=PATCHFILENAME;Example:vrpfile=auto_V200R010.cc;vrpver=V
200R010;patchfile=auto_V200R010.pat;
Option parameters are configured for the DHCP server.

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.

If Option 67 is not configured, Auto-Config enables devices to load configuration


files using the intermediate file. For details about how to edit the intermediate
file, see "2.7.2 (Optional) Configuring the Intermediate File".
Table 2-4 shows DHCP Option parameters used in Auto-Config.

Table 2-4 DHCP Option parameters


Option Description

Option 43 Information about the ACS server:


● sub-option 1: ACS URL. Format:
For example:
● sub-option 2: ACS user name and password.
Format:
NOTE
The router cannot function as the ACS server. For details
about ACS configurations, see corresponding manuals.

Option 67 Name of the configuration file assigned to DHCP


clients.

Option 141 FTP/SFTP user name assigned to DHCP clients.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 45


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Option Description

Option 142 FTP/SFTP password assigned to DHCP clients.

Option 143 FTP server IP address assigned to DHCP clients.

Option 145 Information about the non-configuration file


assigned to DHCP clients, for example:
information about the system software, version
ID, and patch file. Format:
NOTE
● vrpver information must be included in the vrpfile
information.

Option 146 User-defined settings, including file deletion


policy used when memory space is insufficient
and delay in activating the configuration file.
Format:
● opervalue = 0: indicates that no system
software will be deleted from the file system
when the space is insufficient. opervalue=1:
indicates that system software will be deleted
from the file system when the space is
insufficient. By default, no file will be deleted
from the file system when the space is
insufficient.
● delaytime: specifies the delay in restarting a
device after a configuration file is downloaded
to the device, in seconds. By default, the delay
is 0 seconds.
NOTE
The maximum delay in restarting a device is 1 day,
namely, 86400 seconds. If the configured delay exceeds
1 day, the delay is calculated as 1 day.

Option 147 Authentication information. Option 147 is


optional. If Option 147 is required, it must be
configured as AutoConfig.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 46


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Option Description

Option 148 Agile Controller-Branch's IP address and port


number assigned to DHCP clients.
Option 148 is in the following format:
agilemode=AGILEMODE;agilemanage-mode=AGILEMANAGE-
MODE;agilemanage-domain=AGILEMANAGE-
DOMAIN;agilemanage-port=AGILEMANAGE-PORT;

● agilemode: indicates the agile mode.


agilemode=tradition: indicates the traditional
mode.
● agilemanage-mode: indicates that the
agilemanage-domain field is an IP address or a
domain name. agilemanage-mode=ip:
indicates that the agilemanage-domain field is
an IP address. agilemanage-mode=domain:
indicates that the agilemanage-domain field is
a domain name.
● agilemanage-domain: indicates an IP address
in case of agilemanage-mode=ip or indicates a
domain name in case of agilemanage-
mode=domain.
● agilemanage-port: indicates the Agile
Controller-Branch's port number assigned to
DHCP clients.
For example, in the Cloud VPN scenario, if the
Agile Controller-Branch's IP address and port
number assigned to DHCP clients are 10.17.15.84
and 10020, Option 148 is as follows:
agilemode=tradition;agilemanage-mode=ip;agilemanage-
domain=10.17.15.84;agilemanage-port=10020;

Option 149 SFTP server IP address and port number assigned


to DHCP clients. For example, if the SFTP server IP
address is 10.10.10.1 and port number is 22, the
Option 149 field is: option 149 ascii
ipaddr=10.10.10.1;port=22.

Option 150 TFTP server IP address assigned to DHCP clients.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 47


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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

2.7.4 Configuring the DHCP Relay Function


Context
If the device to be configured is on a different segment than the DHCP server, the
DHCP relay function needs to be configured to enable the device to obtain
configuration information such as IP addresses from the global address pool of the
DHCP server.
A maximum of 16 DHCP relay agents can be configured between the DHCP client
and server.

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.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 48


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

Step 5 Run dhcp select relay

The DHCP relay function is enabled on an interface.

Step 6 Run quit

Return to the system view.

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

2.7.5 Configuring the File Server

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.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 49


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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.

Step 3 Run interface interface-type interface-number


The interface view is displayed.
Step 4 Run ip address ip-address { mask | mask-length }
The IP address of the SFTP server is configured.

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

2.7.6 Powering on the Device to Start Auto-Config


After preceding configurations are complete, the device is powered on or
restarted. The Auto-Config process runs automatically.

2.7.7 Verifying the Configuration


Procedure
● Run the display autoconfig-status command to check the Auto-Config
running status.

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 50


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

● 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 dhcp relay { all | interface interface-type interface-number }
command to check the DHCP server or DHCP server group on the interface.
● Run the display dhcp server group [ group-name ] command to check
configuration of the DHCP server group on the DHCP relay agent.
● Run the display startup command to check the startup configuration file,
system software, and patch file.

----End

2.8 Maintaining Auto-Config


You can monitor the running status of Auto-Config in each phase to ensure that
Auto-Config runs normally.

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

● Do not save configuration immediately to a device after the configuration file is


downloaded; otherwise, only a temporary configuration file is saved because the
configuration has not taken effect.
● If devices fail to obtain the files, the Auto-Config process is suspended. Run the
autoconfig getting-file restart command to obtain the system software, patch file, and
configuration file to resume the Auto-Config process.

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

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 51


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

2.9 Configuration Examples for Auto-Config


This section provides Auto-Config configuration examples including networking
requirements and configuration roadmap.

2.9.1 Example for Configuring Auto-Config on the Same


Network Segment

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.

Figure 2-5 Configuring Auto-Config on the Same Network Segment

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

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 52


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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

By default, auto-config is enabled on a Router.

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

# Configuring SSH user information.


[SFTP Server] aaa
[SFTP Server-aaa] local-user user password
Please configure the login password (8-128)
It is recommended that the password consist of at least 2 types of characters, i
ncluding lowercase letters, uppercase letters, numerals and special characters.
Please enter password:
Please confirm password:
[SFTP Server-aaa] local-user user privilege level 15
[SFTP Server-aaa] local-user user service-type ssh
[SFTP Server-aaa] local-user user ftp-directory flash:/autoconfig
[SFTP Server-aaa] quit
[SFTP Server] ssh user user authentication-type password

# Configuring the IP address of the SFTP server.


[SFTP Server] interface gigabitethernet 0/0/1
[SFTP Server-GigabitEthernet0/0/1] ip address 192.168.1.6 24
[SFTP Server-GigabitEthernet0/0/1] quit

# Configuring an default route on SFTP server.


[SFTP Server] ip route-static 0.0.0.0 0.0.0.0 192.168.1.1

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 53


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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 3 Configuring the DHCP server (for example, AR2220)


<Huawei> system-view
[Huawei] sysname DHCP Server
[DHCP Server] dhcp enable
[DHCP Server] vlan 10
[DHCP Server-vlan10] quit
[DHCP Server] interface ethernet 5/0/1
[DHCP Server-Ethernet5/0/1] port link-type hybrid
[DHCP Server-Ethernet5/0/1] port hybrid untagged vlan 10
[DHCP Server-Ethernet5/0/1] port hybrid pvid vlan 10
[DHCP Server-Ethernet5/0/1] quit
[DHCP Server] interface ethernet 5/0/2
[DHCP Server-Ethernet5/0/2] port link-type hybrid
[DHCP Server-Ethernet5/0/2] port hybrid untagged vlan 10
[DHCP Server-Ethernet5/0/2] port hybrid pvid vlan 10
[DHCP Server-Ethernet5/0/2] quit
[DHCP Server] interface ethernet 5/0/3
[DHCP Server-Ethernet5/0/3] port link-type hybrid
[DHCP Server-Ethernet5/0/3] port hybrid untagged vlan 10
[DHCP Server-Ethernet5/0/3] port hybrid pvid vlan 10
[DHCP Server-Ethernet5/0/3] quit
[DHCP Server] interface gigabitEthernet 0/0/1
[DHCP Server-GigabitEthernet0/0/1] ip address 192.168.1.1 255.255.255.0
[DHCP Server-GigabitEthernet0/0/1] quit
[DHCP Server] interface vlanif 10
[DHCP Server-Vlanif10] ip address 192.168.2.6 255.255.255.0
[DHCP Server-Vlanif10] dhcp select global
[DHCP Server-Vlanif10] quit
[DHCP Server] ip pool auto-config
[DHCP Server-ip-pool-auto-config] network 192.168.2.0 mask 255.255.255.0
[DHCP Server-ip-pool-auto-config] gateway-list 192.168.2.6
[DHCP Server-ip-pool-auto-config] option 67 ascii ar_V200R010.cfg
[DHCP Server-ip-pool-auto-config] option 141 ascii user
[DHCP Server-ip-pool-auto-config] option 142 cipher huawei@123
[DHCP Server-ip-pool-auto-config] option 143 ip-address 192.168.1.6
[DHCP Server-ip-pool-auto-config] option 145 ascii
vrpfile=auto_V200R010.cc;vrpver=V200R010;patchfile=ar_V200R010.pat;
[DHCP Server-ip-pool-auto-config] option 149 ascii ipaddr=192.168.1.6;port=22;

[DHCP Server-ip-pool-auto-config] quit

Step 4 Power on RouterA, RouterB, and RouterC, and run the Auto-config process

Step 5 Verify 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. RouterA is used as an example.
<Huawei> display startup
MainBoard:
Startup system software: flash:/ar_V200R010.cc
Next startup system software: flash:/ar_V200R010.cc
Backup system software for next startup: null
Startup saved-configuration file: flash:/ar_V200R010.cfg
Next startup saved-configuration file: flash:/ar_V200R010.cfg
Startup license file: null
Next startup license file: null
Startup patch package: flash:/ar_V200R010.pat
Next startup patch package: flash:/ar_V200R010.pat
Startup voice-files: null
Next startup voice-files: null

----End

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 54


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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

● Configuration file of the DHCP server


#
sysname DHCP Server
#
vlan batch 10
#
dhcp enable
#
ip pool auto-config
gateway-list 192.168.2.6
network 192.168.2.0 mask 255.255.255.0
option 67 ascii ar_V200R003C00.cfg
option 141 ascii user
option 142 cipher %@%@djZ=#=yW^UB}YAMrrT;ItpY@%@%@
option 143 ip-address 192.168.1.6
option 145 ascii vrpfile=auto_V200R010.cc;vrpver=V200R010;patchfile=ar_V200R010.pat;
option 149 ascii ipaddr=192.168.1.6;port=22;
#
interface Vlanif10
ip address 192.168.2.6 255.255.255.0
dhcp select global
#
interface Ethernet5/0/1
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface Ethernet5/0/2
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface Ethernet5/0/3
port hybrid pvid vlan 10
port hybrid untagged vlan 10
#
interface GigabitEthernet0/0/1
ip address 192.168.1.1 255.255.255.0
#
return

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 55


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

2.9.2 Example for Configuring Auto-Config on Different


Network Segments

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.

Information about RouterA, RouterB, RouterC, and files to be loaded is as follows:


● RouterA: MAC address: 0018-82C5-AA89; ESN: 2102310CXK10B6000183;
system software: auto_V200R010.cc; system software version: V200R010,
patch file: auto_V200R010.pat; configuration file: auto_RouterA.cfg
● RouterB: MAC address: 0018-82C5-AA90; ESN: 2102310CXK10B6000184;
system software: auto_V200R010.cc; system software version: V200R010;
patch file: auto_V200R010.pat; configuration file: auto_RouterB.cfg
● RouterC: MAC address: 0018-82C5-AA91; ESN: 2102310CXK10B6000185;
system software: auto_V200R010.cc; system software version: V200R010;
patch file: auto_V200R010.pat; configuration file: auto_RouterC.cfg.

Figure 2-6 Configuring Auto-Config on Different Network Segments

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

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 56


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

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

● By default, auto-config is enabled on a Router.

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

# Configuring SSH user information.


[SFTP Server] aaa
[SFTP Server-aaa] local-user user password
Please configure the login password (8-128)
It is recommended that the password consist of at least 2 types of characters, i

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 57


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

ncluding lowercase letters, uppercase letters, numerals and special characters.


Please enter password:
Please confirm password:
[SFTP Server-aaa] local-user user privilege level 15
[SFTP Server-aaa] local-user user service-type ssh
[SFTP Server-aaa] local-user user ftp-directory flash:\autoconfig
[SFTP Server-aaa] quit
[SFTP Server] ssh user user authentication-type password

# Configuring the IP address of the SFTP server.


[SFTP Server] interface gigabitethernet 0/0/1
[SFTP Server-GigabitEthernet0/0/1] ip address 192.168.4.6 24
[SFTP Server-GigabitEthernet0/0/1] quit

# Configuring an default route on SFTP server.


[SFTP Server] ip route-static 0.0.0.0 0.0.0.0 192.168.4.1

Step 2 Configuring an intermediate file arnet.ini


# Create a file and name the file arnet.ini. The contents and format of the
intermediate file are as follows:
MAC=0018-82C5-
AA89;ESN=2102310CXK10B6000183;vrpfile=auto_V200R010.cc;vrpver=V200R010;patchfile=auto_V200R010.p
at;cfgfile=auto_RouterA.cfg;
MAC=0018-82C5-
AA90;ESN=2102310CXK10B6000184;vrpfile=auto_V200R010.cc;vrpver=V200R010;patchfile=auto_V200R010.p
at;cfgfile=auto_RouterB.cfg;
MAC=0018-82C5-
AA91;ESN=2102310CXK10B6000185;vrpfile=auto_V200R010.cc;vrpver=V200R010;patchfile=auto_V200R010.p
at;cfgfile=auto_RouterC.cfg;

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 5 Configuring RouterE


# Configure RouterE as the DHCP server.
<Huawei> system-view
[Huawei] sysname DHCP Server
[DHCP Server] dhcp enable
[DHCP Server] interface GigabitEthernet 0/0/1
[DHCP Server-GigabitEthernet0/0/1] ip address 192.168.2.6 255.255.255.0
[DHCP Server-GigabitEthernet0/0/1] dhcp select global
[DHCP Server-GigabitEthernet0/0/1] quit
[DHCP Server] interface GigabitEthernet 0/0/2
[DHCP Server-GigabitEthernet0/0/2] ip address 192.168.4.1 255.255.255.0
[DHCP Server-GigabitEthernet0/0/2] quit
[DHCP Server] ip pool auto-config
[DHCP Server-ip-pool-auto-config] network 192.168.1.0 mask 255.255.255.0
[DHCP Server-ip-pool-auto-config] gateway-list 192.168.1.6
[DHCP Server-ip-pool-auto-config] option 141 ascii user

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 58


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

[DHCP Server-ip-pool-auto-config] option 142 cipher huawei@123


[DHCP Server-ip-pool-auto-config] option 143 ip-address 192.168.4.6
[DHCP Server-ip-pool-auto-config] option 146 ascii opervalue=1;delaytime=0;netfile=arnet.ini;
[DHCP Server-ip-pool-auto-config] quit
[DHCP Server] ip route-static 192.168.1.0 255.255.255.0 192.168.2.1

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_V200R010.cc
Next startup system software: flash:/auto_V200R010.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_V200R010.pat
Next startup patch package: flash:/auto_V200R010.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

● Configuration file of the DHCP relay agent


#
sysname DHCP Relay
#
dhcp enable
#
interface GigabitEthernet0/0/1
ip address 192.168.2.1 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 192.168.1.6 255.255.255.0
dhcp select relay

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 59


Huawei AR Series Access Routers
CLI-based Configuration Guide - Basic Configuration 2 Auto-Config Configuration

dhcp relay server-ip 192.168.2.6


#
ip route-static 192.168.4.0 255.255.255.0 192.168.2.6
#
return

● Configuration file of the DHCP server


#
sysname DHCP Server
#
dhcp enable
#
ip pool auto-config
gateway-list 192.168.1.6
network 192.168.1.0 mask 255.255.255.0
option 141 ascii user
option 142 cipher %@%@djZ=#=yW^UB}YAMrrT;ItpY@%@%@
option 143 ip-address 192.168.4.6
option 146 ascii opervalue=1;delaytime=0;netfile=arnet.ini;
#
interface GigabitEthernet0/0/1
ip address 192.168.2.6 255.255.255.0
dhcp select global
#
interface GigabitEthernet0/0/2
ip address 192.168.4.1 255.255.255.0
#
ip route-static 192.168.1.0 255.255.255.0 192.168.2.1
#
return

Issue 13 (2023-08-01) Copyright © Huawei Technologies Co., Ltd. 60

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy