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

ramakanth varala ramakanth.varala at gmail.com
Wed May 4 11:26:26 BST 2011


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.



On Wed, May 4, 2011 at 3:46 PM, Simon Kelley <simon at thekelleys.org.uk> wrote:
> ramakanth varala wrote:
>> iam running dnsmasq on my target board , my dnsmasq.conf has following
>> configurations
>>
>> # cat /var/etc/dnsmasq.conf
>> strict-order
>> localise-queries
>> bogus-priv
>> domain-needed
>> expand-hosts
>> resolv-file=/var/etc/resolv.conf
>> dhcp-leasefile=/var/etc/dnsmasq.leases
>> dhcp-lease-max=253
>> dhcp-authoritative
>> domain=home
>> dhcp-vendorclass=CLASS0,IP-STB
>> dhcp-range=net:CLASS0,192.168.1.100,192.168.1.150,86400
>> dhcp-range=Private_LAN,192.168.1.2,192.168.1.254,86400,provide_hostname
>>
>> Here last line of configuration file represents that, the lease
>> 192.168.1.2 - 254 would be for 86400 seconds .
>>
>>
>> After this Lease would expire and Lan Hosts need to renew there lease.
>>
>> But when i see the /var/etc/dnsmasq.lease file
>>
>> # cat /var/etc/dnsmasq.leases
>> 87954 00:1d:7d:bf:93:19 192.168.1.2 new-user-1 * * * *
>>
>> the first coloumn is 87954.As per my understanding all hosts should
>> have lease expiry as 86400. But why does it show more that 86400.
>>
>> Any configuration missing..?
>>
>> Your comments would highly appreciated.
>>
>
> Depending on how dnsmasq is compiled, that field may hold the _time_ the
> lease expires, in seconds since January 1st 1970. It's clearly not that,
> since the number would be much bigger, but if your system clock is not
> set, that might explain things. Could you post the results of running
> the command
>
> dnsmasq -v
>
> which will tell us which time mode dnsmasq is in, and make things clearer.
>
> HTH
>
> Simon.
>



More information about the Dnsmasq-discuss mailing list