Posted: Sun Oct 09, 2022 15:00 Post subject: Static Lease - DHCP Clients - Lease Expiration
When I define static leases with no expiration, why are they showing up in the status/lan/dhcp client list with expiration times? Am I missing something or will these addresses not expire? Thanks. _________________ Linksys WRT3200ACM
VersionDD-WRT v3.0-r50500 std (10/13/22)
Kernel VersionLinux 4.9.330 #3466 SMP Thu Oct 13 02:01:23 +07 2022 armv7l
Linksys RE9000 Extender (WiFi attached)
OpenVPN with PBR: ExpressVPN
Devices: Sonos, Apple, QNAP, Laserjet other
Joined: 31 Jul 2021 Posts: 2146 Location: All over YOUR webs
Posted: Sun Oct 09, 2022 15:35 Post subject:
You can ignore that. If you didn't se a time i.e. left it blank it wont expire. minor visual glitch in UI since the default is 1400, it shows default, does not affect the normal working operation.
Joined: 30 May 2017 Posts: 582 Location: Rural Manitoba
Posted: Sun Oct 09, 2022 15:53 Post subject:
I use 99 static leases on my 3200 and have so for years. When I configure this, which I do from a file or individually change I never put anything in the expiry column (blank). All the leases show up if they are accessed with "static" in the expiry date when I look at lan status.
Just leave the expiry column blank and this should solve your problem. _________________ Starlink & DSL -> TPLink TL-R470T+
->
WRT3200acm Master WDS 5GHz 80Mhz CH 100 (+6) r55460
Ath1 2.4Ghz Disabled
99 Static Leases
ExpressVPN
WRT3200acm r55460 WDS Station 5Ghz
Ath1 AP N/G Mixed Channel 11 HT40
WRT1900Ac V1 5Ghz r55460 WDS Station
(Defective, no 2.4Ghz but 5Ghz works great)
WRT1900AC V1 5Ghz AC 80Mhz WDS Station r55460
2.4Ghz AP Ch1 HT20 Mixed
WRT1900ACS SPARE r54914
WRT1900AC SPARE r54914
WRT1900AC V1 5Ghz AC 80Mhz WDS-AP r55460
2.4Ghz AP Ch1 HT20 Mixed
WRT54G DD-WRT v3.0-r37305 micro AP CH 6 Mixed - Not in use
You can ignore that. If you didn't se a time i.e. left it blank it wont expire. minor visual glitch in UI since the default is 1400, it shows default, does not affect the normal working operation.
Could be fixed but... whos got time for this.
No issue.
What I also discovered was that if the static address is outside of the DHCP range, then they report correctly as static…. Perfect!
UPDATED: Well, maybe I spoke too soon. Initially those with static address higher than the DHCP range were showing as static in the LAN client list, now some are showing the 90day countdown… weird. _________________ Linksys WRT3200ACM
VersionDD-WRT v3.0-r50500 std (10/13/22)
Kernel VersionLinux 4.9.330 #3466 SMP Thu Oct 13 02:01:23 +07 2022 armv7l
Linksys RE9000 Extender (WiFi attached)
OpenVPN with PBR: ExpressVPN
Devices: Sonos, Apple, QNAP, Laserjet other
Posted: Sun Oct 09, 2022 19:41 Post subject: Best practices for static hosts
So a question …
Is there a reason why some devices, wired or wireless, do not take/accept the static address and are still using DHCP addresses?
Other than using the Static setup in the Services Tab, is is possible to assign static addrsss using Dnsmasq and maybe the
dhcp-host command - in order to maintain lists in a file easier? _________________ Linksys WRT3200ACM
VersionDD-WRT v3.0-r50500 std (10/13/22)
Kernel VersionLinux 4.9.330 #3466 SMP Thu Oct 13 02:01:23 +07 2022 armv7l
Linksys RE9000 Extender (WiFi attached)
OpenVPN with PBR: ExpressVPN
Devices: Sonos, Apple, QNAP, Laserjet other
Posted: Sun Oct 09, 2022 21:46 Post subject: Locked up my router ,.. backups are a wonderful thin
So I tried a series of updated dnsmasq commands that locked me out and shut down internet … finally resorted from backup.
I removed all static links and added a series like this… for many devices. When I save and applied the changes … all access even from other devices went haywire.
dhcp-host= MAC address,Dads iPad,192.168.42.210
What did I hose up? _________________ Linksys WRT3200ACM
VersionDD-WRT v3.0-r50500 std (10/13/22)
Kernel VersionLinux 4.9.330 #3466 SMP Thu Oct 13 02:01:23 +07 2022 armv7l
Linksys RE9000 Extender (WiFi attached)
OpenVPN with PBR: ExpressVPN
Devices: Sonos, Apple, QNAP, Laserjet other
Posted: Sun Oct 09, 2022 23:07 Post subject: I’m doing something wrong
OK masters … I’m doing something wrong and maybe am missing something obvious.
It seems anything I try with dnsmasq to assign host name AND IP Address hoses up my config.
I am playing with single entries until I know they are good.
dhcp-host=MACaddress,Dads-Pad,192.168.42.210
Tried both save/apply setting as well as reboot and so far the iPad either picks up an old static access (from deleted static setting) or just doesn’t get access.
It also seems to kill the Internet access to my wired laptop. _________________ Linksys WRT3200ACM
VersionDD-WRT v3.0-r50500 std (10/13/22)
Kernel VersionLinux 4.9.330 #3466 SMP Thu Oct 13 02:01:23 +07 2022 armv7l
Linksys RE9000 Extender (WiFi attached)
OpenVPN with PBR: ExpressVPN
Devices: Sonos, Apple, QNAP, Laserjet other
I have configured 20 devices via "services > static leases" and it works fine for me, as it does for WENED.
However, you also have to know how DHCP works.
1 A device requests a DHCP address
2 the lease expiration time is stored by the router in unix time format in /tmp/dnsmasq.leases (that's where the displayed times in the GUI come from)
3. when the time expires the device requests a new address
4. if the lease time is set to "infinite", the device does not request a new address and usually has to be restarted to get a new address.
5. if the lease time is set to the default value of 1440 then the devices will request a new address after 24h.
Anyway there can be inconsistencies in the GUI, when the router is restarted the data from /tmp/dnsmasq.leases is lost.
This means that devices configured with "infinite" are no longer displayed under DHCP clients (they also do not obtain new addresses).
also I configure my static leases always in the DHCP range - static DHCP aka DHCP reservation is also DHCP
and dnsmasq assigns the configured IP address only to the configured MAC address
only devices that I configure manually get addresses outside the DHCP range
experience shows that you don't do yourself a great favor if you configure many devices with infinite lease time.
As soon as you change something on the network, you have to restart dozens of devices manually.
In addition, as already mentioned, the devices are no longer displayed under "DHCP clients" after a router restart.
the described problem applies in any case for wired LAN devices (my WLAN devices all get 1440).
Joined: 30 May 2017 Posts: 582 Location: Rural Manitoba
Posted: Mon Oct 10, 2022 15:26 Post subject:
Excellent info from ho1Aetoo.
I might add that my configuration is that the first 100 addresses are where all my statics are located including the hosting router. My dhcp addresses begin at 192.168.0.100 and allow for 154 addresses.
One thing I have found is that to reduce problems associated as ho1Aetoo mentioned is to also ensure that all my devices are also coded to static. In some cases this can be issue as many use different mac addresses depending on whether they are on lan or wifi. Because I usually setup my cameras on lan and then put them on wifi I have to be careful that when I setup the statics I use the wifi mac. The best way to accomplish this has been that when I install a device on wifi I check to see what is the mac address, if dhcp has picked it up with a new address I can use this to set the static address correctly.
Although I use WDS in all my routers which allows for the actual mac address to get back to my primary router I have found that using other configurations (extenders) causes the mac address to be modified before getting back to the primary router. That is why I use the above procedure to ensure that I have the correct mac address.
Another problem that can arise is with Android devices, where if you do not set the device to show the true mac address it will present random mac addresses on wifi. This of course can defeat your static setup, but then again if you use the above procedure and ensure that the device is responding with it's true mac address you can never have random dhcp assignments.
Whenever I see a dhcp assignment being made I investigate as I am suspicious of an attack on my system. Because I always code every device in my system to my static list there should never be any dhcp assignments or at least non that I cannot verify, ie. friends or Neighbours to whom I have given my wifi signin information.
This setup has worked extremely well for years. If I have to rebuild from scratch, I load my statics from a file rather than attempt to manually enter all of them. So having 99 possible entries is not really messy and quite easy to maintain. The file I create for loading is derived from my backup file which I periodically update so that I always have an updated list.
So along with ho1Aetoo comments I hope this all helps. _________________ Starlink & DSL -> TPLink TL-R470T+
->
WRT3200acm Master WDS 5GHz 80Mhz CH 100 (+6) r55460
Ath1 2.4Ghz Disabled
99 Static Leases
ExpressVPN
WRT3200acm r55460 WDS Station 5Ghz
Ath1 AP N/G Mixed Channel 11 HT40
WRT1900Ac V1 5Ghz r55460 WDS Station
(Defective, no 2.4Ghz but 5Ghz works great)
WRT1900AC V1 5Ghz AC 80Mhz WDS Station r55460
2.4Ghz AP Ch1 HT20 Mixed
WRT1900ACS SPARE r54914
WRT1900AC SPARE r54914
WRT1900AC V1 5Ghz AC 80Mhz WDS-AP r55460
2.4Ghz AP Ch1 HT20 Mixed
WRT54G DD-WRT v3.0-r37305 micro AP CH 6 Mixed - Not in use
Thank you group for great information…. Slowly getting dnsmasq static definitions working as I hoped.. _________________ Linksys WRT3200ACM
VersionDD-WRT v3.0-r50500 std (10/13/22)
Kernel VersionLinux 4.9.330 #3466 SMP Thu Oct 13 02:01:23 +07 2022 armv7l
Linksys RE9000 Extender (WiFi attached)
OpenVPN with PBR: ExpressVPN
Devices: Sonos, Apple, QNAP, Laserjet other
Posted: Wed Oct 12, 2022 4:29 Post subject: Related: Active Client host Names
Maybe related, is there a reason (or logic) behind the hostnames in the active client table sometimes showing the actual host name (as defined in dnsmasq settings) and other times representing the name as just a “*” ?? Is there anyway to always see the hostnames in the active client table?