Anda di halaman 1dari 25

Auto-Config Technology White Paper

Issue Date

01 2012-09-30

HUAWEI TECHNOLOGIES CO., LTD.

Copyright Huawei Technologies Co., Ltd. 2012. All rights reserved.


No part of this document may be reproduced or transmitted in any form or by any means without prior written consent of Huawei Technologies Co., Ltd.

Trademarks and Permissions


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.

Huawei Technologies Co., Ltd.


Address: Huawei Industrial Base Bantian, Longgang Shenzhen 518129 People's Republic of China Website: Email: http://www.huawei.com support@huawei.com

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Auto-Config Technology White Paper

Contents

Contents
1 Auto-Config.................................................................................................................................... 1
1.1 Introduction ...................................................................................................................................................... 1 1.2 References ........................................................................................................................................................ 2 1.3 Principles .......................................................................................................................................................... 2 1.3.1 Auto-Config Application Environment ................................................................................................... 2 1.3.2 Auto-Config Concepts............................................................................................................................. 3 1.3.3 Auto-Config Workflow ........................................................................................................................... 5 1.4 Applications.................................................................................................................................................... 11 1.4.1 Example for Configuring Auto-Config for Devices on the Same Network Segment as the DHCP Server ............................................................................................................................................................. 11 1.4.2 Example for Configuring Auto-Config for Devices on Different Network Segments from the DHCP Server ............................................................................................................................................................. 15 1.5 FAQ ................................................................................................................................................................ 21 Why the Auto-Config Function Does Not Take Effect When All Configurations Are Correct? .................... 21

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

ii

Auto-Config Technology White Paper

1 Auto-Config

1
1.1 Introduction
Definition Purpose

Auto-Config

The Auto-Config function enables a new device or a device without configuration to automatically load the configuration file when the device is powered on. In addition to the configuration file, you can enable the device to load the system software, patch file, and web file to upgrade the version.

It takes much time to install and configure numerous sparsely deployed access and aggregation devices. The complicated configurations cause high costs of personnel training and installation. Each device needs to be configured manually, which costs a lot.

IP addresses and management channels of devices are not configured and cannot be configured remotely. Therefore, software commissioning engineers must configure devices on site, increasing the costs. Devices cannot be configured remotely, reducing the efficiency of software version upgrade or rollback. Each device needs to be configured individually, reducing the efficiency of configuration and commissioning. In addition, script compilation for each device is complicated and time consuming. During the script compilation, faults occur easily and a lot of repeated work is done.

The Auto-Config function simplifies network configuration and supports centralized device management. Using the Auto-Config function, maintenance personnel only need to configure an IP address pool on the DHCP server and save the configuration file, system software (optional), patch file (optional), and web file (optional) on a specified file server. A device without configuration can automatically download and execute files from the file server. Devices can be configured automatically without manual configurations. This function reduces costs and increases device configuration efficiency.

Benefits
The Auto-Config function enables a device to automatically load and execute the configuration file, system software, patch file and web file. This avoids complicated manual configurations and reduces manpower and material costs.

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Auto-Config Technology White Paper

1 Auto-Config

1.2 References
The following table lists the references of this document. Document RFC1534 RFC2131 RFC2132 RFC3046 Description Interoperation Between DHCP and BOOTP Dynamic Host Configuration Protocol DHCP Options and BOOTP Vendor Extensions DHCP Relay Agent Information Option Remarks -

1.3 Principles
1.3.1 Auto-Config Application Environment
Figure 1-1 Auto-Config application environment

As shown in Figure 1-1, SwitchA, SwitchB, SwitchC, and SwitchD have no configuration file. The switches need to use the Auto-Config function to automatically load and execute configuration files. By default, the Auto-Config function has been enabled on the four switches, and the enterprise server group has the DHCP server and file server deployed. If the switches and the DHCP server are on different network segments, a DHCP relay agent needs to be configured to enable interaction between the switches and the DHCP server. This ensures that DHCP Request packets of the switches are sent to the DHCP server. SwitchA, SwichB, SwitchC, and SwitchD function as DHCP clients to periodically send DHCP Request packets to the DHCP server to obtain configuration information. After receiving the DHCP Request packets, the DHCP server sends DHCP Reply packets that contain IP addresses assigned to the switches, egress gateway address, and Option parameters. Option parameters include the file server IP address, configuration file name, system software name, version number information, patch file name, and web file name. If Option parameters
Issue 01 (2012-09-30) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 2

