[Dnsmasq-discuss] DHCP renewals ignoring static addresses
simon at thekelleys.org.uk
Sat Mar 15 17:27:11 GMT 2008
John Grant wrote:
> I have bought some of those (nice!) Logik Internet radios
> that use the RECIVA chipset, however they have a strange
> DHCP ability.
> If I set them to DHCP mode then they will attempt to get a
> dynamic address, even if they are specified as static in
> dnsmasq.conf. They show up in the lease file with their
> correct hostname,
> so it's not as if they haven't had their MAC address
> recognized (mystatics are all based on MAC address).
> To fix this, I edited the lease file in /var and changed
> the address that had been assigned to a different
> hostname/IP/MAC and restarted dnsmasq.
> Rather surprisingly the radio grabbed the next dynamic
> address in the range! So it's not even trying to get the
> static address!
Editing the lease file is not generally useful. Dnsmasq relies on an
internal copy of the database: it writes that to the file whenever it
changes, but only reads the file at startup. As a result, unless you're
careful to stop dnsmasq before editing the lease file, you changes will
probably get overwritten and ignored.
It's worth looking in you logs to see what the radios are actually
doing. Is dnsmasq offering them the correct static address (look for
DHCPOFFER with the relevant MAC address.) Are they then REQUESTing that
address, or a different one.
If the wrong address is being offered, then you have a dnsmasq problem
(not recognised, static address seems to be in use by another host,
somthing like that.) If the radio gets offered the correct address bu
then requests another one, it's broken.
One more possibility is that the radios have dynamic addresses from
before you set up the static addresses, older version of dnsmasq don't
insist that the host moves from an existing dyamic lease. Later versions
do, by sending DHCPNAK when the client renews the lease.
> What can I do about this (other than not use DHCP like I'm
> doing now)?
Use the logs and report back.
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
More information about the Dnsmasq-discuss