On 03/04/2019 04:56, Bryce Larson wrote: > In many dhcpv6 servers and on layer 3 switches, you can configure the > valid lifetime and the preferred lifetime separately for dhcpv6 leases. > Does that functionality exist in dnsmasq? It doesn't seem to be > documented in the man page. Looking under dhcp-range, the lease time > seems to configure both attributes in the actual dhcp lease. If that > feature is not built in, can that be added?
It's not possible to configure this as the code stands. It would be possible, to change, but not simple, I think. > > Another question I had is if it would be better to have the valid time > be a bit longer than the preferred time by default. I notice on some of > my clients that if the dnsmasq dhcpv6 server is set to a higher lease > time, that on the DHCP Request from the client after the server has > responded with an Advertise, they request 7200 seconds as the preferred > time and 7500 seconds as the valid time. Dnsmasq should honour this request. All the logic associated with calculating the time is in the function calculate_times() in src/rfc3315.c Briefly: if the client asks for times, and they are sane and less than the configured times, they are used. ELSE valid and preferred are both set to the time given in the dhcp-host, or if none, the dhcp-range. If the address is deprecated in the kernel's interface, the preferred time gets set to zero. Cheers, Simon. > > _______________________________________________ > Dnsmasq-discuss mailing list > Dnsmasqfirstname.lastname@example.org > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > _______________________________________________ Dnsmasq-discuss mailing list Dnsmasqemail@example.com http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss