- 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)
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: https://github.com/jinmei/wide-dhcpv6/blob/24ee2a4f0009bc6ac9bd0b7b737aef93a4aa9905/common.c#L992. 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 :)
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?
I found a workaround (persists across reboots and upgrades):
cat <<'EOF' >/config/scripts/vyos-preconfig-bootup.script #!/bin/bash base64 -d <<<"..." >/var/lib/dhcpv6/dhcp6c_duid EOF 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.