DHCP-settings for use with gPXE

Jurjen Bokma

December 2009

Table of Contents

To boot and install PC's through PXE, one can use gPXE. I created a demo showing this. To use that demo, one needs a DHCP server. Installing a DHCP server is left as an exercise to the reader, but the gPXE-specific configuration is described here.

The Windows 2008 Server case

In order to enable the Windows admin to deploy Linux boxes without any Linux knowledge whatsoever, I installed MS Windows 2008 Server, turned on the DHCP service, and configured it to use the Gryplet demo:

  1. In the Control Panel, click on the Administrative Tools icon. This will open the DHCP Console. (If it is really called that. It's just the DHCP service settings dialog.)

  2. Expand the tree in the left pane, and right-click the IPv4 map. Select Define User Classes....

    Figure 1.  Adding a User Class to DHCP
    Screenshot from Windows 2008 Server

  3. The User Class ID should be gPXE (the name and description are not important).

    Figure 2.  Setting the DHCP User Class ID
    Screenshot from Windows 2008 Server

  4. When the PC boots, it must be told what file to load into the PXE environment and run, and where to fetch that file from. So close the User Class dialog, and in the DHCP console, rightclick on the Scope Options, then in the Scope Options click the advanced tab.

    Now for the User Class Default User Class, fill in the options 66 (Boot Server Host Name) and 67 (Bootfile Name).

    • Boot Server Host Name is the server to fetch the PXE bootstrap from. In the Gryplet demo, this is cit-zb-3-190.rc.rug.nl, or if you are not sure your DNS is working

    • Bootfile Name is the file to fetch (from the server mentioned in the previous item). This is undionly.kpxe. That file is fetched using the TFTP protocol. So if your network's firewall blocks TFTP (port 69) access from the PC you are trying to boot to the host you fill in at Boot Server Host Name, then things are not going to work.

    Figure 3.  Setting the Bootfile Name in the Default User Class
    Screenshot from Windows 2008 Server

  5. Once the 'undionly.kpxe' file the client just fetched is running, it will (again) ask the DHCP server what to do. The client will identify its stage with the DHCP User Class identifier 'gPXE', and this time the server should not tell it to fetch undionly.kpxe, but a configuration file that the Gryplet demo generates. So under the User Class gPXE, fill in options 66 and 67 differently:

    Figure 4.  Setting the Bootfile Name in the gPXE User Class
    Screenshot from Windows 2008 Server

  6. You can now boot a PC in the range you just configured, and have it bot from the network. It will try to boot from the Gryplet server.