[OpenIndiana-discuss] How to configure a DUID for DHCPv6 usage?
James Carlson
carlsonj at workingcode.com
Wed Apr 13 13:46:54 UTC 2016
On 04/13/16 08:59, Henner Gratz wrote:
> Hi all,
>
> I want an OI_151a9 machine to get a fixed IPv6 address via DHCPv6. For
> that to work
> a DHCP Unique Identifier (DUID) has to be set on this machine. According
> to the manuals
> a line of the form
>
> .v6.CLIENT_ID=DUID
>
> has to be added to the file /etc/default/dhcpagent for that.
>
> So I added the line
>
> .v6.CLIENT_ID=1,1,1,08:00:27:92:28:9b
It's been a very long time since I wrote that code, but I think that
format is incorrect.
First of all, DUID type 1 is (per RFC 3315) "Link-layer address plus
time." In other words, you get a different DUID every time you ask for
an address. That's almost certainly not what you want. (The "time"
portion is automatically inserted -- you can't set it manually, at least
according to how I read the code.)
Second, when using types 1 and 3, the format looks like "1,1,08:00:..."
-- there are just three fields (DUID type, hardware type, and address),
not four as given above, and I see no way the code will handle an
interface name. I think the man page is just plain in error here.
I would try using:
.v6.CLIENT_ID=3,1,08:00:27:92:28:9b
> Any advice?
dhcpagent also logs its activity via syslog using facility "daemon." I
highly recommend looking there for hints about what's going wrong (and
increase log level to "debug" to see more).
In case you're having trouble with the server, snoop or Ethereal should
help in finding out what's actually on the wire.
The slightly swilly code I wrote to do this parsing is in the
get_smach_cid function, located in
usr/src/cmd/cmd-inet/sbin/dhcpagent/states.c. I don't know if anyone
else has worked on it, though.
--
James Carlson 42.703N 71.076W <carlsonj at workingcode.com>
More information about the openindiana-discuss
mailing list