Auto-Config Technology White Paper

1 Auto-Config

do not contain configuration file information, the switches obtain the information from the intermediate file. The intermediate file needs to be edited and saved on the file server. The switches automatically obtain version files from the specified file server according to information in the received DHCP Reply packets. The information includes the configuration file name, system software name, patch file name, and web file name. The switches specify the obtained version files for next startup. After the switches are restarted, they automatically load configuration files, system software, patch files, and web files.

1.3.2 Auto-Config Concepts


DHCP Server
In an Auto-Config application environment, the DHCP server provides network configuration information for devices that function as DHCP clients. An IP address pool, egress gateway address, and Option parameters need to be configured on the DHCP server. The IP address pool contains IP addresses to be assigned to interfaces of devices. Option parameters contain information about the IP address of the file server that the DHCP server assigns to DHCP clients, configuration file name, system software name, version number, patch file name, and web file name. In an Auto-Config application environment, any device that supports the DHCP server function can function as a DHCP server.

IP address pool When a Huawei switch functions as a DHCP server, the DHCP server can configure a global IP address pool or a VLANIF interface IP address pool.

Option parameters A DHCP server uses the Option field in a DHCP packet to carry control information and network configuration parameters to implement dynamic IP address allocation. In this way, the DHCP server provides network configuration information for devices that function as DHCP clients. Table 1-1 lists DHCP Option parameters related to the Auto-Config function.

Table 1-1 DHCP Option parameters Option Option 67 Option 141 Option 142 Option 143 Option 145 Option 146 Option 147 Description Name of a configuration file assigned to a DHCP client. The file name extension must be .cfg. FTP/SFTP user name assigned to a DHCP client. FTP/SFTP password assigned to a DHCP client. FTP server IP address assigned to a DHCP client. Information about the non-configuration file assigned to a DHCP client. User-specified settings, including file deletion policy used when memory space is insufficient, configuration file activation delay. 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. SFTP server IP address and port number assigned to DHCP clients.

Option 149

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Auto-Config Technology White Paper

1 Auto-Config

Option Option 150

Description TFTP server IP address assigned to a DHCP client.

Information about non-configuration files contained in Option 145 includes information about system software, version number, patch file, and web file. You can choose to configure the information as required. The information is in the format of vrpfile=VRPFILENAME;vrpver=VRPVERSION;patchfile=PATCHFILENAME;webfile=W EBFILE;. Assume that a device needs to obtain the following information: system software name auto_V200R001C00.cc, version number V200R001C00, patch file auto_V200R001C00.pat, and web file auto.web.zip. The non-configuration file in Option 145 is in the format of vrpfile=auto_V200R001C00.cc;vrpver= V200R001C00;patchfile=auto_V200R001C00.pat;webfile=auto.web.zip;. Pay attention to the following four points: 1. In versions earlier than V200R002, the system software name in Option 145 must contain version number information as shown in the preceding example. In V200R002 and later versions, this limitation is removed. From V200R002, you can configure Option 67 and Option 145 to specify the file path of the configuration file, system software, patch file, and web file in the root directory of the file server, and the length of the path cannot exceeds 48 characters. For example, the file path can be vrpfile=/auto/S5700LI.cc;vrpver=V200R002C00;patchfile=/auto/V200R002C00.pat;web file=/auto/auto.web.zip;. From V200R001, Option 146 specifies intermediate file name. From V200R002, Option 146 specifies file path of the intermediate file, and the length of the directory cannot exceeds 48 characters. The name and file path of the intermediate file in Option 146 must be the same as those of the intermediate file stored on the file server. From V200R002, you can receive the files through SFTP server. Option149 specifies 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=2.

2.

3.

4.

File Server
The file server is FTP/TFTP/SFTP server, used to store files for devices that are running the Auto-Config function. When a device to be configured obtains the IP address of the file server from the DHCP server, the device downloads files it needs from the file server, including the intermediate file, configuration file, system software, patch file, and web file. In an Auto-Config application environment, any device that supports the file server function can function as an FTP/TFTP/SFTP server. The device to be configured obtains the IP address of the TFTP server from Option 150 in Option parameters, and obtains the FTP user name, FTP password, and IP address of the FTP server from Option 141, Option 142, and Option 143 respectively. When both TFTP Option and FTP Option parameters are set on the DHCP server, FTP Option parameters take effect. Options 141, 142, and 149 enable DHCP clients to obtain the SFTP user name, SFTP password, and SFTP server IP address and port number.

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Auto-Config Technology White Paper

