Page 1 of 1

TP-Link TL-WR1043ND WAN port DHCP settings

Posted: Sat Nov 16, 2013 1:50 am
by Sobol
Hello all! Is it possible to change DHCP lease settings (like lease renewal time) at WAN port in DHCP Dynamic mode? As I see there is no any additional settings at the web page. Is it supported through config files?

Re: TP-Link TL-WR1043ND WAN port DHCP settings

Posted: Sat Nov 16, 2013 3:14 am
by feardc
Yup.

Code: Select all

vim /etc/config/dhcp
Try adding these to config dhcp 'wan' section:

Code: Select all

default-lease-time #
max-lease-time #
Not sure if the config file is rewritten when you change some configuration using web interface though.

Re: TP-Link TL-WR1043ND WAN port DHCP settings

Posted: Wed Nov 20, 2013 2:58 am
by Sobol
It does not work, settings like
config dhcp 'wan'
option interface 'wan'
option ignore '1'
option default-lease-time '1800'
option max-lease-time '86400'
not applicable.
As I see in logs router's dhcp client renewal time is the same as default 15 mins:
Nov 20 12:50:56 TL-WR1043ND daemon.notice netifd: wan (901): Sending renew...
Nov 20 12:50:56 TL-WR1043ND daemon.notice netifd: wan (901): Lease of X.X.X.X obtained, lease time 1800
Nov 20 13:05:56 TL-WR1043ND daemon.notice netifd: wan (901): Sending renew...
Nov 20 13:05:56 TL-WR1043ND daemon.notice netifd: wan (901): Lease of X.X.X.X obtained, lease time 1800

Re: TP-Link TL-WR1043ND WAN port DHCP settings

Posted: Wed Nov 20, 2013 8:58 am
by pbix
These settings are controlled on the DHCP server side so unless you have control of the DHCP server you are stuck.

The client can request a lease time but the server gets to decide what the lease time will be.

Re: TP-Link TL-WR1043ND WAN port DHCP settings

Posted: Wed Nov 20, 2013 11:12 pm
by Sobol
pbix wrote:These settings are controlled on the DHCP server side so unless you have control of the DHCP server you are stuck.

The client can request a lease time but the server gets to decide what the lease time will be.
Sure, solved, as described in "RFC 2131 Dynamic Host Configuration Protocol" Link:
Times T1 and T2 are configurable by the server through options. T1
defaults to (0.5 * duration_of_lease). T2 defaults to (0.875 *
duration_of_lease). Times T1 and T2 SHOULD be chosen with some
random "fuzz" around a fixed value, to avoid synchronization of
client reacquisition.
Therefore renewal time is half (15 mins) from leased 30 mins!