IPv6 lease time only work with 12h

Why does on a default install the renewal of IPv6 lease time stop working and lease expires when countdown has finished, if using any other lease time than 12h?

I have tried to set dhcp lease time to 10m, I have tried in odhcpd to set ra_useleasetime, that didn’t do any change.
I then tried set preferred_lifetime to 10m, that didn’t work either.

But nothing changes, the lease time runs out and expires but with default 12h it renews the lease time over and over again.

Which others times have you tried than 10m?
You only talk about 10m while also say "any other lease time than 12h".

I suspect that 10m is too short.

And do we talk about RA and or dhcpv6?
Once I've read the RA rfc and played around with radvd and router announcements down to 1 sec on a Linux only network (and slaac only) and this worked well with multiple routers on a link...

I run 22.03.4

I have my DHCP settings at 5m - I experiment and tweak settings which I like to propagate sooner. As far as I know this only affects IPv4.

As I understand things, IPv6 behaves differently. A local systems' IPv6 depend on the RA and PD - if a prefix disappears the host self-unassigns the IPv6.

I think the setting you want is ra_useleasetime set to 1.

1 Like

I have tried 5m also, the thing is I need to solve this https://forum.openwrt.org/t/firewall-blocking-dhcpv6-requests/132360/4?mobile_view=1 on my 7 VLAN’s but if I even cant do it on the default LAN test rig it no fun.

12h, well that is in practical terms one single test config setup per day and this will then take months to try out so it must go faster, 5 or 10m is fast enough.

I tried that by putting it under the odhcpd config part in the dhcp config file, but it really didn’t do what I expected. I found this problem in a earlier forum post that ended up in a bug that made this config option. This problem seems to have appeared from time to time?

@hnyman @jow

I made a PR to add these GUI settings - can you see to it that this lands in master 22+23 etc?

1 Like
config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option dhcpv4 'server'
        option leasetime '5m'
        option ra 'hybrid'
        option dhcpv6 'hybrid'
        option ra_default '1'
        option ndp 'relay'
        list ra_flags 'home-agent'
        option preferred_lifetime '5m'
        option ra_useleasetime '1'
1 Like

Hmm, ok they was supposed to be under lan settings…I have to try that.

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