01-Fundamentals Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C Access Controllers Configuration Guides(E3703P61 R2509P61 R3709P61 R2609P61 R3509P61)-6W10201-Fundamentals Configuration Guide
09-Automatic Configuration
Title Size Download
09-Automatic Configuration 170.31 KB

Automatic configuration

Support for this feature depends on the device model. For more information, see About the H3C Access Controllers Configuration Guides.

Overview

Automatic configuration enables a device without any configuration file to automatically obtain and execute a configuration file during startup. Automatic configuration simplifies network configuration, facilitates centralized management, and reduces maintenance workload.

To implement automatic configuration, the network administrator saves configuration files on a server and a device automatically obtains and executes a specific configuration file.

Typical automatic configuration network

Figure 1 Network diagram

 

As shown in Figure 1, the device implements automatic configuration with the cooperation of the following servers: a DHCP server, a TFTP server, and a DNS server.

·     DHCP server—Assigns the device an IP address and other configuration parameters such as the configuration file name, TFTP server IP address, and DNS server IP address.

·     TFTP server—Saves files needed in automatic configuration. The device gets the files needed from the TFTP server, such as the host name file that saves mappings between host IP addresses and host names, and the configuration file.

·     DNS server—Resolves between IP addresses and host names. In some cases, the device resolves its IP address to the corresponding host name through the DNS server, and then uses the host name to request the configuration file with the same name (hostname.cfg) from the TFTP server. If the device gets the domain name of the TFTP server from the DHCP response, the device can also resolve the domain name of the TFTP server to the IP address of the TFTP server through the DNS server.

If the DHCP server, TFTP server, DNS server, and the device are not in the same network segment, configure the DHCP relay agent on the gateway, and configure routing protocols to enable each server and the device to reach one another.

How automatic configuration operates

1.     During startup, the device sets the first interface in up state as the DHCP client to request parameters from the DHCP server, such as an IP address and name of a TFTP server, IP address of a DNS server, and the configuration file name. If there are Layer 2 Ethernet interfaces in up state, the VLAN interface of the default VLAN of the Ethernet interfaces is selected as the first up interface. Otherwise, the up Layer 3 Ethernet interface with the smallest interface number is selected as the first up interface.

2.     After getting related parameters, the device sends a TFTP request to obtain the configuration file from the specified TFTP server and executes the configuration file. If the client cannot get such parameters, it uses factory default configuration.

To implement automatic configuration, you must configure the DHCP server, DNS server and TFTP server, but you do not need to perform any configuration on the device that performs automatic configuration. The configuration of these servers varies with device models and is not shown.

Before starting the device, connect only the interface needed in automatic configuration to the network.

Automatic-configuration work flow

Figure 2 shows the work flow of automatic configuration.

Figure 2 Automatic-configuration work flow

 

Using DHCP to obtain an IP address and other configuration information

Address acquisition process

As mentioned in "How automatic configuration operates," a device sets the first up interface as the DHCP client during startup. The DHCP client broadcasts a DHCP request, where the Option 55 field specifies the information the client wants to obtain from the DHCP server such as the configuration file name, domain name and IP address of the TFTP server, and DNS server IP address.

After receiving the DHCP response from the DHCP server, the device obtains the IP address and resolves the following fields in the DHCP response:

·     Option 67 or the file field—Obtains the configuration file name. The device resolves Option 67 first. If Option 67 contains the configuration file name, the device does not resolve the file field. If not, the device resolves the file field.

·     Option 66—Obtains the TFTP server domain name.

·     Option 150—Obtains the TFTP server IP address.

·     Option 6—Obtains the DNS server IP address.

If no response is received from the DHCP server, the device removes the temporary configuration and starts up with factory defaults.

The temporary configuration contains two parts: the configuration made on the interface through which automatic configuration is performed, and the ip host command in the host name file. The temporary configuration is removed by executing the corresponding undo commands.

For more information about DHCP, see Layer 3IP Services Configuration Guide. For more information about the ip host command, see Layer 3—IP Services Command Reference.

Principles for selecting an address pool on the DHCP server

