[ipv6][dhcp] How can I change the DUID sent during IPv6 solicitation?

To get an IPv6, I’ll need my dhcp client to provide a particular DUID in its solicitation. I’m a bit confused because I notice that there are folders relating to ifup but no /etc/network/interfaces file; the logs refer to systemd and NetworkManager when I statically configure ipv6 but I can’t find any configuration files for these 2 components anywhere in the file system.

I think I’ll be able to manage if a generous soul could tell me where to put my hands ^^.

I know HAOS uses network-manager for most of its IP management.
If you can get into your HAOS linux console/shell you can try nmcli out to set parameters that influence DUID (I don’t use DHCPv6, so don’t have any experience).

First find out what the network-manager connection profile is being used:
nmcli con show
You should see something like:

NAME               UUID                                  TYPE      DEVICE 
Supervisor enp0s3  c14e9fbc-98dc-49e0-b65e-c39d18abdef9  ethernet  enp0s3 

Then you can look at all the possible parameters:
nmcli con show "Supervisor enp0s3"
You should see some parameters in the output like:

...
ipv6.dhcp-duid:                         --
ipv6.dhcp-iaid:                         --
...

You can also read this page (search on “duid”) to see how these parameters influence duid.

The configured information should be stored at /etc/NetworkManager/system-connections/Supervisor enp0s3, but I have found that it often doesn’t persist across reboots. If you find this is the case I suppose you could create a github issue and see what the devs say.

1 Like

I finally understood why I was so dubious about network configuration: the “Terminal & SSH” add-on runs in a container.
I followed the Debugging the Home Assistant Operating System | Home Assistant Developer Docs tutorial to access the docker hypervisor and everything became much more understandable.

Umm… so how did you change the duid?

As on a normal system: NetworkManager.conf: NetworkManager Reference Manual