DHCP / PXE Configuration
Enable UEFI boot with PXE
DHCP server:
The DHCP server requires a special option to enable PXE boot,
The DHCP options are:
-
Option 66
-
Option 67
Windows DHCP server configuration
First of all, the DHCP server needs to determine which type of computer is requesting the PXE server and the correct boot file.
To sort computers, vendor classes must be defined.
Vendor Classes
Vendor Classes as a Detection Method are used to determine how devices request a boot image from the DHCP server.
-
Open the DHCP Console and expand the IPv4 Node
-
Right-click on ‘IPv4 Node’ and select ‘Define Vendor Classes’
-
Click ‘Add’
-
First, create the UEFI 64-Bit Vendor class by entering the following information
-
Enter the following information in the respective fields:
-
DisplayName:PXEClient (UEFI x64)
-
Description:PXEClient:Arch:00007
-
ASCII:PXEClient:Arch:00007
-
-
Click ‘OK’
-
Click ‘Add’
-
DisplayName:PXEClient (BIOS x86 & x64)
-
Description:PXEClient:Arch:00000
-
ASCII:PXEClient:Arch:00000
-
-
Click ‘OK’
Creating Custom DHCP Policies
32-Bit & 64-Bit BIOS DHCP Policy
-
Right-click ‘Policies’ and click ‘New Policy’
-
Give the policy a descriptive name that matches your vendor’s class naming scheme:
-
PolicyName: PXEClient (BIOS x86 & x64)
-
Description: Delivers the correct boot file for BIOS machines
-
-
Click ‘Next’
-
On the ‘Configure Conditions for the policy’ page, click ‘Add’
-
Select the ‘Value’ drop-down box and select thePXEClient (BIOS x86 & x64)vendor class that you created in the previous steps
-
Make sure to check the‘Append wildcard(*)’ box
-
Select ‘Add’
-
Select ‘OK’
-
Click “Next”
-
If you want the policy to apply only to a specific range within your scope, configure it; otherwise, select “No” and click “Next”
-
On the Configure settings for the policy page, ensure that ‘DHCP Standard Options’ is selected from the drop-down box
-
Configure the following scope options:
-
066:IP Address of Medulla
-
067: bootloader/undionly.kpxe
-
-
Click ‘Next’
-
On the Summary page, click “Finish”
UEFI DHCP Policy
-
Right-click ‘Policies’ and click ‘New Policy’
-
Give the policy a descriptive name that matches your vendor’s class naming scheme:
-
PolicyName: PXEClient (UEFI)
-
Description: Delivers the correct boot file for (UEFI)
-
-
Click ‘Next’
-
On the ‘Configure Conditions for the policy’ page, click ‘Add’
-
Select the ‘Value’ drop-down box and select thePXEClient (UEFI)vendor class that you created in the previous steps
-
Make sure to check the‘Append wildcard(*)’ box
-
Select ‘Add’
-
Select ‘OK’
-
Click “Next”
-
If you want the policy to apply only to a specific range within your scope, configure it; otherwise, select “No” and click “Next”
-
On the Configure settings for the policy page, ensure that ‘DHCP Standard Options’ is selected from the drop-down box
-
Configure the following scope options:
-
066:IP Address of Medulla
-
067: bootloader-uefi64/ipxe.efi
-
Click ‘Next’
-
-
On theSummarypage, click “Finish”
Remove Default PXE Options
Ensure that you have removed the 067, 066, and 060 options from the default scope options to ensure that the policies take precedence; otherwise, you will end up with a conflict. As long as you have configured everything correctly, you should now be able to boot machines from BIOS or UEFI.
Linux DHCP Server
# PXE definitions
option space PXE;
option PXE.mtftp-ip code 1 = ip-address;
option PXE.mtftp-cport code 2 = unsigned integer 16;
option PXE.mtftp-sport code 3 = unsigned integer 16;
option PXE.mtftp-tmout code 4 = unsigned integer 8;
option PXE.mtftp-delay code 5 = unsigned integer 8;
option PXE.discovery-control code 6 = unsigned integer 8;
option PXE.discovery-mcast-addr code 7 = ip-address;
option arch code 93 = unsigned integer 16;
# In the initial DHCP DISCOVER packet, the PXE client sets option 93 to its architecture.
# 0000 == IA x86 PC (BIOS boot)
# 0006 == x86 EFI boot
# 0007 == x64 EFI boot
# PXE boot following the PXE specifications
class "PXE" {
match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
if option arch = 00:07 {
filename "bootloader-uefi64/ipxe.efi";
} else {
filename "/bootloader/undionly.kpxe";
}
}
# Etherboot boot
class "Etherboot" {
match if substring (option vendor-class-identifier, 0, 11) = "Etherboot-5";
option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
option vendor-class-identifier "Etherboot-5.0";
vendor-option-space PXE;
option PXE.mtftp-ip 0.0.0.0;
}
subnet ##MEDULLA_NETWORK## netmask ##MEDULLA_NETMASK## {
option broadcast-address ##MEDULLA_BCAST##; # broadcast address
option domain-name ##MEDULLA_DOMAIN##; # domain name
option domain-name-servers ##MEDULLA_DNS##; # DNS servers
option routers ##MEDULLA_GW##; # default gateway
pool { # Only defined pool
# uncomment the following two lines for PXE-only boot
#allow members of "PXE"; # PXE-only
#allow members of "Etherboot"; # PXE-only
range ##MEDULLA_START## ##MEDULLA_END##;
next-server ##MEDULLA_IP##;
}
}