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 Start → Administrative Tools → DHCP:
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
:
To boot from a SAN, you must use the 017 Root Path option instead of the 067 Bootfile Name option:
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:
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
:
Right-click on Server Options and choose Configure Options. Scroll down to option 067 Bootfile Name and set it to undionly.kpxe
:
Right-click on Policies and choose New Policy. Create a policy with a single condition that User Class is equal to iPXE:
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
:
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
:
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.)
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
:
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
:
(You should replace http://my.web.server/real_boot_script.php
with whatever you want iPXE to boot from.)