1 Auto-Config

Intermediate File
The intermediate file saves mapping between MAC address or ESN of the device to be configured and files the device needs, including system software name, version number, patch file name, web file name, and configuration file name. If Option 67 that contains configuration file information is not configured on the DHCP server, the Auto-Config function enables the device to download the intermediate file from the file server. After analyzing the intermediate file, the device searches for the system software name, version number, patch file name, web file name, and configuration file name that match its own MAC address or ESN, and downloads files from the file server according to the obtained names. Assume that the MAC address of a device is 0018-82C5-AA89, the ESN is 9300070123456789, the version file name is auto_V200R001C00.cc, the version number is V200R001C00, the patch file is auto_V200R001C00.pat, the configuration file is auto_V200R001C00.cfg, and the web file is auto.web.zip. The contents of the intermediate file are as follows: MAC=0018-82C5-AA89;vrpfile=auto_V200R001C00.cc;vrpver= V200R001C00;patchfile=auto_V200R001C00.pat;cfgfile=auto_V200R001C00.cfg;webfile=a uto.web.zip. When configuring the intermediate file, note the following points: If multiple devices need to be configured, each row in the intermediate file records the configuration of each device. Either the MAC address or the ESN of a device can be chosen. You can use the following methods to obtain the MAC address and ESN of a device: Check the label on the device. If you can log in to the device, run the display bridge mac-address command to view the MAC address of the device and run the display elabel command to view the ESN of the device. The BarCode field in the display elabel command output displays the ESN. In versions earlier than V200R002, the system software name in the intermediate file must contain version number information. From V200R002, you can configure the intermediate file to specify the file path of the configuration file, system software, patch file, and web file in the root directory of the file server, which is similar to the configuration of Option 145. In versions earlier than V200R001, the intermediate file name is lswnet.cfg. The intermediate file name in later versions can be edited. The intermediate file is in the text format. It can be edited on the file server. You can also edit the intermediate file on a PC and upload it to the file server.

DHCP Relay
A device to be configured functions as a DHCP client, and broadcasts a DHCP Request packet to obtain an IP address. If the device and a DHCP server are on different network segments, a DHCP relay needs to be configured to allow packet exchange between the device and the DHCP server.

1.3.3 Auto-Config Workflow


Before configuring the Auto-Config function, pay attention to the following three points: 1The device can be configured using either Auto-Config or USB deployment. The two methods cannot be used together.

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Auto-Config Technology White Paper

1 Auto-Config

2Ensure that the device does not contain the configuration file. Except the web file, the device cannot contain files with the file name extension .cfg or .zip. 3Only interfaces added to the default VLAN (that is, VLAN1) support the Auto-Config function. By default, all interfaces are added to VLAN1.

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Auto-Config Technology White Paper

1 Auto-Config

Figure 1-2 Auto-Config workflow

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Auto-Config Technology White Paper

1 Auto-Config

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Auto-Config Technology White Paper

1 Auto-Config

As shown Figure 1-2, Auto-Config includes three steps: A device obtains its IP address and configuration information from the DHCP server. The device obtains files it needs from the file server. The configuration takes effect.

Obtaining IP Address and Configuration Information from the DHCP Server


1. When a device without configuration starts, the device automatically enables the DHCP client function on an interface in Up state and broadcasts a DHCP Request packet through the interface. After receiving the DHCP Request packet, the DHCP server sends a DHCP Reply packet to the device. The packet contains the IP address assigned to the device, FTP/TFTP/SFTP server IP address, FTP/SFTP user name, FTP/SFTP password, and default gateway address. 2. The device checks whether the FTP/TFTP/SFTP server information in the DHCP Reply packet is valid. If so, the IP address is assigned to the device. When TFTP Option, FTP Option and SFTP Option parameters are set on the DHCP server, SFTP Option parameters take effect.

Obtaining Files the Device Needs from the File Server


