Automatically remove reserved MAC addresses from DHCP Static Mappings
-
How to automatically remove reserved MAC addresses from DHCP Static Mappings, for example, not active for 2 months?
-
@panjali-ganiyev there is no automatic way to do that that I am aware of, you could prob always script something up.. if you have old static leases setup that you no longer need, you can always just click the trashcan icon next to the static entry.
I personally would not automate such a thing - I have many a device that might not be on a specific network for a couple of months.. But if they "are" on that network I want them to have that specific IP, etc.
My phones/tablets are perfect examples of that.. They are normally on my trusted network - but now and then I need to connect them to my iot network to setup a new iot device, etc. is it a requirement they get a specific IP on this network no not really. Just saying 2 months seems like a pretty short amount of time to start clearing static leases that just haven't been used - unless your for sure that device will no longer be used on that network - ever ;)
-
@johnpoz The list of static IP addresses is very large. It would suit me to delete users not connecting for 2 months. If there is no option to delete automatically, maybe there is a way to sort them by long-term lack of connection? So that I manually them out. Thanks for the answer.
-
@panjali-ganiyev hmmm, other than looking back through logs of dhcp I am not aware of a way to know that. static leases don't show up in the dhcpd.leases file
If you handed off your logs to some syslog server it should be quite easy to look up some mac or IP for when the was the last time it got a lease.