Static Leases

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Author Message
wilma
DD-WRT Novice


Joined: 27 Jan 2009
Posts: 44

PostPosted: Mon Mar 16, 2020 14:39    Post subject: Static Leases Reply with quote
I've set my static leases via commands in the past without any issues using instructions detailed here.
https://wiki.dd-wrt.com/wiki/index.php/Static_DHCP#How_to_add_static_leases_into_dhcp_by_command

However I just tried this with my current build (41586) and only the first entry works. The rest are empty. Does anyone have an idea what the problem might be? Thanks.
Sponsor
SurprisedItWorks
DD-WRT Guru


Joined: 04 Aug 2018
Posts: 1447
Location: Appalachian mountains, USA

PostPosted: Mon Mar 16, 2020 15:53    Post subject: Re: Static Leases Reply with quote
wilma wrote:
I've set my static leases via commands in the past without any issues using instructions detailed here.
https://wiki.dd-wrt.com/wiki/index.php/Static_DHCP#How_to_add_static_leases_into_dhcp_by_command

However I just tried this with my current build (41586) and only the first entry works. The rest are empty. Does anyone have an idea what the problem might be? Thanks.

That document looks really old. I handle static leases by adding a line like this, for each one, to the Additional Dnsmasq Options window in GUI>Services>Services:

dhcp-host=xx:xx:xx:xx:xx:xx,MyPrinter,192.168.1.50,1440m

Choose each static IP address outside the DHCP range, stay away from 1 and 255 in the last component of the address, and of course avoid the router's own IP. The expiration interval at the end I believe can be set to "infinite", but I've not tried it. The device name can be whatever you like (should only affect local DNS and the GUI>Status displays), but some special characters may cause trouble, so don't push it.

The entire contents of that Additional DNSmasq Options window is in nvram variable dnsmasq_options, so if you really, really need to handle this in the CLI, you can cook up a way to edit that variable. If you are a linux person, it should be fairly simple.

This method is fine for a modest number of static leases, but if you have a vast number, you'll need a different approach.

_________________
2x Netgear XR500 and 3x Linksys WRT1900ACSv2 on 53544: VLANs, VAPs, NAS, station mode, OpenVPN client (AirVPN), wireguard server (AirVPN port forward) and clients (AzireVPN, AirVPN, private), 3 DNSCrypt providers via VPN.
WENED
DD-WRT Guru


Joined: 30 May 2017
Posts: 582
Location: Rural Manitoba

PostPosted: Mon Mar 16, 2020 16:24    Post subject: Reply with quote
Don't know if would be helpful, but if you PM me I can show you what I do to setup 99 static leases and keep them organized with very little effort. One by one is OK until you get to a large number and then it becomes a nightmare to re-install and maintain.
_________________
Starlink & DSL -> TPLink TL-R470T+
->
WRT3200acm Master WDS 5GHz 80Mhz CH 100 (+6) r55819
Ath1 2.4Ghz Disabled
99 Static Leases
ExpressVPN

WRT3200acm r55819 WDS Station 5Ghz
Ath1 AP N/G Mixed Channel 11 HT40

WRT1900Ac V1 5Ghz r55819 WDS Station
(Defective, no 2.4Ghz but 5Ghz works great)

WRT1900AC V1 5Ghz AC 80Mhz WDS Station r55819
2.4Ghz AP Ch1 HT20 Mixed

WRT1900ACS SPARE r54914
WRT1900AC SPARE r54914
WRT1900AC V1 5Ghz AC 80Mhz WDS-AP r55819
2.4Ghz AP Ch1 HT20 Mixed

WRT54G DD-WRT v3.0-r37305 micro AP CH 6 Mixed - Not in use

3200 Master -> LAN -> 1900ACS -> WDS 5Ghz -> 1900 V1
3200 Master -> WDS -> 3200 Slave & 1900V1
wilma
DD-WRT Novice


Joined: 27 Jan 2009
Posts: 44

PostPosted: Mon Mar 16, 2020 19:00    Post subject: Reply with quote
Not that it's a contest, but I have 97. :)
And yes, one at a time would be a royal PITA.