Step1. After obtaining an IP address, gateway address, and file server IP address, the device adds a route to the file server, and logs in to the file server to obtain files. The device obtains files in either of the following methods:

Option method. If the received DHCP Reply packet contains Option 67, the device analyzes Option 67 to obtain the configuration file, and analyzes Option 145 to check whether the system software, patch file and web file are available. This method applies to the scenario where a few devices need to be configured and load the same configuration file.

Intermediate file method If the received DHCP Reply packet does not contain Option 67, the device does not analyze Option 145, and obtains files through the intermediate file. After obtaining the file server IP address, the device without configuration downloads and analyzes the intermediate file from the file server. The device records the configuration file name, system software name, patch file name, and web file name in the intermediate file and then deletes the intermediate file. The device downloads the configuration file, system software, patch file, and web file from the file server according to the recorded names. This method applies to the scenario where many devices need to be configured and load different configuration files.

Step2. The Auto-Config module analyzes information about system software and version number. If no information about system software and version number is available, go to 0. If only system software information or version number information is available, the Auto-Config process is suspended. If both system software information and version number information are available but they are not the same, the Auto-Config process is suspended.

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

Auto-Config Technology White Paper

1 Auto-Config

If system software information and version number information are the same, check whether the system software and version number are the same as those for next startup. If not, the Auto-Config process is suspended. If so, go to the next step. If the system software and version number are the same as the current system software, and the current system software is running, go to 0. If the current system software is not running, the Auto-Config process is suspended. If system software information and version number information are the same but are different from the current system software or the device has no system software, the device downloads system software form the file server. After downloading system software successfully, the device checks whether the system software is correct. If not, the device deletes the system software, records the error, stops the subsequent processes, suspends the Auto-Config process, and waits for human intervention. If the system software is correct, the device automatically specifies the system software for next startup. Go to 0. If the device fails to obtain system software because of insufficient memory space, the device determines whether to delete the existing system software based on the setting of Option 146. By default, the existing system software is not deleted. You can run the display autoconfig-status command to find out why the device fails to download the configuration file, system software, web file, and patch file. Step3. The Auto-Config module analyzes whether patch file information is available. If no patch file information is available, go to 0. If the patch file is available, check whether the patch file is the same as the patch file for next startup. If not, the Auto-Config process is suspended. If so, go to the next step. If the patch file is available and is the same as the current patch file, and the current patch file is running, go to 0. If the current patch file is not running, the Auto-Config process is suspended. If the patch file is available, but it is different from the current patch file or the device has no patch file, the device downloads the patch file from the file server. After downloading the patch file successfully, the device checks whether the patch file is correct. If not, the device deletes the patch file, records the error, stops the subsequent processes, suspends the Auto-Config process, and waits for human intervention. If the patch file is correct, the device specifies the patch file as the patch file for next startup. Go to 0. Step4. The Auto-Config module analyzes whether the web file is available. If no web file information is available, go to 0. If web file information is available and is the same as the current web file, the device deletes the current web file. If the web file cannot be deleted, the Auto-Config process is suspended. If the web file is deleted, the device downloads a web file from the file server. If web file information is available, but it is different from the current web file or the device has no web file, the device downloads a web file from the file server. After the web file is downloaded successfully, go to 0. Step5. The Auto-Config module analyzes configuration file name. The device downloads the configuration file from the file server. If the device fails to download the configuration file, the device suspends the Auto-Config process and waits for human intervention. After downloading the configuration file successfully, the device starts a delay timer for the

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

10

Auto-Config Technology White Paper

1 Auto-Config

configuration file to take effect. If no timer is configured, the configuration file takes effect immediately. When the device is obtaining files from the file server, note the following point: If the device fails to obtain the intermediate file, system software, patch file, web file, and configuration file, the Auto-Config process is suspended and the timer for periodically obtaining files is started. The system attempts to obtain the files every 30 minutes within 3 days and attempts to obtain the files every 2 hours 3 days later. If the system still fails to obtain the files 30 days later, the system stops obtaining the files and waits for human intervention. Then run the autoconfig getting-file restart command to obtain the intermediate file, system software, patch file, web file, and configuration file again and the Auto-Config process continues.

Validity Period of the Configuration


