[Dnsmasq-discuss] Reg: Info related to leases file

Simon Kelley simon at thekelleys.org.uk
Mon Sep 23 20:45:56 BST 2013


On 23/09/13 19:12, Nehal J Wani wrote:
> If I am not wrong, there are 5 fields in a dnsmasq/<network-name>.leases file:
>
> (i) Expiry time
> (ii) MAC Address
> (iii) IP Address
> (iv) Hostname
> (v) Client ID
>
> Q1: Is the above order fixed?
> Q2: Which values from above can be NULL? (I know that leases contains
> '*' for fields whose values are not known, but is it safe to assume
> that it will be '*' for any value that is unknown?)
>

A1: Yes.

A2: There will always be an expiry time and an IP address. The hostname 
and the client-id can be missing, in which case the fields will contain *.

The Mac address may have a hardware type (rfc1060) appended like so:

02-01:02:03:04:05:06

If the hardware type is 01 (ethernet), then it's omitted

For IEEE1394 clients, the hardware type is 24, and the length of the MAC 
address is zero, so this appears as

24-

See rfc2855 for details.

There's also I completely different format for DHCPv6. If DHCPv6 is in 
use then the IPv4 leases will be terminated with a line like this:

duid <server DUID> as colon-separated hex

and then there will follow the DHCPv6 leases as

1) Expiry time
2) IAID
3) IPv6 address
4) hostname
5) client DUID






Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list