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

Simon Kelley simon at thekelleys.org.uk
Tue Sep 24 11:07:43 BST 2013


On 24/09/13 10:48, Nehal J Wani wrote:
> On Tue, Sep 24, 2013 at 1:15 AM, Simon Kelley<simon at thekelleys.org.uk>  wrote:
>> 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
>>
>>
>
> In case of DHCPv6, which of the above 5 fields can be missing (for
> IPv6 addresses)?

Only the hostname, which can be replaced with "*" if no hostname is 
known. All the others are required.

For both IPv4 and IPv6 leases, the expiry time can be zero which means 
"never".

Cheers,

Simon.


>
>>
>>
>>
>>
>> Cheers,
>>
>> 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