You can configure Option 146 on the DHCP server to set a delay timer for the configuration file to take effect. After the configuration file is downloaded successfully, the configuration file takes effect according to the setting of Option 146. If no Option 146 is configured, the configuration file takes effect immediately.

1.4 Applications
1.4.1 Example for Configuring Auto-Config for Devices on the Same Network Segment as the DHCP Server
Networking Requirements: As shown in Figure 1-3, in the network deployment for a residential community, the aggregation device SwitchD is connected to new Switches (such as SwitchA, SwitchB, and SwitchC) 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 Switchs on layers. Besides, to save manpower costs and deployment time of many Switches, the Switches are required to be automatically configured with the same configuration. Figure 1-3 Networking diagram for configuring Auto-Config for devices on the same network segment as the DHCP server

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

11

Auto-Config Technology White Paper

1 Auto-Config

Configuration Roadmap: The configuration roadmap is as follows: 1. 2. Directly connect the user PC to SwitchD and configure the PC as an FTP server. Place the configuration file, system software, and patch file to be loaded to the working directory of the FTP server to ensure that SwitchA, SwitchB, and SwitchC can obtain files to be loaded. Configure SwitchD as the DHCP server to provide network configurations to SwitchA, SwitchB, and SwitchC. 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 Switches. Power on SwitchA, SwitchB, and SwitchC, so that the configuration file, system software, and patch file are automatically loaded using auto-config.

3.

4.

Procedure: 1. Configuring the FTP server

# Configure the FTP server IP address, user name, password, and working directory. As shown in Figure 1-4, run an FTP server program on the PC, for example, wftpd32. Choose Security > Users/rights. Click New User in the displayed dialog box to set the user name to user and password to huawei. Enter the FTP working directory in the Home Directory: text box to set working directory to D:\autoconfig. Click Done to finish the setting and close the dialog box. Set the PC IP address to 192.168.1.6 and mask to 255.255.255.0. Figure 1-4 Configuring the FTP server

2. 3.

Upload the system software, configuration file, and patch file to the FTP server working directory D:\autoconfig. Procedures for uploading the files are not mentioned here Configuring the DHCP server

<HUAWEI> system-view [HUAWEI] sysname DHCP Server [DHCP Server] dhcp enable [DHCP Server] vlan batch 10 20 [DHCP Server] interface gigabitethernet 0/0/1

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

12

Auto-Config Technology White Paper

1 Auto-Config

[DHCP Server-GigabitEthernet0/0/1] port hybrid pvid vlan 10 [DHCP Server-GigabitEthernet0/0/1] port hybrid untagged vlan 10 [DHCP Server-GigabitEthernet0/0/1] quit [DHCP Server] interface gigabitethernet 0/0/2 [DHCP Server-GigabitEthernet0/0/2] port hybrid pvid vlan 10 [DHCP Server-GigabitEthernet0/0/2] port hybrid untagged vlan 10 [DHCP Server-GigabitEthernet0/0/2] quit [DHCP Server] interface gigabitethernet 0/0/3 [DHCP Server-GigabitEthernet0/0/3] port hybrid pvid vlan 10 [DHCP Server-GigabitEthernet0/0/3] port hybrid untagged vlan 10 [DHCP Server-GigabitEthernet0/0/3] quit [DHCP Server] interface gigabitethernet 0/0/4 [DHCP Server-GigabitEthernet0/0/4] port hybrid pvid vlan 20 [DHCP Server-GigabitEthernet0/0/4] port hybrid untagged vlan 20 [DHCP Server-GigabitEthernet0/0/4] 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] interface vlanif 20 [DHCP Server-Vlanif20] ip address 192.168.1.1 255.255.255.0 [DHCP Server-Vlanif20] 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 s_V200R002C00.cfg [DHCP Server-ip-pool-auto-config] option 141 ascii user [DHCP Server-ip-pool-auto-config] option 142 ascii huawei [DHCP Server-ip-pool-auto-config] option 143 ip-address 192.168.1.6 [DHCP Server-ip-pool-auto-config] option 145 ascii vrpfile=s_V200R002C00.cc;vrpver=V200R002C00;patchfile=s_V200R002C00.pat; [DHCP Server-ip-pool-auto-config] quit 4. 5. Power on SwitchA, SwitchB, and SwitchC, and run the Auto-config process Verify the configuration

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

13

Auto-Config Technology White Paper

