How to customize the length of IPv6-PD obtained by dhcpv6 protocol

main route A:
LAN interface address 2000:360:5150:9100::1/60 Other configurations are as follows

/etc/config/network

config interface 'lan'
	option device 'br-lan'
	option proto 'static'
	option ip6assign '60'

/etc/config/dhcp

config dhcp 'lan'
	option interface 'lan'
	option dhcpv4 'server'
	option ra 'server'
	option dhcpv6 'server'
	list ra_flags 'none'

secondary route B:
WAN interface Connect to the main route A LAN interface, configured as follows: Only IPv6-PD is obtained: 2000:360:5150:9104::/62

/etc/config/network

config interface 'wan_6'
	option device '@wan'
	option proto 'dhcpv6'
	option reqprefix 'auto'
	option reqaddress 'try'
	option noclientfqdn '1'

Why does the IPv6-PD length get 62 in secondary road b? How to customize the obtained length? Setting the option reqprefix parameter to 60 and 61 is invalid.

The maximum PD the DHCP server hands out is set to /62 to make sure no one client can grab everything.

But it should be configurable, under dhcp you can set e.g.:

         option dhcpv6_pd_min_len '60'

Let me know if that works

option dhcpv6_pd_min_len seems to be a new parameter added after 23.05.0. The official documentation has not updated the introduction of this parameter. Currently, my main router A is earlier than 23.05.0, so I cannot test it. Thank you!

23.05 is the latest supported release so better update.

At present, the secondary route is already 24.10.0. Since there are many details during use, we do not intend to upgrade the main route to solve this problem.

@ac169 your lan on the main router needs a larger part of the wan DP

So set the request size on wan to 56 if your ISP supports that and then you can use the assign option on lan with like 58 and then the secondary router can get a 60 for instance

1 Like