# Configuring Windows 2003 DHCP for PXE Clients

•
•
•
•
•
•

Today, I was lending a hand to one of our Linux admins who was trying to get his servers Kickstarted. For the uninitiated, Kickstart is the Linux equivalent to Windows RIS.

PXE stands for Pre-boot eXecution Environment. PXE clients (commonly known as “diskless workstations”) rely on DHCP to tell them where to go for their boot configuration and software. Windows 2003 can handle these requests, with a little bit of work.

Supporting PXE clients requires the following options:

003 Router (potentially, if resources you need are on a different subnet)

013 Boot File Size

043 Vendor Specific Info

060 ClassID

066 Boot Server Host Name

067 Bootfile Name

So, off you go to configure it. But wait, Windows 2003 DHCP doesn’t have option 060! What now?

Relax. Fortunately, there’s a way to configure the DHCP service to have this option.

On your DHCP server, open up a command prompt and launch netsh.

As you can see, the commands are:

C:>netsh
netsh> dhcp
netsh dhcp> server \\test
netsh dhcp server> add optiondef 60 ClassID String 0
netsh dhcp server> set optionvalue 60 STRING PXEClient

You can actually add any of the RFC options for DHCP through this context. Microsoft ships the basic ones, but with netsh, you can customize the DHCP service.

Then, restart the DHCP service. If you have the service and management console running while you do this, you’ll see “Unknown Option” when you look under server options.

Launch the DHCP Admin Console, and navigate to your scope (or server) options, depending on where you want to set your PXE boot options.

Right-click “Scope Options” (or “Server Options,” as appropriate) and select Configure Options.

Select option 013 Boot File Size, and enter the boot file size in 512 octet blocks. For example, if your boot file is 32KB, convert it to bytes (1024*32, which is 32768), and then divide that number by 512 (32768/512). Put the result (64) in the data field.

Select option 043 Vendor Specific Info and enter the following binay value:

01 04 00 00 00 00 ff

Select option 066 Boot Server Host Name and enter the IP address of the TFTP server hosting your boot image in the data field.

Select option 067 Bootfile Name and enter the name of the boot image that you wish to use.

Ensure your devices have PXE-enabled NICs (if you’re using newer servers, nearly all of them do) and boot. If you need help on setting up a TFTP Server on Windows 2003, look no further.