TP-Link TL-WR1043ND WAN port DHCP settings

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Post Reply
Sobol
Posts: 16
Joined: Wed Jun 12, 2013 10:30 pm

TP-Link TL-WR1043ND WAN port DHCP settings

Post 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?
Last edited by Sobol on Wed Nov 20, 2013 6:58 am, edited 1 time in total.

User avatar
feardc
Posts: 8
Joined: Mon Nov 11, 2013 4:17 pm
Location: Sweden
Contact:

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

Post 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.
Gargoyle 1.6.2 @ TL-WR1043ND v1.11 + 4GB USB

Sobol
Posts: 16
Joined: Wed Jun 12, 2013 10:30 pm

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

Post 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

pbix
Developer
Posts: 1366
Joined: Fri Aug 21, 2009 5:09 pm

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

Post 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.
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Sobol
Posts: 16
Joined: Wed Jun 12, 2013 10:30 pm

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

Post 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!

Post Reply