Before powering on a device that requires automatic deployment through ZTP, deploy a DHCPv4 server from which the device can obtain a device management IP address, gateway address, intermediate file server address, and intermediate file name.
In the DHCP discover phase, the device sends to the DHCPv4 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.
Option |
Mandatory or Optional |
Function |
---|---|---|
1 |
Mandatory |
Specifies the subnet mask of an IP address. |
3 |
Mandatory |
Specifies the egress gateway of a DHCP client. |
6 |
Optional |
Specifies the IP address of a DNS server. If a domain name (for example, www.ztp.com) is specified as the host name of an intermediate file server, deploy a DNS server to resolve the domain name to an IP address. If an IP address is specified as the host name of an intermediate file server, a DNS server does not need to be deployed. |
66 |
Optional |
Specifies the host name of the intermediate file server. An intermediate file server can be a TFTP, an FTP, or an SFTP server. The format of this field is as follows:
username, password, and port are optional. hostname can be a domain name or an IP address. If hostname is set to a domain name, a DNS server needs to be deployed. The value of port ranges from 0 to 65535. If the specified value is out of the range, the default value 22 is used. A port number can be configured only when hostname of an SFTP server is set to an IPv4 address. NOTE:
If hostname is set to an IP address, you do not need to set the file transfer type. The default file transfer type is TFTP. |
67 |
Mandatory |
Specifies the name of an intermediate file. The intermediate file name extension is .ini, .py, or .cfg.
|
150 |
Optional |
Specifies the IP address of a TFTP server. |
The IPv4 address lease that ZTP applies for through DHCPv4 is at least one hour and cannot be renewed.
If a ZTP device and DHCPv4 server reside on different network segments, deploy a DHCP relay agent to forward DHCP packets.
A router is used as a DHCPv4 server or relay agent example in the following procedures. If another type of device is used as the DHCPv4 server or relay agent, see the documentation of the corresponding product.