Getting ISC DHCP to respond with pxe information, but not with lease

Levi Pearson levi at cold.org
Tue Dec 4 11:39:48 MST 2007


>>
>> Interesting.  I was asking originally because Dan Wells asked me about
>> it.  OIT is trying to set up a pxeboot system for campus that works in
>> conjunction with their existing dhcp server.
>>
>> He indicated that altirus worked by responding to the dhcp request, but
>> without a lease.  The host would receive 2 dhcp responses, one with a
>> lease, and one with pxe info, and figure out what to do.  At least
>> that's what he claimed.  Your explanation sounds more logical, though.

As far as I can tell, that's not how PXE works.  Both the IP address
offer and the PXE boot extended options have to come from the same
DHCPOFFER.

> From my humble understanding of the dhcp protocol, when a client puts
> out a request, as many dhcp servers that want to can respond. The client
> chooses (usually the quickest) one and then sends out a packet saying
> which server it chose.

That's right.  The booting system sends out a DHCPDISCOVER extended
with PXE options, to which any number of DHCP servers can reply with a
DHCPOFFER.  The primary server could be configured to ignore
PXE-extended DHCPDISCOVERs, I believe.  At PXE boot time, the booting
system would ignore any offer that wasn't extended with the PXE
fields, so it would only respond to a server set up to give it boot
information.  Anyway, after the DHCPOFFER is accepted by the booting
system, a DHCPREQUEST is sent out, and then the offering server sends
a DHCPACK.

As soon as that process finishes, the PXE image is downloaded from the
boot server, and the IP address received from the original DHCP is
forgotten.  The OS performs its own DHCP request, which won't have the
extended PXE options, so it can be easily ignored by the PXE booting
dhcp server and served by the primary server.

The only downside to this dual-server arrangement is that you need to
either coordinate the leases in use or serve ips from different
ranges.  The router mangling DHCPOFFER messages to include PXE options
would alow a single server to handle all DHCP traffic and a single IP
range to be used.

                --Levi



More information about the PLUG mailing list