Retaining information between DHCP requests
Bill at Henagar.PolymerIndustries.biz
Wed Oct 8 18:27:30 UTC 2014
On 10/8/2014 1:26 PM, CLOSE Dave wrote:
> I understand that dhcpd doesn't record requests for static addresses in
> the leases file, and that makes sense to me. But without that recording
> I'm at a loss of how to save information between requests.
> The problem I'm trying to solve is to provide different nameserver
> values to the same machine under different circumstances. In particular,
> I need a different nameserver configuration when the machine is being
> installed, via PXE kickstart, and during normal operation. The machines
> are running Fedora but that may not be important.
> During installation, kickstart seems to exchange messages with dhcpd
> three times. The first time it goes through the full DISCOVER, OFFER,
> REQUEST, ACK sequence. The second and third times it only sends REQUEST
> and gets ACK. All responses give it a full-day lease.
> The DISCOVER and REQUEST messages in the first exchange include a unique
> vendor-class-identifier starting with "anaconda". I can and do detect
> that string and provide the special nameserver response needed. But the
> subsequent REQUESTs do not include that string and dhcpd then provides
> the normal operation response. That confuses kickstart and the
> installation fails.
> (I'm also puzzled why kickstart would send the subsequent REQUESTS,
> given that it was told it had a full-day lease. But I probably can't do
> anything about that.)
> Ideally, I'm looking for a way to remember the status of the most recent
> DISCOVER/OFFER and to continue to use that to determine the response to
> any subsequent REQUESTs. But, because these machines have static
> addresses, I can't record anything in the leases file. Is there any
> other solution that anyone can suggest? Is there a way I can add
> something to the OFFER that would always be included in a later REQUEST?
You should run tcpdump to capture the traffic to see if there is an option request that you can key on besides/in
addition to vendor-class-identifier:
tcpdump -vv -e -n -i lan10 'portrange 67-68' | tee 2014-09-20.boot.output
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the dhcp-users