How to configure the Microsoft DHCP server for PXE?

Configuring Microsoft DHCP server

To boot the computers, you will have to configure the DHCP server in one of the boot modes (Legacy BIOS or UEFI). If all the computers in your network is supporting a single boot type, it is enough if you configure the DHCP server only for a single boot mode. If you want to deploy OS to multiple boot-type computers, a few computers will require UEFI  (secure and unsecure) boot mode and a few computers will require Legacy BIOS boot mode. In this case, you will have to configure the DHCP server for multiple boot modes. OS Deployer supports automated DHCP server configuration and you can also manually configure the same.

Automatic configuration

OS Deployer allows users to automatically configure the Microsoft DHCP server using the PXE troubleshooting tool.

Manual configuration

This document will explain the steps to configure DHCP only for a single boot mode and configure DHCP for multiple boot mode.

  1. Configuring DHCP only for a single boot mode. (Legacy BIOS or UEFI)
  2. Configuring DHCP for multiple boot modes. (Secure UEFI, UEFI, and Legacy BIOS)

Configuring DHCP only for a single boot mode. (Legacy BIOS or UEFI) 

To configure the DHCP server on Legacy BIOS mode, follow the steps given below,

  1. Go to the machine where the DHCP server is running.
  2. Open Server manager and select DHCP from the left side.
  3. Right-click on the DHCP server and select DHCP Manager. The DHCP console will open now.
  4. Double-click DHCP server and select your network IP version (IPv4/ IPv6).
  5. Right-click on Server Options and select Configure options.
  6. Under the General tab,
    • Enable 066 Boot Server Host Name and enter the string value as the IP address of the machine where the Endpoint Central server is installed. If you are deploying OS in a remote office, enter the string value as the IP address of the machine where the distribution server of that remote office is installed. 
    • Enable 067 Bootfile Name and enter the string value as boot\pxeboot.n12 to boot machines via legacy BIOS. 
    • To boot the machines via UEFI mode, for 64-bit computers enter the string value as EFI\Boot\bootx64.efi and for 32-bit computers, enter the string value as EFI\Boot\bootia32.efi. Now click Apply and OK.
  7. If you have defined scope (IP address) within your network, configure scope options by following the steps given below, (**this step is optional based on the requirement)
    • Double-click on Scope and right click on Scope Options and select Configure Options.
    • Under the General tab, Enable 066 Boot Server Host Name and enter the string value as the IP address of the machine where the Endpoint Central server is installed. If you are deploying OS in a remote office, enter the string value as the IP address of the machine where the distribution server of that remote office is installed. 
    • Enable 067 Bootfile Name and enter the string value as boot\pxeboot.n12. Now click Apply and OK.

Note: If there is any difference between the scope and server options, the scope option will be taken into consideration when the machine is within the scope.

Configuring DHCP for multiple boot modes. (Secure UEFI, UEFI, and Legacy BIOS)

Note: The DHCP vendor classes and policies configuration is not available for Windows Server 2010 and below. 

To configure the DHCP server for both UEFI and Legacy BIOS mode, follow the steps given below,

  1. Step 1: Create Custom Vendor Classes for Use with your DHCP Policy
  2. Step 2: Creating Custom DHCP Policies
  3. Step 3: Remove Default PXE Options

1) Creating Custom Vendor Classes

Custom Vendor Classes are detection methods used to determine how the target computers are requesting to boot an image from the DHCP server. It is required to create three classes for three different boot modes: Legacy BIOS (32 and 64bit), UEFI (32bit), and UEFI (64bit). Follow the steps given below to create three classes,

  1. Open the DHCP Console and expand the IPv4 Node
  2. Right-Click on ‘IPv4 Node’ and select ‘Define Vendor Classes’
  3. Click ‘Add’
  4. Create the UEFI 64-Bit Vendor class by entering the following information:
    • DisplayName: PXEClient (UEFI x64)
    • Description: PXEClient:Arch:00007
    • ASCII: PXEClient:Arch:00007
  5. Click ‘OK’
  6. Click ‘Add’
    • DisplayName: PXEClient (UEFI x86)
    • Description: PXEClient:Arch:00006
    • ASCII: PXEClient:Arch:00006
  7. Click ‘OK’
  8. Click ‘Add’
    • DisplayName: PXEClient (BIOS x86 & x64)
    • Description: PXEClient:Arch:00000
    • ASCII: PXEClient:Arch:00000
  9. Click ‘OK’

