Using the Microsoft DHCP server

The Microsoft DHCP server is the default DHCP server on Microsoft Windows. It can be configured to support iPXE. It cannot easily be used to support some of the more advanced iPXE options; if you have the choice then you may find it easier to use ISC dhcpd.

The Microsoft DHCP server is configured using the DHCP MMC plug-in. Go to StartAdministrative ToolsDHCP:

The Microsoft DHCP server

Right-click on Server Options and choose Configure Options. You can instruct iPXE to boot using the 067 Bootfile Name option. For example, to instruct iPXE to boot the demonstration image from http://boot.ipxe.org/demo/boot.php, you can scroll down to option 067 Bootfile Name and set it to http://boot.ipxe.org/demo/boot.php:

Setting the boot filename

To boot from a SAN, you must use the 017 Root Path option instead of the 067 Bootfile Name option:

Setting the root-path

PXE chainloading

To use PXE chainloading, you need to set up the Microsoft DHCP server to hand out undionly.kpxe to legacy PXE clients, and then hand out the “real” boot configuration only to iPXE clients. You can do this by telling the Microsoft DHCP server to use different configurations based on the DHCP user class.

First, define a user class for iPXE. Right-click on your DHCP server and choose Define User Classes:

Defining a DHCP User Class

Click on Add to add a new user class. Set the display name to iPXE, the description to iPXE clients, and the ID to iPXE:

Defining the iPXE DHCP User Class

Right-click on Server Options and choose Configure Options. Scroll down to option 067 Bootfile Name and set it to undionly.kpxe:

Setting the chainloading boot filename

Right-click on Policies and choose New Policy. Create a policy with a single condition that User Class is equal to iPXE:

Setting the policy condition

In the Configure settings for the policy page, scroll down to option 067 Bootfile Name and set it to http://my.web.server/real_boot_script.php:

Setting the policy filename

If everything has worked, then you should see a policy which will set the Boot Filename to http://my.web.server/real_boot_script.php if the User Class is equal to iPXE:

Completed iPXE policy

This will ensure that the iPXE image (undionly.kpxe) is handed out only when the DHCP request comes from a legacy PXE client. Once iPXE has been loaded, the DHCP server will direct it to boot from http://my.web.server/real_boot_script.php. (You should replace http://my.web.server/real_boot_script.php with whatever you want iPXE to boot from.)

Older Windows versions

If you are using Windows Server 2008, then you cannot create a policy as described above. Instead, right-click on Server Options and choose Configure Options. On the Advanced tab, select iPXE from the User class drop-down list. Scroll down to option 067 Bootfile Name and set it to http://my.web.server/real_boot_script.php:

Setting the boot filename for iPXE clients

If everything has worked, then you should see two settings for 067 Bootfile Name in your DHCP configuration: one containing undionly.kpxe and one containing http://my.web.server/real_boot_script.php:

A working chainloading DHCP configuration

(You should replace http://my.web.server/real_boot_script.php with whatever you want iPXE to boot from.)

howto/msdhcp.txt · Last modified: 2016/07/06 10:53 by mcb30
Recent changes RSS feed CC Attribution-Share Alike 4.0 International Driven by DokuWiki
All uses of this content must include an attribution to the iPXE project and the URL https://ipxe.org
References to "iPXE" may not be altered or removed.