DHCP Service for Zero Touch Provisioning (ZTP) Setup

The ZTP process relies on a DHCP server to get devices registered with CVP. The DHCP server can be on the CVP, but is more commonly an external DHCP server.

  1. Ensure the DHCP server is installed (it is installed by default in CVP).
    rpm -qa | grep dhcp
    dhcp-common-4.1.1-43.P1.el6.x86_64
    dhcp-4.1.1-43.P1.el6.x86_64
  2. Edit the /etc/dhcp/dhcpd.conf file to include the option bootfile-name, which provides the location of the script that starts the ZTP process between CVP and the device.

    In this example, DHCP is serving the 172.31.0.0/16 subnet.

    Note: The 172.31.5.60 is the IP address of a CVP node, and it is recommended to use the HTTPS URL to point to the bootstrap file. This ensures that the specified devices, after they ZTP, will show up under the undefined container of the specified CVP.
    [root@cvp1-dhcp dhcp]# cat dhcpd.conf
    #
    # DHCP Server Configuration file.
    # see /usr/share/doc/dhcp*/dhcpd.conf.sample
    # see 'man 5 dhcpd.conf'
    #
    subnet 172.31.0.0 netmask 255.255.0.0 {
    range 172.31.3.212 172.31.5.214;
    option domain-name "sjc.aristanetworks.com";
    }
    host esx21-vm20 {
    option dhcp-client-identifier 00:0c:29:f9:21:99;
    fixed-address 172.31.3.211;
    option bootfile-name "https://172.31.5.60/ztp/bootstrap";
    }
    host esx21-vm22 {
    option dhcp-client-identifier 00:0c:29:d1:64:e1;
    fixed-address 172.31.3.213;
    option bootfile-name "https://172.31.5.60/ztp/bootstrap";
    }
  3. Restart the DHCP service after any configuration changes with the service dhcpd restart command.
  4. Configure dhcpd to start on system boot with the chkconfig dhcpd on command.
Related topics: