DHCP and the PXE Boot Process Explained

Explaining how the DHCP and PXE Boot process works

DHCP and the PXE Boot Process Explained
DHCP and the PXE Boot Process Explained

Recently I came across a scenario where we had to troubleshoot why a laptop wasn't rebuilding via Microsoft Endpoint Configuration Manager (MECM), formerly System Center Configuration Manager (SCCM). I thought it would be good to write an article explaining the Preboot Execution Environment (PXE) boot process and how Dynamic Host Configuration Protocol (DHCP) is linked to that.

Basic DHCP Process

The simplest of DHCP processes goes as follows:

  • The client connects to the network and sends out a DHCP broadcast
  • The DHCP server picks up the broadcast
  • The server then replies with a suggested IP address
  • The client then acknowledges the server and uses the provided address

PXE Boot Process

When the client initiates a PXE boot (by traditionally pressing F12), however, the process is changed slightly:

  • The client sends a DHCP broadcast and states it needs PXE boot.
  • The DHCP server picks up this broadcast and replies with a suggested IP address to use.  If the server has the information on how to PXE boot, that information is included in its reply.
  • The client then replies to the server and uses the provided address.
  • Then the client contacts the PXE boot server (traditionally a WDS server or SCCM server) and requests the boot file that it received from the DHCP server.
  • The file is then loaded and launched on the client.

Typically Option 66 or Option 67 are set within your DHCP scope options, or DHCP Helpers are configured within your router for the above process to work.

Option 66 specifics which server to contact, and 67 is the name of the file to request.  I recently wrote an article on how to set the DHCP options within a Windows Server via Powershell cmdlets.

Dynamic PXE Boot

Another method of providing the boot information to a client is to have a service listen to the DHCP request.  Configuration Manager provides dynamic PXE boot using the Windows Deployment Service (WDS).

  • The client connects to the network and sends out a DHCP broadcast.
  • The DHCP server picks up this broadcast and replies with a suggested IP address to use.
  • The WDS service also replies to the client with the necessary information to PXE boot.
  • The client replies to the DHCP server and uses the suggested address.
  • The client also contacts the PXE boot server and requests the boot file specified in the boot information it was sent.
  • The file is then loaded and launched on the client.

Below is a diagram of what your network might look like in the above scenario:

DHCP and the PXE Boot Process Explained

DHCP Options vs IP Helpers

There's long been a debate about which method to direct your clients to your PXE boot server.

Microsoft has long stated that they do not recommend or support the use of DHCP scope options as the method of redirection and prefer you update your router's IP helper table with the necessary information. Using the DHCP options limits your options as you can only specify one server and one Network Boot Program (NBP) file.

Only being able to specify one NBP file can cause issues in environments where both legacy and UEFI clients are being used. Within a routed environment, I prefer to use IP helper options configured at the router level as it provides much more flexibility and is the Microsoft-supported method.

Conclusion

The above only covers simple environment solutions, but hopefully, it helps you understand the process and understand where you would need to look to troubleshoot any issues.