View previous topic :: View next topic |
Author |
Message |
bunder Bodhisattva
Joined: 10 Apr 2004 Posts: 5934
|
Posted: Sat Jun 23, 2018 7:08 am Post subject: dhcpcd asking for a lease too frequently |
|
|
Not a major problem, but figured I'd ask around... is it just me or is dhcpcd not adhering to its lease time?
Code: | dhcpd.conf
default-lease-time 3600; # one hour
max-lease-time 14400; # four hours |
Code: | daemon.log
Jun 23 02:35:14 firewall dhcpd: DHCPREQUEST for 192.168.0.12 from 80:fa:5b:48:f2:6e via eth1
Jun 23 02:35:14 firewall dhcpd: DHCPACK on 192.168.0.12 to 80:fa:5b:48:f2:6e via eth1
Jun 23 03:05:14 firewall dhcpd: DHCPREQUEST for 192.168.0.12 from 80:fa:5b:48:f2:6e via eth1
Jun 23 03:05:14 firewall dhcpd: DHCPACK on 192.168.0.12 to 80:fa:5b:48:f2:6e via eth1 |
That's only half an hour, not an hour. _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
|
freke l33t
Joined: 23 Jan 2003 Posts: 977 Location: Somewhere in Denmark
|
Posted: Sat Jun 23, 2018 7:32 am Post subject: |
|
|
A DHCP client automatically attempts to renew its lease as soon as 50 percent of the lease duration has expired. The DHCP client will also attempt to renew its IP address lease each time that the computer restarts. To attempt a lease renewal, the DHCP client sends a DHCPREQUEST packet directly to the DHCP server from which the client obtained the lease.
If the DHCP client fails to renew its lease the first time, then the DHCP client broadcasts a DHCPDISCOVER packet to update its address lease when 87.5 percent of the current lease duration expires. At this stage, the DHCP client accepts a lease that any DHCP server has issued. |
|
Back to top |
|
|
ct85711 Veteran
Joined: 27 Sep 2005 Posts: 1791
|
Posted: Sat Jun 23, 2018 7:46 am Post subject: |
|
|
From my understanding, and from what a quick search on DHCP renew process works, that is as expected. In short, by dhcp will try initially at lease time/2; if that fails, it tries again about 3/4-7/8 of lease time. DHCP is designed that it renews before the ip lease expires else once it expires it drops full network and have to start from the beginning and request a new lease (at the same time interrupting network communications). Overall, having such a short lease time, is not necessarily a good thing with all the extra traffic unless you have a lot of devices coming and leaving the network in a short time fame. I'd recommend you look at your overall network usage and figure out if you need such a short lease time. Even if you do have such a high change in devices on the network, it may be better to break up your network regions such that ip leases are in different subnets based on each router/AP. I'd envision this usage would be more likely in like a coffee shop setting (i.e Starbucks or such).
http://www.tcpipguide.com/free/t_DHCPLeaseRenewalandRebindingProcesses-2.htm |
|
Back to top |
|
|
bunder Bodhisattva
Joined: 10 Apr 2004 Posts: 5934
|
Posted: Sun Jun 24, 2018 12:52 am Post subject: |
|
|
Hmm. I guess that makes sense, maybe I'll bump up the lease time a little. Thanks _________________
Neddyseagoon wrote: | The problem with leaving is that you can only do it once and it reduces your influence. |
banned from #gentoo since sept 2017 |
|
Back to top |
|
|
|