1 Auto-Config

# After auto-config is finished, log in to the Switches to be configured and run the display startup command to view the system software, configuration file, and patch file for the startup of the Switch. SwitchA is used as an example. <HUAWEI> display startup MainBoard: Configured startup system software: Startup system software: Next startup system software: Startup saved-configuration file: Next startup saved-configuration file: Startup paf file: Next startup paf file: Startup license file: Next startup license file: Startup patch package: Next startup patch package: Configuration Files: Configuration file of the DHCP server # sysname DHCP Server # vlan batch 10 20 # 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 s_V200R002C00.cfg option 141 ascii user option 142 ascii huawei option 143 ip-address 192.168.1.6 option 145 ascii vrpfile=s_V200R002C00.cc;vrpver=V200R002C00;patchfile=s_V200R002C00.pat; #
Issue 01 (2012-09-30) Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd. 14

flash:/s_V200R002C00.cc flash:/s_V200R002C00.cc flash:/s_V200R002C00.cc flash:/s_V200R002C00.cfg flash:/s_V200R002C00.cfg NULL NULL NULL NULL flash:/s_V200R002C00.pat flash:/s_V200R002C00.pat

Auto-Config Technology White Paper

1 Auto-Config

interface Vlanif10 ip address 192.168.2.6 255.255.255.0 dhcp select global # interface Vlanfi20 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet0/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet0/0/2 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet0/0/3 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet0/0/4 port hybrid pvid vlan 20 port hybrid untagged vlan 20 # return

1.4.2 Example for Configuring Auto-Config for Devices on Different Network Segments from the DHCP Server
Networking Requirements: As shown in Figure 1-5, in the network deployment for branches of an enterprise, the new SwitchA, SwitchB, and SwitchC are connected to GE0/0/1, GE0/0/2, and GE0/0/3 on SwitchD respectively. SwitchD functions as the egress gateway of the branches and is connected to the headquarters across the Layer 3 network. Users want to load different system software, patch files, and configuration files on SwitchA, SwitchB, and SwitchC. Besides, to save manpower costs, users want the Switches to be automatically configured with different configurations. Information about SwitchA, SwitchB, SwitchC, and files to be loaded is as follows:

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

15

Auto-Config Technology White Paper

1 Auto-Config

SwitchA: The MAC address is 0025-9e1e-773b, the name of the system software to be loaded is auto_V200R001C00.cc, the version is V200R001C00, the version is V200R001C00, the patch file is auto_V200R001C00.pat, and the configuration file is auto_V200R001C00.cfg. SwitchB: The MAC address is 0025-9e1e-773c, the name of the system software to be loaded is auto_V200R002C00.cc, the version is V200R002C00, the version is V200R002C00, the patch file is auto_V200R002C00.pat, and the configuration file is auto_V200R002C00.cfg. SwitchC: The MAC address is 0025-9e1e-773d, the name of the system software to be loaded is auto_V100R006C00.cc, the version is V100R006C00, the version is V100R006C00, the patch file is auto_V100R006C00.pat, and the configuration file is auto_V100R006C00.cfg.

Figure 1-5 Networking diagram for configuring Auto-Config for devices on different network segments from the DHCP server

Configuration Roadmap: The configuration roadmap is as follows: 1. 2. 3. Directly connect the user PC to SwitchE and configure the PC as an FTP server. Configure an intermediate file so that SwitchA, SwitchB, and SwitchC can obtain configuration files, system software, and patch files through the intermediate file. Place the intermediate file, configuration files, system software, and patch files to be loaded to the working directory of the FTP server to ensure that Switches to be configured can obtain files to be loaded. Configure the branch gateway SwitchD as the DHCP relay agent and configure SwitchE in the headquarters as the DHCP server so that the DHCP server can deliver network configurations to Switches to be configured on different network segments. Power on SwitchA, SwitchB, and SwitchC so that configuration files, system software, and patch files are automatically loaded using auto-config.

4.

5.

Procedure 1. Configuring the FTP server

# Configure the FTP server IP address, user name, password, and working directory.

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

16

Auto-Config Technology White Paper

1 Auto-Config

