<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
I'm working on updating a tool that uses lease status from the dhcpd
leases file, and would like to teach it about IPv6.<br>
<br>
I'm not running dhcpd IPv6 (yet - I have a static IPv6 network), but
have found some sample IPv6 lease data.<br>
That file, and everything else points to the dhcpd.leases (5) man
page. However, that man page doesn't <br>
describe the IPv6 leases. Just the IPv4.<br>
<br>
A snippet below (again, not my file...) leaves me guessing. I admit
to not having read all the DHCP6<br>
RFCs, but I shouldn't have to for this.<br>
<blockquote>I assume that the ia-na argument is the client's DUID.
But if it's a standard type, it would<br>
appear to not be in network byte order. E.g. a LLT would be
\000\001 (like the server DUID),<br>
but what we see is byte-swapped - so perhaps it's in native order
from a little-endian machine.<br>
But if that's the case, the hardware type isn't swapped -
presuming ethernet, but the string<br>
decodes to the wrong length. (TYPE+HWT+TIME+Ethernet = 2+2+4+6 =
14 bytes, vs. 19 in the<br>
string.) Only 4 DUID formats are registered with IANA...<br>
<br>
The code in print.c (quotify) called by db.c just walks a pointer
down a field; I haven't (and<br>
don't really want to) worked backwards to the source.<br>
<br>
I assume ia-na represents non-temporary addresses for this client;
ia-ta temporary addresses,<br>
and ia-pd - prefix delegation? And that a client can have many
addresses.<br>
<br>
And that the iaaddr ip:: {} record sets represent a lease roughly
like the lease ip... {} records written<br>
by dhcpd for IPv4 and documented on the man page. Though I don't
see 'start'; is that a sample<br>
data issue, or is only the last transaction time (cltt) recorded?<br>
</blockquote>
But, what I'd really like is:<br>
<br>
1) The real documentation for dhcpd6.leases, so I don't have to
reverse engineer it.<br>
2) Some reasonable test data showing a useful number of leases in as
many states as possible.<br>
3) Preference on display of DUIDs - the quoted string format isn't
human friendly. I've seen other software present it as a ':'
separated byte string, though IPV6 address-style 16-bit chunks would
seem more compact..<br>
<br>
The lack of documentation strikes me as a bug - but I thought I
should ask here before writing a<br>
bug report...<br>
<br>
If this turns into a big project, I'll drop it. I'm not going to
'read all the code', 'setup a test network', or 'read all the RFCs.'
:-)<br>
So any help would be appreciated.<br>
<br>
Thanks. <br>
<br>
<br>
# The format of this file is documented in the dhcpd.leases(5)
manual page.<br>
# This lease file was written by isc-dhcp-4.2.0-P2<br>
<br>
server-duid "\000\001\000\001\024\355d\360\000 5\347\331v";<br>
<br>
ia-na "\001\000\000\000\000\001\000\001\024\330\204\230\010\000'[
\363" {<br>
cltt 0 2011/03/20 16:44:56;<br>
}<br>
<br>
ia-na "@\010\224'\000\001\000\001\024\355jX\010\000'\224\010@" {<br>
cltt 3 2011/03/09 04:39:42;<br>
}<br>
<br>
ia-na
"\001\000\000\000\000\001\000\001\024\352\033$\010\000'*\230\202" {<br>
cltt 1 2011/03/28 01:49:55;<br>
iaaddr 2001:470:8:12:9000::200 {<br>
binding state active;<br>
preferred-life 2250<br>
max-life 3600<br>
ends 1 2011/03/28 02:49:55;<br>
set ddns-rev-name =<br>
"0.0.2.0.0.0.0.0.0.0.0.0.0.0.0.9.2.1.0.0.8.0.0.0.0.7.4.0.1.0.0.2.ip6.arpa.";<br>
set ddns-txt = "02ce74620e7758348976d8a9df6d7939d7";<br>
set ddns-fwd-name = "xxx.example.net";<br>
}<br>
}<br>
<br>
<pre class="moz-signature" cols="72">--
Timothe Litt
ACM Distinguished Engineer
--------------------------
This communication may not represent the ACM or my employer's views,
if any, on the matters discussed.
</pre>
</body>
</html>