[Dnsmasq-discuss] Clear and re-populate lease file; remnant entries with infinite lease time

Jeff Boyce jboyce at meridianenv.com
Thu Apr 14 20:39:29 BST 2016


Greetings -

As I was investigating some networking issues in my office I ran across 
a dns network issue that I would like to resolve.  I have dnsmasq 
configured on a CentOS 6 VM for our office network.  The desktops in the 
office receive fixed IP addresses from dnsmasq using the option 
dhcp-host=computername, ipaddress, infinite.

As I was investigating my other issue I noticed that one of the desktop 
system was not getting the IP address I was expecting.  I forced it to 
renew it's lease so I could see what appeared in the log file.  To 
paraphrase the log message, the host was not configured with IP Address 
xxx.xxx.xxx.106 because it is leased to another system at MAC Address 
aa:bb:cc:dd:ee:ff.

So that lead me to look at the lease file to see it I could tell which 
system was associated with that MAC Address.  The lease file listed a 
lease time expiry of zero (I am assuming that refers to infinite lease 
time), the MAC and IP Addresses, but had a * for the Computer Name.  I 
suspect that this MAC Address is for a computer that had been retired 
and removed from the network, but am unable to confirm it any other 
way.  So I am trying to figure out a safe way to force a lease renewal 
system-wide so that it will clear and re-populate the lease file (and 
cached memory).  That way I would know for sure whether the system that 
is listed in the lease file with IP Address xxx.xxx.xxx.106 is a retired 
system or not.

I searched the list archives and found a similar situation where someone 
was asking how to delete an entry from the lease file for a system that 
they *knew* was no longer in use.  In that case the recommendation was 
to (1) stop dnsmasq, (2) edit the lease file, then (3) restart dnsmasq.

However, in my situation I don't know who this computer is, and whether 
it is retired and removed from the network or not.  Also since my 
configuration file has lease times set to infinity, whether that might 
complicate the situation.

Can someone suggest a safe approach to clearing and re-populating the 
lease file in this situation.  I suspect that I will need to change my 
configuration lease time to something short, but don't know what 
additional things I might need to do, and how to sequence any steps.

Thanks.
Jeff

-- 

Jeff Boyce
Meridian Environmental





More information about the Dnsmasq-discuss mailing list