We're trying to set up DHCP on the datacenter floor where we have to support a both a Windows (WDS/MDT) and Linux (Cobbler) PXE environments.
Here is the setup we have right now:
DHCP001 - 192.168.1.5
MDT001 - 192.168.1.6
Cobbler - 192.168.1.7
We have a powershell script to create our DHCP reservations before we build any machines (a security requirement). This does the following:
Import-Module d:\DHCP_Scripts\Microsoft.DHCP.PowerShell.Admin.psm1
#Create Popup window to prompt for OS type (Windows/Linux)
$title = "Server Type"
$message = "What type of server are you building?"
$wn = New-Object System.Management.Automation.Host.ChoiceDescription "&Windows","Windows"
$lx = New-Object System.Management.Automation.Host.ChoiceDescription "&Linux","Linux"
$options = [System.Management.Automation.Host.ChoiceDescription[]]($wn, $lx)
$result =$host.ui.PromptForChoice($title, $message, $options, 0)
#Set DHCP Next IP variable
switch ($result)
{
0 {$nextIP = "192.168.1.6"}
1 {$nextIP = "192.168.1.7"}
}
#Prompt for IP address and MAC for build
$IP = read-host "What is the IP Address?"
$MAC = Read-Host "What is the MAC Address?"
#Set Reservation along with DHCP Next IP option 66
$reservation = New-DHCPReservation -scope 192.168.1.0 -IPAddress $IP -MACAddress $MAC | Set-DHCPOption -OptionID 066 -datatype STRING -Value $nextipThis creates the DHCP reservation, sets the next server IP, and then the server is able to boot to PXE. The problem we have is that WDS seems to take over as the owner and will not defer to the Linux boot server when WDS is running. When we stop WDS, it works fine.
I realize that this is NBR and that it is not Microsoft's recommended solution, so if anyone has any other suggestions for the best way to do this, please let me know.