I've been struggling with this for some time. I have a few test machines that boot from the network, they receive the boot data from the DHCP server, this tells them who is the boot server where is the file they'll boot etc. However, I need to add a second PXE server in the same subnet (create another Vlan is not an option right now).

I read somewhere that I may be able to send certain parameters to certain machines based on their MAC address (this way choosing what computers boot from what server) however I cannot find how to do this, anyone knows how? this will be my solution but I cannot find the answer.

My DHCP is a windows server 2003

I have 2 servers running custom flavors of Linux server as TFTP servers. Some machines use data to boot from server 1, and the others must bu able to boot from server 2.

Thx

EDIT: I already picked answer but if anyone cares, I didn't use chain loading as proposed, but instead wrote a gPXE script and burn it with ISO image in a CD, I boot from it, the script is executed and the PC is redirected to the server stated in the script this is the script I used.

#!gpxe
dhcp net0
set filename pxelinux.0
set next-server 10.225.83.125   #Server your pointing to
set 210:string http://10.225.83.125/fogimg/  #if http the exact http address
imgfetch pxelinux.0       #name of the img file to fetch
imgload pxelinux.0        #name of the img file to load
boot pxelinux.0           #name of the img file to boot from

Solution 1:

This is possible if you use gPXE. You configure all hosts to boot using gPXE, then use a server script written in PHP or some such to serve up the appropriate image given a MAC address parameter:

chain http://${next-server}/boot.php?mac=${net0/mac}

is the example given here.

You don't have to burn gPXE into your NICs (although that's certainly a valid option): chainloading works great.

Lastly, the page describing the configuration for your gPXE clients on Win2k3 DHCP is here.

Solution 2:

We use ISC dhcpd3 on our Linux DHCP server, not Server 2003. But we do have two different netboot environments supported there. PXELinux for Linux installations, and Microsoft Deployment Toolkit 2010 for Windows installations.

So, for example, since we TFTP from the DHCP server, our Linux clients have entries like

host linux-host {hardware ethernet 00:01:02:03:04:05;
                 fixed-address A.B.C.D; filename "pxelinux.0";}

and the Windows clients have entries like

host windows-host {hardware ethernet 00:06:07:08:09:10;
                   fixed-address A.B.C.E; use-host-decl-names on;
                   next-server A.B.C.F; option tftp-server-name "A.B.C.F";
                   option bootfile-name "boot\\x86\\wdsnbp.com";}

This is (I think) the setup that Chopper3 is describing above. Personally, I'm never going back to a Windows DHCP server. We have a Python script that can regenerate our DHCP configuration in seconds so we can switch between boot types as needed.