[Dnsmasq-discuss] DHCPv6 and MAC

Dan Williams dcbw at redhat.com
Mon Feb 11 17:13:44 GMT 2013


On Mon, 2013-02-11 at 11:48 -0500, Gene Czarcinski wrote:
> On 02/10/2013 08:57 PM, Dan Williams wrote:
> > Best to test with is git master or the 0.9.7.995 release.
> Too late ... I am running 0.9.7.997

I lied and I actually mean 0.9.7.997 :)

> So far things are working well (no problems).
> 
> I finally figured out that the easiest way to specify the duid-default 
> so that I would be using duid-LL is to take the colon separated hex 
> digits and converting them to back-slash separated 3-digit octal numbers 
> and ignore the other stuff dhclient does. This seems acceptable to dhclient.

Yep, those are the dhclient escape rules.

> If I delete everything but the first line in the lease file and then use 
> the above to set the LL this works.
> 
> I still do not understand how/why duid-UUID gets used as the current 
> default is duid-LLT.  And, I would still like an option to specify that 
> duid-LL be used but, if not acceptable for the regular NetworkManager 
> distribution, then I can handle it as a local patch.

The option you're looking for *is* to set default-duid in the lease
file.  That's exactly how you tell NM to use the DUID you want.
Otherwise, NM will generate the DUID-UUID.

As I mentioned in other mails to this thread, the DUID-UUID gets used
for a number of reasons (all quotes from RFC 3315):

1) the RFC specifies that the DUID is *per machine*, not per-interface,
and that one DUID is used for any client run on that machine.
Furthermore, "the DUID must be globally unique".

2) A machine may contain more than one network interface and since under
Linux, interface enumeration is not stable, there's no way to
consistently choose which interface to use for the DUID-LL.  Since the
RFC indicates that the same DUID should be used for all interfaces
("each DHCP client and server should have exactly one DUID"), it's
really a toss-up which interface is the "main" interface from which we
should generate the machine-wide DUID.

3) Since the RFCs state that the DUID should not change as a result of
changes to network interfaces, addition/removal of hardware, etc ("a
device's DUID should not change as a result of a change in the device's
network hardware") this implies that it must be stored somewhere.  This
causes a problem when network booting or cloning system images, since a
stored DUID would be used for all machines and would no longer be
globally unique as required by #1.  Since /etc/machine-id is already
supposed to be globally unique, it must already be handled by the
cloning/network-boot case, and thus we can use it as a basis for the
DUID-UUID without creating extra work for the administrator.

But again, you're free to override this behavior by modifying the
default leasefile in /etc/dhclient6.leases with whatever DUID you
desire.

Dan





More information about the Dnsmasq-discuss mailing list