Page MenuHomeVyOS Platform

DHCPv6 DUID configuration node missing
Closed, ResolvedPublicBUG


Supported on VyOS 1.2 series but not migrated over to 1.3

Reported via forums:


Difficulty level
Normal (likely a few hours)
Why the issue appeared?
Implementation mistake
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)

Event Timeline

c-po triaged this task as Normal priority.
c-po created this task.
c-po changed Why the issue appeared? from Will be filled on close to Implementation mistake.
c-po updated the task description. (Show Details)

It looks like wide dhcp client does not support setting the DUID as it is overwritten again after a restart :(

Accidentally deleted the comment. Is there plan to migrated to dhcpcd instead? dhcpcd has good ipv6 support and being actively maintained too. Thanks.

Sorry I am confused. I took a brief look at the code of dhcp6c and it appears manually modifying the dhcp6c_duid file should be able to keep the change persistent: Did I miss anything? Thanks :)

Undortunately it only worked in 50% of the cases properly. Also there is only one global duid file so you can not have multiple duids (one per each interface).

Thats the current situation :(

Yeah also it looks like wide is hardcoded to support only type 1 DUID (LLT) anyway.... so probably it wasn't accidentally "forgotten" in 1.3 migration that someone probably has realized it wasn't viable to support it... Thanks :)

It still would be nice though. ANy other good IPv6 DHCP clients out there?

dhcpcd is a pretty good alternative. Well maintained and popularly used by many. I used it in a plain Linux router project and it was good enough for my use cases.

Not to sound like a crazy idea but how about networkd? It already has a pretty decent dhcpv6 client built-in it seems. Although I assume being a all-in-one setup it may be more desirable to have a standalone dhcpv6 client


I'm on 1.4-rolling-202101100217 and it looks like the DUID command is gone at the interface level or system level. Besides overwriting the DUID file (which seems to not persist between upgrades), is there a good strategy here if the use-case doesn't require a custom DUID per interface?

Can we reopen this bug? I need to set a type 2 DUID to get a DHCPv6 PD from my ISP. This is the only thing keeping me from switching from an EdgeRouter to VyOS.

@stepler for what it's worth, it does seem to persist across reboots if you just overwrite the file but obvs doesn't survive upgrades

@stepler, it looks like WIDE does not support type 2 DUID.

I found a workaround (persists across reboots and upgrades):

cat <<'EOF' >/config/scripts/vyos-preconfig-bootup.script

base64 -d <<<"..." >/var/lib/dhcpv6/dhcp6c_duid
chmod 775 /config/scripts/vyos-preconfig-bootup.script

To generate the base64 string:

python3 -c 'from binascii import unhexlify; from base64 import b64encode; from struct import pack; duid = "..."; duid = unhexlify(duid.replace(":", "").encode()); print(b64encode(pack("=H", len(duid)) + duid).decode())'

WIDE will only generate type 1 DUIDs, but it will use any type of manually configured DUID.

erkin set Issue type to Bug (incorrect behavior).Aug 29 2021, 11:59 AM
erkin removed a subscriber: Active contributors.