2

Some context:

I dual boot my desktop between W10 and Ubuntu. (W10 for games, Ubuntu for work)

I have a fully working IPv6 setup with pfSense as edge router.

The DHCPv6 server is configured to always hand out the same IPv6 address to the W10 OS. This is done to allow DNS resolution of the DHCPv6 assigned IP to the hostname.

Currently, the Ubuntu OS always receives a different IP since it requests its IP from the server using a different IAID and DUID.

In essence, I want to change the DUID/IAID of the Ubuntu install to match the strings used by W10.

I modified my NetworkManager config for the connection (added the last 2 lines), but apparently this is not enough:

rsq@beast:~$ sudo cat '/etc/NetworkManager/system-connections/Wired connection 1'
[connection]
id=Wired connection 1
uuid=a1e627b4-680c-3fbb-b4a4-b487c5a0a504
type=ethernet
autoconnect-priority=-999
permissions=
timestamp=1577458590

[ethernet]
mac-address=18:31:BF:6D:0E:24
mac-address-blacklist=

[ipv4]
dns-search=
method=auto

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=auto
dhcp-duid=00:01:00:01:23:01:a6:ec:18:31:bf:6d:0e:24
dhcp-iaid=85471679

I did extensive searches on this issue, but there is very little information out there.

So in essence, my questions are: How does the Ubuntu system generate the DUID? What settings control the DUID generation process? Where is the DUID setting saved? Can it be overridden?

Thanks for all input on this matter! Best regards, Erik

1 Answer 1

4

since it requests its IP from the server using a different IAID and DUID.

Initially DUID comes from

/etc/machine-id

and is created ONCE on installation. Mind that we nowadays use systemd so use that as an extra search argument to filter non-systemd answers.

Important file:

/etc/systemd/networkd.conf 

has a part related to the creation of the DUID:

If DUIDType=vendor, then the DUID value will be generated using "43793" as the vendor identifier (systemd) and hashed contents of machine-id(5). This is the default if DUIDType= is not specified.

Regarding IAID:

[DHCP] SECTION OPTIONS

This section configures the DHCP Unique Identifier (DUID) value used by DHCP protocol. DHCPv6 client protocol sends the DHCP Unique Identifier and the interface Identity Association Identifier (IAID) to a DHCP server when acquiring a dynamic IPv6 address. DHCPv4 client protocol sends IAID and DUID to the DHCP server when acquiring a dynamic IPv4 address if ClientIdentifier=duid. IAID and DUID allows a DHCP server to uniquely identify the machine and the interface requesting a DHCP IP. To configure IAID and ClientIdentifier, see systemd.network(5).

To set IAID and DUID you need:

DUIDType=

Override the global DUIDType setting for this network. See networkd.conf(5) for a description of possible values.

DUIDRawData=

Override the global DUIDRawData setting for this network. See networkd.conf(5) for a description of possible values.

IAID=

The DHCP Identity Association Identifier (IAID) for the interface, a 32-bit unsigned integer.


Example from networkd.conf for DUID:

Example 1. A DUIDType=vendor with a custom value

DUIDType=vendor
DUIDRawData=00:00:ab:11:f9:2a:c2:77:29:f9:5c:00

This specifies a 14 byte DUID, with the type DUID-EN ("00:02"), enterprise number 43793 ("00:00:ab:11"), and identifier value "f9:2a:c2:77:29:f9:5c:00".

1
  • 1
    Created /etc/systemd/networkd.conf and /etc/systemd/network/50-iaid.conf files with the suggested stanzas in them but the machine still uses the same DUID to request IPv6 addresses. I'll do a test with the server version later, but it did not work for me on the desktop. Dec 28, 2019 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.