4

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

3 Answers 3

5

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.

1
  • Well the solution is not exactly like this but u pointed me in the right direction. I ended up using gPXE with a embedded script that allows me to point the booting computer to the server I want it to, ignoring the dhcp options arguments, it only ask the dhcp por and ip address not boot params, then I point it to my server and make it boot, is not as flexible but is working for me know, im using in on a cd that I made form gPXE page with my script, thx!
    – Termiux
    Jun 30, 2011 at 19:22
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.

1

What you're after here is the ability to set BOOTP/DHCP options 66 and 67 based on client MAC. While you can easily set these options globally using the default Windows DHCP service there's no option to make this selective, even using reservations.

I'm also unaware of this ability in other DHCP servers so another possibility would be to set MAC-to-IP reservations on your existing DHCP server (so you know what IPs your machine are on) and use option 66 and 67 to hand out the same boot host and file to every machine but then on the machine that's handing out these boot files have it hand out different files based on source IP - does that make sense?

2
  • I cannot do MAC-to-IP reservations currently cause I want all those machines to get their ip automatically casue they are a lot! and may be settin this enviroment in different subnets
    – Termiux
    Jun 28, 2011 at 20:03
  • So how on earth do you expect to differentiate between them?
    – Chopper3
    Jun 28, 2011 at 21:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .