How to Configure Microsoft DHCP for Canonical MAAS
This guide explains how to configure an external Microsoft DHCP server to work with Canonical MAAS (Metal as a Service). Configuring the right DHCP options will ensure that nodes are able to correctly PXE boot and communicate with MAAS for provisioning.
- On your Windows Server, press
Windows + R
, typedhcpmgmt.msc
, and press Enter. - Alternatively, you can access it through Server Manager by selecting Tools -> DHCP.
- In the DHCP console, navigate to the appropriate scope that you want to configure for MAAS nodes.
- Expand your DHCP server, then expand IPv4, and select the specific Scope where MAAS nodes will reside.
- Right-click on Scope Options and select Configure Options.
-
Option 66: Boot Server Host Name (next-server)
- Check the box for Option 66.
- In the String Value field, enter the IP address of your MAAS rack controller (typically the MAAS server providing PXE services).
-
Option 67: Bootfile Name (filename)
- Check the box for Option 67.
- In the String Value field, enter the boot file name that MAAS needs to serve:
pxelinux.0
for BIOS boot.grubx64.efi
for UEFI boot (for x86_64 architecture).shimx64.efi
for UEFI Secure Boot.
- Choose the appropriate filename based on your nodes’ architecture and setup.
-
Option 42: NTP Servers
- To ensure time synchronization across nodes, configure Option 42.
- Check the box for Option 42 and enter the IP address of your NTP server.
-
Option 60: PXEClient
- You may need to set Option 60 to specify the DHCP client class identifier.
- Set Option 60 to "PXEClient" to ensure that the DHCP server provides options specifically to PXE clients.
- Once all options are configured, click OK to save your changes.
- Make sure the settings are applied to the correct scope or at the Server Options level if you want these settings to apply to multiple scopes.
- To prevent IP conflicts and ensure that MAAS knows which IP addresses belong to which nodes, create reservations for each node.
- Right-click on Reservations under the relevant scope and select New Reservation.
- Provide the Reservation Name, IP address, MAC address of the node, and a Description.
- Click Add to create the reservation.
- Scope Options vs Server Options: You can set these DHCP options at either the scope level (affecting a specific range of IP addresses) or the server level (affecting all scopes managed by the DHCP server). Setting options at the scope level is generally recommended for limiting PXE boot configuration to just the MAAS-managed nodes.
- Boot File and Architecture: Ensure that you provide the correct boot file for BIOS or UEFI. MAAS dynamically selects the correct bootloader, but the DHCP server must serve the file requested by the node.
- Testing: After configuring the DHCP options, test with one of the MAAS nodes to ensure that it can acquire an IP address and successfully boot using PXE.
Your Microsoft DHCP server should now be correctly configured to work with MAAS, enabling proper communication and provisioning of nodes.