PM sent. Thanks!
WENED
DD-WRT Guru


Joined: 30 May 2017
Posts: 582
Location: Rural Manitoba

PostPosted: Mon Mar 16, 2020 19:16    Post subject: Reply with quote
wilma wrote:
Not that it's a contest, but I have 97. Smile
And yes, one at a time would be a royal PITA.

PM sent. Thanks!


PM'd my procedure. I don't think there is a limit on number of leases as long as your DHCP starts outside your list. I used 99 as it is easy to remember to start my DHCP at 100.

Also once you get a handle on it you find it easy to organize, mine is sequential by IP.

And here's a real kicker, if you already have a list in the router, take a backup, open the backup and copy/paste the list into your new static file.

_________________
Starlink & DSL -> TPLink TL-R470T+
->
WRT3200acm Master WDS 5GHz 80Mhz CH 100 (+6) r55819
Ath1 2.4Ghz Disabled
99 Static Leases
ExpressVPN

WRT3200acm r55819 WDS Station 5Ghz
Ath1 AP N/G Mixed Channel 11 HT40

WRT1900Ac V1 5Ghz r55819 WDS Station
(Defective, no 2.4Ghz but 5Ghz works great)

WRT1900AC V1 5Ghz AC 80Mhz WDS Station r55819
2.4Ghz AP Ch1 HT20 Mixed

WRT1900ACS SPARE r54914
WRT1900AC SPARE r54914
WRT1900AC V1 5Ghz AC 80Mhz WDS-AP r55819
2.4Ghz AP Ch1 HT20 Mixed

WRT54G DD-WRT v3.0-r37305 micro AP CH 6 Mixed - Not in use

3200 Master -> LAN -> 1900ACS -> WDS 5Ghz -> 1900 V1
3200 Master -> WDS -> 3200 Slave & 1900V1
wilma
DD-WRT Novice


Joined: 27 Jan 2009
Posts: 44

PostPosted: Tue Mar 17, 2020 15:24    Post subject: Reply with quote
I want to thank WENED for providing a thorough and very helpful procedure for importing my static leases. I appreciate the great support from members on this forum!
Bootlegninja
DD-WRT Novice


Joined: 25 Aug 2010
Posts: 9

PostPosted: Tue Mar 17, 2020 16:59    Post subject: Reply with quote
WENED wrote:
Don't know if would be helpful, but if you PM me I can show you what I do to setup 99 static leases and keep them organized with very little effort. One by one is OK until you get to a large number and then it becomes a nightmare to re-install and maintain.


Definitely a nightmare. I've set up a mix of static leases and placeholders in it as well for a total of 99. A complete set up by hand if I have to wipe my settings is nearly a half day job, so I cringe if I have to deal with static IP leases.
CantRepeat
DD-WRT User


Joined: 18 Oct 2017
Posts: 153

PostPosted: Thu Mar 19, 2020 16:41    Post subject: Reply with quote
WENED wrote:
Don't know if would be helpful, but if you PM me I can show you what I do to setup 99 static leases and keep them organized with very little effort. One by one is OK until you get to a large number and then it becomes a nightmare to re-install and maintain.


Sent a PM as I could use some help with loading static IPs.

_________________
-Tim
WENED
DD-WRT Guru


Joined: 30 May 2017
Posts: 582
Location: Rural Manitoba

PostPosted: Thu Mar 19, 2020 16:58    Post subject: Reply with quote
CantRepeat wrote:
WENED wrote:
Don't know if would be helpful, but if you PM me I can show you what I do to setup 99 static leases and keep them organized with very little effort. One by one is OK until you get to a large number and then it becomes a nightmare to re-install and maintain.


Sent a PM as I could use some help with loading static IPs.


Responded yesterday. Let me know if you did not receive PM and I will resend

_________________
Starlink & DSL -> TPLink TL-R470T+
->
WRT3200acm Master WDS 5GHz 80Mhz CH 100 (+6) r55819
Ath1 2.4Ghz Disabled
99 Static Leases
ExpressVPN

WRT3200acm r55819 WDS Station 5Ghz
Ath1 AP N/G Mixed Channel 11 HT40