The DHCP server selects IP addresses and other network configuration parameters from an address pool for clients. DHCP supports the following types of address pools:

·     Dynamic address pool—A dynamic address pool contains a range of IP addresses and other parameters that the DHCP server dynamically assigns to clients.

·     Static address pool—A static address pool contains the binding of an IP address and a MAC address (or a client ID). The DHCP server assigns the IP address of the binding and specific configuration parameters to a requesting client whose MAC address or ID is contained in the binding. In this way, the client can get a fixed IP address.

Select address pools by using one of the following methods:

·     If devices use the same configuration file, you can configure a dynamic address pool on the DHCP server to assign the devices IP addresses and the same configuration parameters (for example, configuration file name). In this case, the configuration file can only contain common configurations of the devices, and the specific configurations of each device must be performed in other ways. For example, the configuration file can enable Telnet and create a local user on devices so the administrator can Telnet to each device to perform specific configurations (for example, configure the IP address of each interface).

·     If devices use different configuration files, configure static address pools to make sure each device gets a fixed IP address and a specific configuration file. With this method, the administrator does not need to perform any other configuration for the devices.

To configure static address pools, you must obtain corresponding client IDs. To obtain a device's client ID, use the display dhcp server ip-in-use command to display address binding information on the DHCP server after the device obtains its IP address through DHCP.

Obtaining the configuration file from the TFTP server

A device can obtain the following files from the TFTP server during automatic configuration:

·     The configuration file specified by the Option 67 or file field in the DHCP response.

·     The host name file, which is named network.cfg. The host name file stores mappings between IP addresses and host names.

For example, the host name file can include the following:

 ip host host1 101.101.101.101

 ip host host2 101.101.101.102

 ip host client1 101.101.101.103

 ip host client2 101.101.101.104

 

IMPORTANT

IMPORTANT:

·     There must be a space before the keyword ip and keyword host.

·     The host name of a device saved in the host name file must be the same as the configuration file name of the device, and can be identical with or different from the host name saved in the DNS server.

 

·     The configuration file of a device is named hostname.cfg, where hostname is the host name of the device. For example, if the host name of a device is aaa, the configuration file of the device is named aaa.cfg.

·     The default configuration file is named device.cfg.

Obtaining the configuration file

Figure 3 Obtaining the configuration file

 

A device obtains its configuration file by using the following work flow:

·     If the DHCP response contains the configuration file name, the device requests the specified configuration file from the TFTP server.

·     If not, the device tries to get its host name from the host name file obtained from the TFTP server. If it fails, the device resolves its IP address to the host name through DNS server. Once the device gets its host name, it requests the configuration file with the same name from the TFTP server.

·     If all the previous operations fail, the device requests the default configuration file from the TFTP server.

TFTP request sending mode

The device selects to unicast or broadcast a TFTP request using the following flow:

·     If a legitimate TFTP server IP address is contained in the DHCP response, the device unicasts a TFTP request to the TFTP server.

·     If not, the device resolves the TFTP server domain name contained in the DHCP response to the corresponding IP address through the DNS server. If successful, the device unicasts a TFTP request to the TFTP server. If not, the device broadcasts a TFTP request.

·     If the IP address and the domain name of the TFTP server are not contained in the DHCP response or they are illegitimate, the device broadcasts a TFTP request.

After broadcasting a TFTP request, the device selects the TFTP server that responds first to obtain the configuration file. If the requested configuration file does not exist on the TFTP server, the request operation fails, and the device removes the temporary configuration and starts up with factory defaults.

If the device and the TFTP server reside in different subnets, configure the UDP Helper function for the gateway to change the broadcast TFTP request from the device to a unicast packet and forward the unicast packet to the specified TFTP server. For more information about UDP Helper, see Layer 3—IP Services Configuration Guide.

Executing the configuration file

After obtaining the configuration file, the device removes the temporary configuration and executes the configuration file. If no configuration file is obtained, the device removes the temporary configuration and starts up with factory defaults.

The configuration file is deleted after executed. Save the configuration by using the save command. Otherwise, the device has to perform automatic configuration again after reboot. For more information about the save command, see Fundamentals Command Reference.

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网