DHCPv6 lease time not respected by some hosts

Hi,

I've configured a leasetime in the LAN DHCP, but some hosts don't respect it. The hosts are Fedora 28.

config dhcp 'lan'
        option interface 'lan'
        option start '100'
        option limit '150'
        option dhcpv6 'server'
        option ra 'server'
        option ra_management '1'
        list ip6class 'wan6'
        option ra_preference 'high'
        option leasetime '30m'

For DHCPv4 the lease time is respected, but for DHCPv6 Luci says that the lease time remaining is "unlimited". I have a OpenWrt client which does respect the lease time.

Is there any way to enforce the lease expiration?

That leasetime is only for for IPv4 by default. It even mentions that in the DHCPv6 wiki:

https://openwrt.org/docs/techref/odhcpd

leasetime string 12h DHCPv4 address leasetime

It seems you'd be looking for:

ra_useleasetime bool 0 Use configured leasetime as
limit for the preferred and
valid lifetime of a prefix

But, I noticed that is a boolean value...meaning, when enabled to 1, it will change from infinity; and will use the IPv4 leasetime value. Hope this helps.

2 Likes

Thanks, but with that option Luci still says the time remaining is unlimited.

I'll check if the hosts are really not renewing the lease.

1 Like

Looks like I have the same problem, I even set ra_useleasetime to 1 and still no lease time set for dhcp reservation hosts. It still says unlimited for IPv6.

I can set the dhcpv6 leasetime by adding a host after setting ra_useleasetime to 1.

config host
	option mac 'xx'
	option leasetime '2h'

ra_useleasetime should be enabled in all the default installation of OpenWRT. I have a guest router and its IPv6 stops working after I reboot the main router. Once I enabled ra_useleasetime to 1 and set the static lease to 1 day for guest router now the IPv6 comes back within a day. Also there is a bug in LUCI which should correctly show the lease time as 1 day instead of unlimited. Hope this gets fixed soon. How do I report this bug?

Ypu can report real LuCI bugs here:

Or share the details here to see if anyone else can confirm the bug with you.