WRT1900Ac V1 5Ghz r55819 WDS Station
(Defective, no 2.4Ghz but 5Ghz works great)

WRT1900AC V1 5Ghz AC 80Mhz WDS Station r55819
2.4Ghz AP Ch1 HT20 Mixed

WRT1900ACS SPARE r54914
WRT1900AC SPARE r54914
WRT1900AC V1 5Ghz AC 80Mhz WDS-AP r55819
2.4Ghz AP Ch1 HT20 Mixed

WRT54G DD-WRT v3.0-r37305 micro AP CH 6 Mixed - Not in use

3200 Master -> LAN -> 1900ACS -> WDS 5Ghz -> 1900 V1
3200 Master -> WDS -> 3200 Slave & 1900V1
CantRepeat
DD-WRT User


Joined: 18 Oct 2017
Posts: 153

PostPosted: Thu Mar 19, 2020 18:14    Post subject: Reply with quote
Bootlegninja wrote:
WENED wrote:
Don't know if would be helpful, but if you PM me I can show you what I do to setup 99 static leases and keep them organized with very little effort. One by one is OK until you get to a large number and then it becomes a nightmare to re-install and maintain.


Definitely a nightmare. I've set up a mix of static leases and placeholders in it as well for a total of 99. A complete set up by hand if I have to wipe my settings is nearly a half day job, so I cringe if I have to deal with static IP leases.


Yes, sorry, I did get it. Had a hard time figuring out how to get to PMs with the PM send button.

_________________
-Tim
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14248
Location: Texas, USA

PostPosted: Thu Mar 19, 2020 18:25    Post subject: Reply with quote
CantRepeat wrote:
Yes, sorry, I did get it. Had a hard time figuring out how to get to PMs with the PM send button.


Wouldn't be so difficult if they'd upgrade the forum software with something not so antique lol

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
CantRepeat
DD-WRT User


Joined: 18 Oct 2017
Posts: 153

PostPosted: Sun Mar 22, 2020 10:01    Post subject: Reply with quote
Is there a method to do this with port forwarding?
_________________
-Tim
WENED
DD-WRT Guru


Joined: 30 May 2017
Posts: 582
Location: Rural Manitoba

PostPosted: Sun Mar 22, 2020 12:18    Post subject: Reply with quote
CantRepeat wrote:
Is there a method to do this with port forwarding?


Much the same as setting static leases, the Forward and Port_Forward can also be done via a command line. The list can be placed into a Linux text file and loaded as required.

_________________
Starlink & DSL -> TPLink TL-R470T+
->
WRT3200acm Master WDS 5GHz 80Mhz CH 100 (+6) r55819
Ath1 2.4Ghz Disabled
99 Static Leases
ExpressVPN

WRT3200acm r55819 WDS Station 5Ghz
Ath1 AP N/G Mixed Channel 11 HT40

WRT1900Ac V1 5Ghz r55819 WDS Station
(Defective, no 2.4Ghz but 5Ghz works great)

WRT1900AC V1 5Ghz AC 80Mhz WDS Station r55819
2.4Ghz AP Ch1 HT20 Mixed

WRT1900ACS SPARE r54914
WRT1900AC SPARE r54914
WRT1900AC V1 5Ghz AC 80Mhz WDS-AP r55819
2.4Ghz AP Ch1 HT20 Mixed

WRT54G DD-WRT v3.0-r37305 micro AP CH 6 Mixed - Not in use

3200 Master -> LAN -> 1900ACS -> WDS 5Ghz -> 1900 V1
3200 Master -> WDS -> 3200 Slave & 1900V1
CantRepeat
DD-WRT User


Joined: 18 Oct 2017
Posts: 153

PostPosted: Thu Apr 02, 2020 12:30    Post subject: Reply with quote
WENED wrote:
CantRepeat wrote:
Is there a method to do this with port forwarding?


Much the same as setting static leases, the Forward and Port_Forward can also be done via a command line. The list can be placed into a Linux text file and loaded as required.


Many thanks to you sir for the static lease info; it worked perfectly.

Anyone know the netmask priority command line to load IP addresses into the QOS interface?

_________________
-Tim
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum