DHCP Configuration of ZTP

Option Parameters

The DHCP server obtains network configuration information required by ZTP through option parameters. The request packets sent by DHCP client carry option 55, and the reply packets responded by DHCP server carry option 7, 66 and 67. The function of option parameters is shown as below.

Table 1. Option description

Option

Description

Carrier

Option

Description

Carrier

55

Specifies the network configuration parameters need to be obtained from the server. It includes the boot file name, TFTP server address, Syslog server address and gateway.

Client

7

Specifies the IP address of Syslog server.

Server

66

Specifies the IP address of TFTP(HTTP) server allocated for the client.

Server

67

Specifies the boot file name allocated for the client.

Server

DHCP Server Configuration

When the switch is served as the DHCP server, you can configure the DHCP server through PicOS commands (suggested) or Linux commands.

PicOS command

Here is an example of configuring the DHCP server through PicOS commands, which specifies the IP address of Syslog server as 192.168.10.1, the IP address of TFTP server as 192.168.10.1, and the working path of provision script on the TFTP server as ./provision.sh. For detailed information of related commands, see Configuring DHCP server.

admin@PICOS# set protocols dhcp server pool pool1 log-server 192.168.10.1 admin@PICOS# set protocols dhcp server pool pool1 tftp-server 192.168.10.2 admin@PICOS# set protocols dhcp server pool pool1 bootfile-name file-path ./provision.sh admin@PICOS# commit

Linux command

Here is an example of configuring the DHCP server through Linux commands.

host pica8-pxxxx {*************************//////////////////////////////////////////////////////////////////////////////////////// hardware ethernet 08:9e:01:62:d5:62; option bootfile-name "pica8/provision.script"; option tftp-server-name "xx.xx.xx.xx"; option log-servers xx.xx.xx.xx; fixed-address xx.xx.xx.xx; }

The elements of the segment above are described below:

  • host: the host name of the PicOS switch.

  • hardware ethernet: the MAC address of the PicOS switch.

  • bootfile-name: the file name of the shell scripts and its path relative to the TFTP root directory.

  • tftp-server-name: the IP address of the TFTP server.

  • log-servers: the IP address of the log server that will receive logs from ZTP.

  • fixed-address: optional. Configure a fixed IP address as management IP of the switch.

PicOS switches send a vendor-class-identifier to the DHCP server in the format of pica8-pxxxx where xxxx is the switch model. It is possible for the customer to use the vendor-class-identifier to identify PicOS switches.

Copyright © 2024 Pica8 Inc. All Rights Reserved.