What's new

Solved DHCP - listing of IP leases?

Jeje2

Regular Contributor
Is there a way to see a listing of all IP leases the routers DHCP server has currently distributed?
Active or passive at the moment, but valid within the lease time. (Default lease time is 86400 seconds = 1 day)

I at least would like to monitor every now and then that no unwanted MAC's and IP's enter our network and thus look at the leases my DHCP server has distributed.
(Yes I have manually assigned all known devices of our household)

If it has any relevance, using the RT-BE86U

So how could I see a list of the devices?
(Active devices one should see in network client status - but it ain't showing either all of them. For example my own phone is most often not seen in the list even though using network simultaneously)
 
Another way to list DHCP leases is to use SSH. Example:
For main LAN DHCP leases
Code:
cat /var/lib/misc/dnsmasq.leases
For Guest Network Pro DHCP leases (example shows two Guest Network Pro profiles):
Code:
cat /var/lib/misc/dnsmasq-1.leases
cat /var/lib/misc/dnsmasq-2.leases
One could setup a "batch" file to list all the leases. For example using Plink (part of Putty) on Windows one could create a ".bat" file like the following to list the leases.
Code:
plink.exe -batch -ssh -l <username> -pw <password> <router IP address> "cat /var/lib/misc/dnsmasq.leases; cat /var/lib/misc/dnsmasq-1.leases; cat /var/lib/misc/dnsmasq-2.leases"

PAUSE
 
Similar threads
Thread starter Title Forum Replies Date
Jeje2 DHCP Manually assigned IP not used ASUS Wi-Fi 13

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top