IPv6 DUID determination

Jaap Winius networkmanager at umrk.nl
Mon Jul 8 20:02:34 UTC 2024


Hi Beniamino,

This works like a charm. Thanks very much!

Cheers,

Jaap


Quoting Beniamino Galvani <bgalvani at redhat.com>:

> On Sun, Jul 07, 2024 at 11:51:17AM +0000, Jaap Winius wrote:
>>
>> Hi folks,
>>
>> Can someone here can please tell me what the easiest way is to determine or
>> predict the unique IPv6 DUIDs of systems that use NetworkManager 1.30.6 or
>> higher?
>
> The easiest way is to set 'ipv6.dhcp-duid=ll' in the connection; then
> the DHCPv6 DUID is composed in the following way:
>
>  https://datatracker.ietf.org/doc/html/rfc8415#section-11.4
>
>        0                   1                   2                   3
>        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       |         DUID-Type (3)         |    hardware type (16 bits)    |
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>       .                                                               .
>       .             link-layer address (variable length)              .
>       .                                                               .
>       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>                          Figure 7: DUID-LL Format
>
> The hardware type for Ethernet is 1.
>
> If you want to set DUID-LL to be default for all connections on a
> machine, add a file /etc/NetworkManager/conf.d/50-dhcpv6-duid-ll.conf
> containing:
>
> [connection-duid-ll]
> ipv6.dhcp-duid=ll
>
> Otherwise if you have a system that is already using a different DUID
> generation mode, for example DUID-UUID, you can discover the value by
> inspecting file /run/NetworkManager/device/$ifindex, which contains
> among other things:
>
> [dhcp6]
> dhcp6.dhcp6_client_id=00:03:00:01:86:f1:6b:0d:5e:9e
>
> This information is available only since NM 1.42.
>
> Beniamino
>
>> This is with the integrated DHCP clients. Knowing each DUID is
>> necessary to configure my DHCPv6 server to always give these hosts the same
>> IPv6 addresses.





More information about the Networkmanager mailing list