[ipxe-devel] Telling iPXE to only take certain DHCP offers

Greg Jednaszewski jednaszewski at gmail.com
Fri May 6 14:15:59 UTC 2011


Hi,

On May 5, 2011, at 11:50 AM, Michael Brown wrote:

> On Thursday 05 May 2011 16:42:10 Floris Bos wrote:
>> Is there any way to tell iPXE to only accept DHCP offers that have the
>> "boot file name" set?
>> 
>> Concerns a scenario in which there are two DHCP servers active within the
>> same network.
>> 
>> 1) One that hands out IP-addresses to everyone for normal network use, and
>> whose settings cannot be changed.
>> 
>> 2) One that is meant to perform network installations. It only hands out
>> offers (with the boot file name set) to the MAC-addresses of computers
>> that needs to be provisioned.
>> 
>> Want iPXE to ignore the offers from server 1.
> 
> Are you able to define the ipxe.priority option for server 2?  If it's dhcpd, 
> then something like:
> 
>  option space ipxe;
>  option ipxe-encap-opts code 175 = encapsulate ipxe;
>  option ipxe.priority code 1 = signed integer 8;
> 
>  option ipxe.priority 1;
> 
> That should cause iPXE to prefer offers from server 2.

I have a similar situation, but I don't always have control over the DHCP servers in question.  Can you describe what iPXE does when it receives responses from multiple DHCP servers?  If it doesn't see the option 175 priority setting, does it just pick the first one it got?  Or is there some other ordering it uses?

Also, while looking at this issue, I came across the use-cached option.  How does that work?  Is it possible to reuse dhcp information from the original PXE rom DHCP query?  e.g.:

PXE rom issues DHCP request
DHCP server responds with IP address, filename, and next-server
iPXE loads and reuses the cached info from the previous step

Thanks,
Greg


More information about the ipxe-devel mailing list