[Dnsmasq-discuss] dnsmasq.lease file + description of its contents

Simon Kelley simon at thekelleys.org.uk
Wed May 4 14:51:08 BST 2011


ramakanth varala wrote:
> Thank you very much it indeed worked.
> 
> Is there any mechanism by which i can know how much expiry time is
> left out for the dhcp host machines.

Look at --dhcp-script. Whenever it changes (ie on lease renewal) the
script will be called and the time remaining is supplied in an
environment variable.

Simon.

> 
> On Wed, May 4, 2011 at 4:09 PM, Simon Kelley <simon at thekelleys.org.uk> wrote:
>> ramakanth varala wrote:
>>> thx simon,
>>>
>>>
>>> # dnsmasq -v
>>> Dnsmasq version 2.40  Copyright (C) 2000-2007 Simon Kelley
>>> Compile time options no-IPv6 GNU-getopt no-ISC-leasefile no-DBus no-I18N TFTP
>>>
>>> This software comes with ABSOLUTELY NO WARRANTY.
>>> Dnsmasq is free software, and you are welcome to redistribute it
>>> under the terms of the GNU General Public License, version 2.
>>>
>> Ok, in that case the first column is the system time when the lease
>> expires. My guess is that the system time gets set to zero when the
>> machine reboots, so it's the lease length plus the time since the
>> machine booted.
>>
>> Note that if the system time gets reset on a reboot than this will mess
>> up the lease expiry process. For this reason it might be better to
>> compile dnsmasq with the HAVE_BROKEN_RTC option, which stores the lease
>> _length_ instead. This works better without a clock which is stable over
>> reboots.
>>
>> The other fields are
>>
>> the MAC address of the client, the IP address of the client, the name of
>> the client, or * if not known, the client-id, or * if not supplied.
>>
>> The time field can be zero, which indicates an infinite lease.
>>
>> HTH
>>
>> Simon.
>>
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list