Changing DUID to get new IPv6 assignment

I think Comcast is giving me only a /64 and I think I need a /60 for Luci to properly delegate a /64 to the LAN side. According to this old Reddit thread, I should be able to get a new assignment with the proper prefix by changing the DUID. How do I do that?

How do I know if I got a /60 or /64? What settings do I need to get addresses assigned on the LAN side?

OpenWrt 18.06.4 r7808-ef686b7292 / LuCI openwrt-18.06 branch (git-19.170.32094-4d6d8bc)
Zyxel NBG6716

(It's probably due for an update, if a new build is available for the old hardware.)

ifstatus wan, ifstatus wan6.


After lots of looking at source code, I found that my router is running odhcp6c and its -c option sets the DUID. The DUID's format is defined in section 11 of RFC 8415:

odhcp6c uses the DUID-LL format by default. This sends the 8-byte MAC address of the WAN interface as the DUID. (8 because the first 2 bytes are the value 1 for Ethernet. The rest is the 6-byte MAC most of us are familiar with.)

Luci offers a Client ID setting but doesn't specify its structure. It should be a hex string in network order (ie. MSB of multi-byte values first). The first two bytes are the DUID type. The rest are the DUID value. See the RFC for how to structure it. For example, 00030001xxxxxxxxxxxx where the x's are your 6-byte MAC would be the default DUID.

if DUID is based on MAC ... could you not override the MAC?

DUID can be based on MAC, and is in the default configuration. I wasn't sure, and I could indeed change just the MAC. I did just test with a client ID based on my MAC and got the same /64 prefix. I incremented the client ID by 1 (equivalent to incrementing the MAC by 1) and got a new prefix.

Alas, I'm still getting a /64 from Comcast. Looking at the LAN DHCP config page on their modem, it looks like it's only going to assign a /64. I've got the lower tier modem so I might need the newer one, which I have staged to swap in.