Different DHCPv6/v4 lease time

Hi,

Is it possible to configure different lease times for DHCPv6 server and DHCPv4 server ? (like 15m for v4 and keeping 12h for v6 ?)

I tried without success, on many different OpenWRT versions, with ' ra_useleasetime'

The same config sections and paramaters are used to configure 2 different services (dnsmasq and odhcpd) ... do someone know how to define the 2 leasetimes separatly ?

I ask that because, for any openwrt version > 20 I tried (so 21.x and snapshot) DHCPv6 stop sending leases (leases including IPv6-PD of course) if 'leasetime' is < 12h and I want to configure shorter lease time 1h for my v4 scopes

I don't know if it is a bug or not, but if I can have different lease times for the 2 services it can work for me

Lowest box on this page: http://192.168.0.1/cgi-bin/luci/admin/network/network

yes, thanks @murraydr44 , I know
if I change that I loose any DHCPv6 functionnality (no more DHCPV6 send to host, no more DHCPv6 sent to my donwstream rooters) .. I need to decorelate the 2 lease times, v6 vs v4

Interesting use-case actually. As far as I can see it, this indeed isn't possible at the moment.

The only somewhat remote possibility is overriding the leasetime on per-static lease basis, but that would require either all your IPv6 or IPv4 clients to have a static lease entry each.

Hi,
it is not a "use case", it is a bug on the DHCPv6 behaviour
I just try to find a solution to have shorter ipv4 leases
but if I reduce the lease time I losse all DHCPv6, perdiod ... not great

If I can find at least a way to decorelate v4 and v6 leases it is fine for me until the problem is solved

I don't how how to declare a bug, I also don't know if "IPv6" devs are aware of this behaviour, so I'm stuck trying workarounds

Thanks, it works !
I have to let the leasetime at 12h, so I can collect the clients dhcpv6 DUID
then I can create static v6 leases for the most importants clients with a 12h, and then it is possible to set the global 'leasetime' to 1h

any host without static lease time will not be able to get a stateful GUA but this workaround covers my main needs

Thanks @jow !

It is a little bit odd that lowering the lease time renders DHCPv6 broken. Are there any issues logged in syslog wrt. invalid options or similar?

EDIT: stateful works with this workaround, but hosts loose slaac addresses

no issue logged
278 / 5000

the phenomenon occurs even after a fresh installation:

  • whatever the router (old QCA / IPQ40x / X86_64 or MT7621)
  • including with local ULA addresses without even having connected the LAN

tested with OpenWRT:

  • 21 rc2
  • snapshots of various dates / version

in 19.07 it was good

Original bug fixed yesterday :ok_hand:
I can confirm it is solved by using yesterday snapshot, great job.

https://bugs.openwrt.org/index.php?do=details&task_id=3916

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.