Delegating the first /64 subnet with odhcpd

I want to delegate a /62 subnet with subnet id 48 to a downstream router. I tried to add an interface, set ip6addr option to 62 and ip6hint option to 48. However, the downstream router only got a /63 subnet with subnet id 4a. Futhermore, the upstream router got a address with subnet id 48.

According to the official wiki, "Setting the ip6assign-parameter to a value < 64 will allow the DHCPv6-server to hand out all but the first /64 via DHCPv6-Prefix Delegation to downstream routers on the interface." It seems that the above result is intended.

However, I don't want the upstream router to occupy a /64 subnet. I want the upstream router to use a link-local address as downstream router's gateway (just like what my ISP does), and delegate a full /62 subnet to the downstream router. I tried to set ip6addr option to fe80::1/64, but it still got a /64 subnet with id 48.

Is there any way to prevent the upstream router from occupying the first subnet? Or is there any workaround to achieve delegating a full subnet? Thank you for any advice in advance.

(It might be possible to delegate a /62 subnet by assigning a larger subnet like /61 or /60, but some subnets will be wasted, which is undesirable.)

Use static routing and use whatever subnet you want downstream, with any IPs in the crosslink interfaces.

It is.

There is a pd_manager option in odhcpd that I wonder if it can be used. Odhcpd will connect to the unix socket specified in this option when it's going to assign a PD prefix. Odhcpd writes the DUID and IAID to the socket and expects IPv6 prefixes with preferred and valid times. But I haven't seen any OpenWrt package that implements such daemon, and I don't know how it should be implemented.

The option was added in two commits

Thank you for the advice. Actually I have done that to delegate subnets to my docker network and WSL. However, I got a router yesterday which does not support OpenWrt and only supports regular DHCPv6-PD, so I want to know if there is any solution by using odhcpd.

That's interesting. I have no idea how to use that, though. Thank you for the reference.