24.2. Configuring DHCP for Diskless Clients

Prerequisites

Procedure

  1. After configuring a tftp server, you need to set up a DHCP service on the same host machine. See the Configuring a DHCP Server chapter of the Red Hat Enterprise Linux 7 Networking Guide for instructions on how to set up a DHCP server.
  2. Enable PXE booting on the DHCP server. To do this, add the following configuration to /etc/dhcp/dhcp.conf:
    allow booting;
    allow bootp;
    class "pxeclients" {
       match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
       next-server server-ip;
       filename "pxelinux.0";
    }
    • Replace server-ip with the IP address of the host machine on which the tftp and DHCP services reside.

    Note

    When libvirt virtual machines are used as the diskless client, libvirt provides the DHCP service and the stand alone DHCP server is not used. In this situation, network booting must be enabled with the bootp file='filename' option in the libvirt network configuration, virsh net-edit.

Next Steps

Now that tftp and DHCP are configured, all that remains is to configure NFS and the exported file system; refer to Section 24.3, “Configuring an Exported File System for Diskless Clients” for instructions.