No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CX11x, CX31x, CX710 (Earlier Than V6.03), and CX91x Series Switch Modules V100R001C10 Configuration Guide 13

The documents describe the configuration of various services supported by the CX11x&CX31x&CX91x series switch modules The description covers configuration examples and function configurations.
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring an Unconfigured Device to Implement Automatic Deployment Through DHCP

Configuring an Unconfigured Device to Implement Automatic Deployment Through DHCP

Pre-configuration Tasks

Before configuring ZTP, complete the following tasks:
  • Configuring routing to ensure that the DHCP server, file server, and unconfigured devices have reachable routes to each other

  • Ensuring that the unconfigured devices have no configuration file

Configuration Process

The configuration tasks Editing an Intermediate File, Configuring the DHCP Server or DHCP Relay Agent, and Configuring the File Server are mandatory and can be performed in any sequence. After completing the preceding configuration tasks, power on the device, and the device starts the ZTP process.

Editing an Intermediate File

Background

An intermediate file can be an .ini file or a Python script. You can choose a file type as required. See INI File and Python Script for the file formats.

If unconfigured devices are required to set up a stack after they complete automatic deployment, use the Python script as the intermediate file. The .ini file does not support stack setup.

Procedure

  1. Edit the intermediate file according to the file type and format.
  2. (Optional) Edit the stack member ID file for stack setup and the MD5 code file for file verification. See Automatic Stacking in ZTP and Checking the Integrity of Version Files for formats of the two files.

Configuring the DHCP Server or DHCP Relay Agent

Context

Before powering on an unconfigured device, deploy a DHCP server from which the unconfigured device can obtain the IP address, gateway address, intermediate file server address, and intermediate file name.

The device sends to the DHCP server a DHCP discover packet that carries DHCP Option 60 and Option 61. Option 60 (Vendor class identifier) records the device manufacturer and model, and Option 61 (Client-identifier) records the device ESN and MAC address.

Table 1-14 describes options that need to be configured on the DHCP server.
Table 1-14 Description of options

Option

Mandatory or Optional

Function

1

Mandatory

Specifies the subnet mask of the IP address.

3

Mandatory

Configures the egress gateway of the DHCP client.

6

Optional

Specifies the IP address of the DNS server. If you configure the domain name of the intermediate file server (for example, www.ztp.com) as its host name, deploy a DNS server to resolve the domain name to the corresponding IP address. If you configure the IP address of the intermediate file server as its host name, you do not need to deploy a DNS server.

66

Optional

Specifies the host name of the intermediate file server. An intermediate file server can be a TFTP, an FTP, SFTP, or HTTP server. The format of this field is as follows:
  • tftp://hostname

  • ftp://[username[:password]@]hostname[:port]

  • sftp://[username[:password]@]hostname[:port]

  • http://hostname[:port]

The value of hostname can be a domain name or an IP address. If hostname is set to a domain name, a DNS server is required.

67

Mandatory

Specifies the name of the intermediate file. The intermediate file name can be *.ini or ,*.py, and has a maximum length of 255 bytes.

The file name format is path/filename, in which path can contain or does not contain the host name of the file server. For exmaple, the file name can be script/ztp_script.py without a host name or http://10.13.78.24:8080/script/ztp_script.py containing the host name. If the path without a host name is used, you must configure Option 66 on the DHCP server.

150

Optional

Specifies the IP address of the TFTP server.

  • The DHCP client must apply for an IP address lease longer than 1 hour.

  • If the unconfigured device and DHCP server are in different network segments, configure a DHCP relay agent to forward DHCP packets exchanged between them.

  • In following procedures, DHCP server and relay agent are CX11x&CX31x&CX710&CX91x Seriesswitch modules. If a device of a different type serves as the DHCP server or relay agent, see the documentation of the corresponding product for configuration details.

Procedure

  1. Perform the following steps on the DHCP server:
    1. Run the system-view command to enter the system view.
    2. Run the dhcp enable command to enable DHCP.
    3. Run the ip pool ip-pool-name command to create a global address pool and enter its view.
    4. Run the network ip-address [ mask { mask | mask-length } ] command to specify the range of IP addresses allocated to DHCP clients.
    5. Run the gateway-list ip-address &<1-8> command to set a gateway address for DHCP clients.
    6. Run the option code [ sub-option sub-code ] { ascii ascii-string | hex hex-string | cipher cipher-string | ip-address ip-address &<1-8> } command to configure DHCP option fields.

      See Table 1-14 for DHCP options to be configured.

      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.

    7. Run the commit command to commit the configuration.
  2. (Optional) Perform the following steps on the DHCP relay agent:

    If the unconfigured device and DHCP server are in different network segments, configure a DHCP relay agent to forward DHCP packets exchanged between them.

    1. Run the system-view command to enter the system view.
    2. Run the dhcp enable command to enable DHCP.
    3. Run the interface interface-type interface-number command to enter the interface view.
    4. On an Ethernet interface, run:

      undo portswitch

      The interface is switched to Layer 3 mode.

      By default, an Ethernet interface works in Layer 2 mode.

      If an Ethernet interface already has Layer 2 configuration, this command fails to be executed on the interface. Before running this command on the interface, delete all the Layer 2 configuration of the interface.

      If many Ethernet interfaces need to be switched to Layer 3 mode, run the undo portswitch batch interface-type { interface-number1 [ to interface-number2 ] } &<1-10> command in the system view to switch these interfaces to Layer 3 mode in batches.

    5. Run the ip address ip-address { mask | mask-length } command to configure an IP address for the interface.
    6. Run the dhcp select relay command to enable the DHCP relay function.
    7. Run the dhcp relay binding server ip ip-address command to specify the DHCP server IP address on the DHCP relay agent.
    8. Run the commit command to commit the configuration.

Configuring the File Server

Context

A file server saves the files to be downloaded to unconfigured devices, including the intermediate file and version files. You can use a switch as the file server. A file server must have sufficient space to save files. Before configuring a switch as a file server, ensure that its storage space is sufficient for the files. Usually, a third-party server is deployed on the ZTP network to serve as the file server. For the configuration procedure, see the manual of the third-party server.

  • The version file server and the intermediate file server can be deployed on the same server.

  • A file server can be a TFTP, an FTP, SFTP, or HTTP server. The HTTP server supports concurrent access of multiple users.

  • The file server and unconfigured devices must have reachable routes to each other.

Follow-up Procedure

After configuring the file server, save the intermediate file and version files to the working directory of the file server. If the stack member ID file or MD5 check file exists, you also need to save the file to the file server.

  • Before uploading files to the file server, ensure that the working directory of the file server has sufficient space for the files.

  • To ensure security of the file server, configure a unique user name for the file server and assign read-only permission to the user to prevent unauthorized modification to the files. After the ZTP process is complete, disable the file server function.

Powering on the Device

Context

After completing the preceding configuration, restore the recovery mode of the device to be configured to asynchronous, and then power on the unconfigured device. The device then automatically downloads version files and restarts to complete automatic deployment.

Procedure

  1. Power on the device.

Checking the Configuration

Procedure

  1. The device completes the ZTP process 15 minutes after it is powered on. Then you can log in and run the display startup command to check whether the startup files are the required ones.
  2. If automatic deployment fails, analyze ZTP logs on the device to find out the causes.

    ZTP logs are saved to the file named ztp_YYYYMMHHMMSS.log in the directory flash:/.

Translation
Download
Updated: 2019-12-13

Document ID: EDOC1000041694

Views: 60749

Downloads: 3623

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next