2) Creating Custom DHCP Policies

The next step is to create custom DHCP policies for the created vendor classes.

UEFI 64-Bit DHCP Policy

  1. Right-Click ‘Policies’ and click ‘New Policy’
  2. Give the policy a unique name that coincides with your vendor class naming scheme:
    • PolicyName: PXEClient (UEFI x64)
    • Description: Delivers the correct bootfile for (UEFI x64)
  3. Click ‘Next’
  4. On the ‘Configure Conditions for the policy’ page click ‘add’
  5. Select the ‘Value’ drop-down box and select the PXEClient (UEFI x64) vendor class that you created in previous steps
  6. Ensure that you check the box ‘Append wildcard(*)’
  7. Select ‘Add’
  8. Select ‘Ok’
  9. Click ‘Next’
  10. If you want the policy to affect only a specific range within your scope configure it, otherwise select no and click ‘next’
  11. On the Configure settings for the policy page ensure that ‘DHCP Standard Options’ is selected from the drop down box
  12. Configure the following scope options:
    • 066: IP Address of the machine where Endpoint Central Server is installed. For remote office, specify the IP address of the machine where distribution server of the remote office is installed. For eg, enter the IP address as: 192.168.140.21
    • 067: EFI\Boot\bootx64.efi
  13. Cick ‘Next’
  14. On the Summary page click ‘Finish’

BIOS 32-Bit & 64-Bit DHCP Policy

  1. Right-Click ‘Policies’ and click ‘New Policy’
  2. Give the policy a friendly name that coincides with the your vendor class naming scheme:
    • PolicyName: PXEClient (BIOS x86 & x64)
    • Description: Delivers the correct bootfile for BIOS machines
  3. Click ‘Next’
  4. On the ‘Configure Conditions for the policy’ page click ‘add’
  5. Select the ‘Value’ drop-down box and select the PXEClient (BIOS x86 & x64) vendor class that you created in previous steps
  6. Ensure that you check the box ‘Append wildcard(*)’
  7. Select ‘Add’
  8. Select ‘Ok’
  9. Click ‘Next’
  10. If you want the policy to affect only a specific range within your scope configure it, otherwise select no and click ‘next’
  11. On the Configure settings for the policy page ensure that ‘DHCP Standard Options’ is selected from the drop down box
  12. Configure the following scope options:
    • 066: IP Address of the machine where Endpoint Central Server is installedFor remote office, specify the IP address of the machine where distribution server of the remote office is installed. For eg, enter the IP address as: 192.168.140.21
    • 067: boot\pxeboot.n12
  13. Cick ‘Next’
  14. On the Summary page click ‘Finish’

UEFI 32-Bit DHCP Policy

  1. Right-Click ‘Policies’ and click ‘New Policy’
  2. Give the policy a friendly name that coincides with the your vendor class naming scheme:
    • PolicyName: PXEClient (UEFI x86)
    • Description: Delivers the correct bootfile for (UEFI x86) machines
  3. Click ‘Next’
  4. On the ‘Configure Conditions for the policy’ page click ‘add’
  5. Select the ‘Value’ drop-down box and select the PXEClient (UEFI x86) vendor class that you created in previous steps
  6. Ensure that you check the box ‘Append wildcard(*)’
  7. Select ‘Add’
  8. Select ‘Ok’
  9. Click ‘Next’
  10. If you want the policy to affect only a specific range within your scope configure it, otherwise select no and click ‘next’
  11. On the Configure settings for the policy page ensure that ‘DHCP Standard Options’ is selected from the drop down box
  12. Configure the following scope options:
    • 066: IP Address of the machine where Endpoint Central Server is installedFor remote office, specify the IP address of the machine where distribution server of the remote office is installed. For eg, enter the IP address as: 192.168.140.21
    • 067: EFI\Boot\bootia32.efi
  13. Cick ‘Next’
  14. On the Summary page click ‘Finish’

3) Remove Default PXE Options

Ensure that you have removed the 067, 066, 060 options from the default scope options to ensure that the Policies take precedence otherwise you will end up with conflict.

You have now successfully configured DHCP server. Now the PXE media is ready to be hosted for image deployment and offline image creation.

Related Documents: