01-Fundamentals Configuration Guide

HomeSupportSwitchesH3C S12500 Switch SeriesConfigure & DeployConfiguration GuidesH3C S12500 Configuration Guides-Release7374-6W73101-Fundamentals Configuration Guide
10-Automatic configuration
Title Size Download
10-Automatic configuration 160.8 KB

With the automatic configuration feature, the device can automatically obtain a set of configuration settings from some servers when it starts up without a configuration file. This feature simplifies network configuration and maintenance.

Understanding automatic configuration

The automatic configuration feature requires the cooperation of the following servers: a DHCP server, a TFTP server, and a DNS server, as shown in Figure 1.

Figure 1 Typical automatic configuration network diagram

 

When the device is powered on without a configuration file, it automatically starts the automatic configuration process to try to obtain a set of configuration settings. If one attempt fails, the device waits 30 seconds, and then starts the process again for another try. The device continues to make attempts until it obtains a set of configuration settings or it is powered off.

Overall automatic configuration process

As shown in Figure 2, the automatic configuration process includes the following steps:

1.     The device selects an interface for automatic configuration. For more information, see "Interface selection process."

2.     After finding an interface, the device enables the DHCP client on the interface and tries to obtain parameters for automatic configuration from a DHCP server.

Parameters for automatic configuration might include:

¡     A temporary IP address.

¡     A configuration file name.

¡     A TFTP server domain name.

¡     A TFTP server IP address.

¡     A DNS server IP address.

For more information, see "Automatic-configuration parameter acquisition process."

3.     After obtaining automatic configuration parameters, the device tries to download a configuration file from a TFTP server. For more information, see "Configuration file acquisition process."

4.     If the device obtains a configuration file, it deletes its temporary settings to restore the factory defaults and executes the configuration file. Otherwise, the device deletes its temporary settings and stays quiet for 30 seconds. Then, the device tries again for automatic configuration by selecting another qualified interface and repeating Step 2 to Step 4. To stop the automatic configuration process, press Ctrl+D at the CLI of the device.

 

IMPORTANT

IMPORTANT:

·     To ensure quick and successful automatic configuration of a device, connect only the interface used for automatic configuration to the network.

·     The device does not save the obtained configuration file. To use the configuration after a reboot, save the running configuration by using the save command. Otherwise, the device has to perform automatic configuration again after a reboot. For more information about the save command, see Fundamentals Command Reference.

 

Figure 2 Automatic configuration workflow

 

Interface selection process

The device follows the following process to select an interface for automatic configuration:

1.     Searches for a management Ethernet interface that is up at Layer 2. If an interface is found, the device uses the interface for automatic configuration and quits the process.

2.     Searches for a Layer 2 Ethernet interfaces in up state. If one or more interfaces are found, the device uses the VLAN interface of the default VLAN for automatic configuration and quits the process.

3.     Searches for all Layer 3 Ethernet interfaces in up state. If one or more interfaces are found, the device sorts them in the dictionary order of the interface types and then in ascending order of interface numbers. The device uses the first interface for automatic configuration.

Figure 3 Interface selection process

 

Automatic-configuration parameter acquisition process

After the device finds an interface for automatic configuration, it enables the DHCP client on the interface. Then, the DHCP client broadcasts a DHCP request to locate a DHCP server and request configuration settings. The DHCP request uses DHCP Option 55 to indicate the configuration settings the device requires, including the following items:

·     The configuration file name.

·     The TFTP server domain name.

·     The TFTP server IP address

·     The DNS server IP address.

After receiving a DHCP reply, the device resolves the packet for the assigned IP address. If the reply provides an IP address, the device continues to examine the following options or fields in the DHCP reply:

·     Option 67 or the file field—Carries the configuration file name. The device resolves Option 67 first. If Option 67 does not contain the configuration file name, the device resolves the file field.

·     Option 150—Carries the TFTP server IP address. If this option contains a valid TFTP server IP address, the device starts the configuration file acquisition process. Otherwise, the device resolves Option 66.

·     Option 66—Carries the TFTP server domain name. If Option 150 does not contain a TFTP server IP address, the device resolves this option for a TFTP server domain name and tries to communicate with the DNS server indicated by Option 6 to obtain the TFTP server IP address.

·     Option 6—Carries the DNS server IP address.

For more information about DHCP, see Layer 3—IP Services Configuration Guide.

Configuration file acquisition process

During the automatic-configuration parameter acquisition process, the device might or might not obtain a TFTP server IP address.