As shown in Figure 1-6, run an FTP server program on the PC, for example, wftpd32. Choose Security > Users/rights. Click New User in the displayed dialog box to set the user name to user and password to huawei. Enter the FTP working directory in the Home Directory: text box to set working directory to D:\autoconfig. Click Done to finish the setting and close the dialog box. Set the PC IP address to 192.168.4.6 and mask to 255.255.255.0. Figure 1-6 Configuring the FTP server

2.

Configuring an intermediate file lswnet.cfg

# Create a text file named lswnet.cfg. The contents and format of the intermediate file are as follows: MAC=0025-9e1e-773b;vrpfile=auto_V200R001C00.cc;vrpver=V200R001C00;patchfile=aut o_V200R001C00.pat;cfgfile=auto_V200R001C00.cfg; MAC=0025-9e1e-773c;vrpfile=auto_V200R002C00.cc;vrpver=V200R002C00;patchfile=aut o_V200R002C00.pat;cfgfile=auto_V200R002C00.cfg; MAC=0025-9e1e-773d;vrpfile=auto_V100R006C00.cc;vrpver=V100R006C00;patchfile=aut o_V100R006C00.pat;cfgfile=auto_V100R006C00.cfg; 3. Upload the intermediate file, system software, configuration file, and patch file to the FTP server working directory D:\autoconfig. Procedures for upload the files are not mentioned here Configuring SwitchD

4.

# Configure SwitchD as the DHCP relay agent. <HUAWEI> system-view [HUAWEI] sysname DHCP Relay [DHCP Relay] dhcp enable [DHCP Relay] vlan 10 [DHCP Relay-vlan10] quit [DHCP Relay] interface gigabitethernet 0/0/1 [DHCP Relay-GigabitEthernet0/0/1] port hybrid pvid vlan 10 [DHCP Relay-GigabitEthernet0/0/1] port hybrid untagged vlan 10

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

17

Auto-Config Technology White Paper

1 Auto-Config

[DHCP Relay-GigabitEthernet0/0/1] quit [DHCP Relay] interface gigabitethernet 0/0/2 [DHCP Relay-GigabitEthernet0/0/2] port hybrid pvid vlan 10 [DHCP Relay-GigabitEthernet0/0/2] port hybrid untagged vlan 10 [DHCP Relay-GigabitEthernet0/0/2] quit [DHCP Relay] interface gigabitethernet 0/0/3 [DHCP Relay-GigabitEthernet0/0/3] port hybrid pvid vlan 10 [DHCP Relay-GigabitEthernet0/0/3] port hybrid untagged vlan 10 [DHCP Relay-GigabitEthernet0/0/3] quit [DHCP Relay] interface vlanif 10 [DHCP Relay-Vlanif10] ip address 192.168.1.6 255.255.255.0 [DHCP Relay-Vlanif10] dhcp select relay [DHCP Relay-Vlanif10] dhcp relay server-ip 192.168.2.6 [DHCP Relay-Vlanif10] quit # Configure a static route on SwitchD. The destination IP address of the static route is the PC IP address and the next hop is the IP address of an interface on a Layer 3 device directly connected to SwitchD. 5. Configuring SwitchE

# Configure SwitchE as the DHCP server. <HUAWEI> system-view [HUAWEI] sysname DHCP Server [DHCP Server] dhcp enable [DHCP Server] vlan batch 20 30 [DHCP Server] interface gigabitethernet 0/0/1 [DHCP Server-GigabitEthernet0/0/1] port link-type trunk [DHCP Server-GigabitEthernet0/0/1] port trunk allow-pass vlan 20 [DHCP Server-GigabitEthernet0/0/1] quit [DHCP Server] interface gigabitethernet 0/0/2 [DHCP Server-GigabitEthernet0/0/2] port hybrid pvid vlan 30 [DHCP Server-GigabitEthernet0/0/2] port hybrid untagged vlan 30 [DHCP Server-GigabitEthernet0/0/2] quit [DHCP Server] interface vlanif 20 [DHCP Server-Vlanif20] ip address 192.168.2.6 255.255.255.0 [DHCP Server-Vlanif20] dhcp select global

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

18

Auto-Config Technology White Paper

1 Auto-Config

