[Dnsmasq-discuss] Hostname creating; DHCP NAKs

Will Murnane Will Murnane <will.murnane@gmail.com>
Thu, 9 Dec 2004 00:50:45 -0500


Hello all,
  I've had two issues recently with dnsmasq.  First, I'd like to
generate unique names for clients, and second, there's a bit of a
glitch with DHCP clients who attempt to get leases twice in a short
while.

The first issue is this:  I have a decent number of client machines
who I'd like to have hostnames defined for.  However, I'd prefer not
to have to give them explicit names in dnsmasq.conf, but have them
automatically assigned.  I had this working in dhcpd (version ) with a
config file line like this:
option host-name = binary-to-ascii(10, 8, ".", leased-address);
which allowed me to see immediately what IP they were at (this
generates hostnames like "10.2.3.4", an ascii string).  The other
possibility is to name the clients something like "client1",
"client2", et cetera.  Is there a way to do this with dnsmasq?

The other issue I've had is this:  The "client" machines are booted
via Etherboot, and then once they get to loading the OS, they run
udhcpc so that the network is set up properly.  This shows up on the
client end as:
udhcpc[137]: Sending discover...
udhcpc[137]: Sending select for 10.6.7.40..
udhcpc[137]: Recieved DHCP NAK
and on the server (in /var/log/messages): 
dnsmasq[1670]: DHCPDISCOVER(eth0) 00:d0:09:da:88:0f
dnsmasq[1670]: DHCPOFFER(eth0) 10.6.7.40 00:d0:09:da:88:0f
dnsmasq[1670]: DHCPREQUEST(eth0) 10.6.7.40 00:d0:09:da:88:0f
dnsmasq[1670]: DHCPACK(eth0) 10.6.7.40 00:d0:09:da:88:0f
Both of these messages are repeated every three seconds for almost
exactly 10 minutes, and then the client's third line changes to this:
udhcpc[137]: Lease of 10.6.7.40 obtained, lease time 172800
and all is well.  No change on the server side.  Any idea what's causing this?

Thanks in advance for the help,
Will Murnane