·     If the device obtained a TFTP server IP address, it starts the configuration file acquisition process by unicasting a request to the TFTP server.

·     If the device did not obtain a TFTP server IP address, the device starts the configuration file acquisition process by broadcasting a request. In this case, the device resolves only the first reply.

As shown in Figure 4, the device determines what to request from the TFTP server based on whether or not it obtained a configuration file name during the automatic-configuration parameter acquisition process.

·     If the device obtained a configuration file name, it requests the specified configuration file.

·     If the device did not obtain a configuration file name, it requests a configuration file named in the host name.cfg format from the TFTP server, where host name represents the host name of the device. To do so, the device first requests the host name file network.cfg, which contains mappings between IP addresses and host names. If the device fails to obtain the host name file or the file contains no entry for the device's temporary IP address, it tries to communicate with a DNS server to resolve the temporary IP address to a host name. After the device obtains the host name, it tries to obtain the configuration file for the host name.

If the device fails to obtain a configuration file specific for itself, it requests the default configuration file device.cfg from the TFTP server.

Figure 4 Configuration file acquisition process

 

Deploying and configuring servers for automatic configuration

To implement automatic configuration, you do not need to perform any configuration on the device. However, you must deploy DHCP, TFTP, and DNS servers and configure the servers to cooperate with the device as follows:

·     DHCP server—Assigns the device a set of parameters for automatic configuration, which might include the following items:

¡     A temporary IP address.

¡     A configuration file name.

¡     A TFTP server domain name.

¡     A TFTP server IP address.

¡     A DNS server IP address.

For more information about the DHCP server, see Layer 3—IP Services Configuration Guide.

·     TFTP server—Stores files required for device automatic configuration, including the configuration files and host name files. For more information about the TFTP server, see "Configuring TFTP."

·     DNS server—Resolves the device's temporary IP address to its host name so the device can request a configuration file named in the host name.cfg format from the TFTP server. The DNS server might also need to resolve the TFTP server domain name to the TFTP server IP address. For more information about the DNS server, see Layer 3—IP Services Configuration Guide.

If the DHCP server, the TFTP server, the DNS server, and the device reside on different network segments, you must perform the following tasks:

·     Configure the DHCP relay agent on the gateway.

·     Configure routing protocols to make sure the servers have routes to the device and vice versa.

A configuration file for automatic configuration can be in the form of a .cfg file, a Python script, or a Tcl script. In addition to automatic configuration, a script can be used for automatic software update. To automatically configure commands that require a device reboot to take effect, for example, system-working-mode, use a Python or Tcl script. For more information about Tcl scripts, see "Using Tcl." For more information about Python scripts, see "Using Python."

DHCP server configuration guidelines

When you configure the DHCP server, follow these guidelines:

·     If the devices on a network segment share the same configuration file, configure dynamic address allocation on the connected interface of the DHCP server.

·     If the devices on a network segment share most of their configurations, configure dynamic address allocation on the connected interface of the DHCP server. You can put the configurations that the devices share to the configuration file, and provide a method for the device administrators to change the configurations after their devices start up. For example, you can use a configuration file to enable the Telnet service and create a local user, so administrators can Telnet to their devices to perform specific configurations after their devices start up.

·     If the devices on a network segment require different configurations, configure static address allocation on the connected interface of the DHCP server. This method allows you to have a separate configuration file for each device.

Before you configure a static binding for a device, you must obtain the client ID of the device. To do so, you can ask the device administrator for the client ID or use the following procedure to view the client ID:

a.     Configure dynamic address allocation on the DHCP server's interface that is connected to the client.

b.     Ask the device administrator to power on the device.

c.     Execute the display dhcp server ip-in-use command on the DHCP server to view the client ID of the device after the device starts up.

After you complete the static binding configuration, ask the device administrator to power off the device and then power it on. The device then obtains the IP address and configuration parameters you configured for it.

TFTP server configuration guidelines

Create configuration files and host name files required for device automatic configuration on the TFTP server, including the default configuration file device.cfg. For simple file name identification, use configuration file names that do not contain spaces.

To use the host name file network.cfg, perform the following tasks:

·     Create a configuration file for each device on the TFTP server.

·     Name the file in the host name.cfg format.

·     Add a mapping entry in the ip host host-name ip-address format for the host name file.

For example:

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

If a device resides in a network different than the TFTP server, configure the UDP helper feature on the gateway. The gateway then changes the broadcast TFTP request from the device to a unicast packet and forwards the unicast packet to the TFTP server. For more information about UDP helper, see Layer 3—IP Services Configuration Guide.

 

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