[DHCP Server-Vlanif20] quit [DHCP Server] interface vlanif 30 [DHCP Server-Vlanif30] ip address 192.168.4.1 255.255.255.0 [DHCP Server-Vlanif30] 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 [DHCP Server-ip-pool-auto-config] option 142 ascii huawei [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;delay=0;netfile=lswnet.cfg; [DHCP Server-ip-pool-auto-config] quit # Configure a static route on SwitchE. The destination IP address of the static route is the IP address pool segment and the next hop is the IP address of an interface on a Layer 3 device directly connected to SwitchE. 6. 7. Power on SwitchA, SwitchB, and SwitchC, and run the Auto-config process Verify the configuration

# After auto-config is finished, log in to the Switches to be configured and run the display startup command to view the system software, configuration file, and patch file for the startup of the Switch. SwitchC is used as an example. <HUAWEI> display startup MainBoard: Configured startup system software: Startup system software: Next startup system software: Startup saved-configuration file: Next startup saved-configuration file: Startup paf file: Next startup paf file: Startup license file: Next startup license file: Startup patch package: Next startup patch package: Configuration Files: flash:/auto_V100R006C00.cc flash:/auto_V100R006C00.cc flash:/auto_V100R006C00.cc flash:/auto_V100R006C00.cfg flash:/auto_V100R006C00.cfg NULL NULL NULL NULL flash:/auto_V100R006C00.pat flash:/auto_V100R006C00.pat

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

19

Auto-Config Technology White Paper

1 Auto-Config

Configuration file of the DHCP relay agent

sysname DHCP Relay # vlan batch 10 # dhcp enable # interface Vlanif10 ip address 192.168.1.6 255.255.255.0 dhcp select relay dhcp relay server-ip 192.168.2.6 # interface GigabitEthernet0/0/1 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet0/0/2 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # interface GigabitEthernet0/0/3 port hybrid pvid vlan 10 port hybrid untagged vlan 10 # return # sysname DHCP Server # vlan batch 20 30 # dhcp enable Configuration file of the DHCP server

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

20

Auto-Config Technology White Paper

1 Auto-Config

# 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 ascii huawei option 143 ip-address 192.168.4.6 option 146 ascii opervalue=1;delay=0;netfile=lswnet.cfg; # interface Vlanif20 ip address 192.168.2.6 255.255.255.0 dhcp select global # interface Vlanif30 ip address 192.168.4.1 255.255.255.0 # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan 20 # interface GigabitEthernet0/0/2 port hybrid pvid vlan 30 port hybrid untagged vlan 30 # return

1.5 FAQ
Why the Auto-Config Function Does Not Take Effect When All Configurations Are Correct?
V100R005 A device without configuration can download the configuration file 5 minutes after it is started. The Auto-Config function allows a device to download a specified configuration file from the FTP or TFTP server using the Option 67 method or intermediate file method.

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

21

Auto-Config Technology White Paper

1 Auto-Config

If the configuration file is specified by Option 67, the configuration file will take effect a few minutes later. The time is determined by the size of the configuration file. If the configuration file is specified in the intermediate file, the configuration file will take effect about 2 hours later. Therefore, if you check the configuration immediately after a device is started, no configuration is displayed. The configuration file takes effect after a period of time. V100R006 In V100R006, the Auto-Config function is enhanced. You can set the delaytime parameter in DHCP Option 146 to specify the delay for the configuration file to take effect. The delay ranges from 0 to 86400 seconds. For example, if the delay is set to 7200 seconds, that is 2 hours. The configuration file takes effect 2 hours after it is downloaded. Run the display autoconfig-status command to view the current status of the Auto-Config process and how long the configuration file will take effect. <Quidway> display autoconfig-status Autoconfig is enabled. The current status of autoconfig is finish The status of DHCP phase: Operation result : -The status of getting system files phase: The mode of getting files: -Operation result : -Error reason : -Vrp File Name : -Operation result : -Error reason : -Pat File Name : -Operation result : -Error reason : -Web File Name : -Operation result : -Error reason : -The status of getting configuration phase: Cfg File Name : -Operation result : -Error reason : -The status of activating configuration phase: Remained time(s) : -Operation result : -During the delay, you can run the autoconfig activating-config delay command to change the delaytime value. If you run the autoconfig activating-config delay 0 command, the configuration file takes effect immediately. By default, the configuration file takes effect immediately after it is downloaded.

Issue 01 (2012-09-30)

Huawei Proprietary and Confidential Copyright Huawei Technologies Co., Ltd.

22