Re: [Dnsmasq-discuss] Wrong dhcp-renewal-time
Thanks Simon, "infinite" seems to be working fine - I guess something with the year 2038 (?) as it seems that 36250days x 86400sec = 3.132.000.000 which is less than 2^32 (4.294.967.296). I'll see into incorporating the "infinite" stuff in the code. Best, Andrija On Thu, 20 Feb 2020 at 15:35, Simon Kelley wrote: > > > On 20/02/2020 10:49, Andrija Panic wrote: > > Hi all, > > > > first time posting to this ML. > > > > We are using dnsmasq with CloudStack to provide DNS/DHCP services. > > > > Recently we've changed the lease duration to 36250 days (98y, i.e. > > closer to infinity) to make sure that the clients will not renew its > > lease for a lng time (for reasons known to us). > > > > Now, the lease time is sent fine to the client, but the > > dhcp-renewal-time and dhcp-rebinding-time are NOT set to 50% (87.5%) of > > the lease time, but instead to "only" ~650 days, which beats the purpose > > of us increasing it to 36250 days. > > > > Can anyone advise what is happening and if this might be a known issue? > > > > Here's an example from the log (dnsmasq version 2.76 on Debian 9) > > > > root@r-3199-VM:~# cat /var/log/dnsmasq.log > > > > |:| > > |Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 51 > > lease-time 36250d| > > |Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 58 > > T1 649d19h57m19s| > > > > Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 59 > > T2 649d19h57m20s > > > > > > Thanks, > > > > -- > > > > Andrija Panić > > > > These times are 32-bit values, expressed in seconds, so I suspect that > your 98 years has overflowed the variable. Either that or the > end-of-lease time is after 2038, and you're running on a platform with > 32bt time_t, and have overflowed that. > > Instead of messing with very long lease times, why not just set the > lease time to "infinite", which should solve these problems. > > Simon. > > > ___ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss > -- Andrija Panić ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Re: [Dnsmasq-discuss] Wrong dhcp-renewal-time
On 20/02/2020 10:49, Andrija Panic wrote: > Hi all, > > first time posting to this ML. > > We are using dnsmasq with CloudStack to provide DNS/DHCP services. > > Recently we've changed the lease duration to 36250 days (98y, i.e. > closer to infinity) to make sure that the clients will not renew its > lease for a lng time (for reasons known to us). > > Now, the lease time is sent fine to the client, but the > dhcp-renewal-time and dhcp-rebinding-time are NOT set to 50% (87.5%) of > the lease time, but instead to "only" ~650 days, which beats the purpose > of us increasing it to 36250 days. > > Can anyone advise what is happening and if this might be a known issue? > > Here's an example from the log (dnsmasq version 2.76 on Debian 9) > > root@r-3199-VM:~# cat /var/log/dnsmasq.log > > |:| > |Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 51 > lease-time 36250d| > |Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 58 > T1 649d19h57m19s| > > Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 59 > T2 649d19h57m20s > > > Thanks, > > -- > > Andrija Panić > These times are 32-bit values, expressed in seconds, so I suspect that your 98 years has overflowed the variable. Either that or the end-of-lease time is after 2038, and you're running on a platform with 32bt time_t, and have overflowed that. Instead of messing with very long lease times, why not just set the lease time to "infinite", which should solve these problems. Simon. ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
[Dnsmasq-discuss] Wrong dhcp-renewal-time
Hi all, first time posting to this ML. We are using dnsmasq with CloudStack to provide DNS/DHCP services. Recently we've changed the lease duration to 36250 days (98y, i.e. closer to infinity) to make sure that the clients will not renew its lease for a lng time (for reasons known to us). Now, the lease time is sent fine to the client, but the dhcp-renewal-time and dhcp-rebinding-time are NOT set to 50% (87.5%) of the lease time, but instead to "only" ~650 days, which beats the purpose of us increasing it to 36250 days. Can anyone advise what is happening and if this might be a known issue? Here's an example from the log (dnsmasq version 2.76 on Debian 9) root@r-3199-VM:~# cat /var/log/dnsmasq.log : Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 51 lease-time 36250d Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 58 T1 649d19h57m19s Feb 20 02:21:17 dnsmasq-dhcp[26752]: 3440196161 sent size: 4 option: 59 T2 649d19h57m20s Thanks, -- Andrija Panić ___ Dnsmasq-discuss mailing list Dnsmasq-discuss@lists.thekelleys.org.uk http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss