[Dnsmasq-discuss] dnsmasq.leases

Adam Hardy adam.ant at cyberspaceroad.com
Sun Jan 31 20:36:33 GMT 2010


Simon Kelley on 31/01/10 09:57, wrote:
> Adam Hardy wrote:
>> I have a new print server which gets its ip via dhcp from dnsmasq, and 
>> it is duly registered in dnsmasq.leases.
>>
>> However about 1/2 hour to an hour later, the dnsmasq.leases entry for 
>> it vanished. I can't ping it via its hostname anymore but I can ping 
>> it via its ip address that it got from dnsmasq.
>>
>> It sounds to me as if the print server is acting strangely but could 
>> there be something in dnsmasq that is causing this problem?
> 
> I've come across devices like this that just don't do lease renewal. 
> They get a DHCP lease for whatever time the server gives them, but don't 
> actually renew it. When the lease-time expires, the hostname disappears.
> 
> The fix is to tell the dnsmasq DHCP server to give that device an 
> infinite lease.
> 
> dhcp-host=<MAC address>,infinite
> 
> should do the trick.

OK, that certainly sorts it out - over an hour and dnsmasq.leases still has the 
entry for it.

I still thought I'd better check a couple of things. Here's a decommented 
version of my dnsmasq.conf:

domain-needed
bogus-priv
filterwin2k
server=/localdomain/127.0.0.1
local=/localdomain/
expand-hosts
domain=localdomain
dhcp-range=192.168.0.3,192.168.0.254
dhcp-option=option:router,192.168.0.2
dhcp-option=option:mtu,1500


I leave the lease duration at default - or at least I haven't set it. Here are 
the permissions on dnsmasq.leases:

adam at isengard:~$ ls -la /var/lib/misc/dnsmasq.leases
-rw-r--r-- 1 root root 66 2010-01-31 11:58 /var/lib/misc/dnsmasq.leases

Does that look ok?

I can't think that anything would have spoofed a DHCPRELEASE or would have 
overwritten dnsmasq.leases - I figure the likelihood of that ever happening on 
my lan would be only ever real if somebody had hacked into the lan and I don't 
think that's happened with the firewall and the WEP wireless lan.


Regards
Adam



More information about the Dnsmasq-discuss mailing list