DHCP Pool IPs Left
-
I moved my DHCP services over to the pfsense system. I do deployments a lot and part of that issue is setup and tear down of systems for demos and test. ... But I keep running the DHCP pool out of IPs.
I need a quick / graphical or KPI posting of "how many IPs are left in the pool".
I looked around for plugin , or means to run a task that would list this information but did not see one.
The other feature that would help is to select leases (dynamic by string such as "test" in hostname) and remove the lease.
I have also been exploring a service like NetBlox. But did not see any good integration of NetBlox / Infoblox / BloxOne with pfSense. Maybe others have poked around this topic.
-
@penguinpages said in DHCP Pool IPs Left:
"how many IPs are left in the pool".
Just look at the status lease page.. At the bottom leases in use.
From there you can also remove old leases. But if your having a problem running out of leases - you prob have your lease time set to long. I believe it defaults to 2 hours. So even if something got a lease and then you removed it - that lease would be able to be reissued 2 hours after last renewal.
You could set your lease time to like 30 minutes or even like 5 minutes if you needed to.. But also how large is your IP range for your leases. A /24 should give you 250 some Ips to work with - that is a lot of systems your deploying. Up the range use a /23 vs a /24 or even a /22, etc.
Running out of leases is always a self inflicted wound.. Your lease time is too long for how many clients cycle through your network, or your network is too small for how many clients you want on that network. You have all rfc1918 space to work with, so /23 /22 would be easy to use if you going to need more IPs need than /24 on at any given time. I prob wouldn't suggest more than a /22 for active leases on a network - the broadcast with too many chatty clients could be problematic depending. But if your just cycling through setup of devices, etc. I would think a /24 is a lot of devices.. As long as your lease time isn't too long - as soon as a lease has expired, ie hasn't been renewed than that lease can be reissued to different mac address. There is no reason to have to actually delete old expired leases, the dhcpd will reissue them to next client that asks for an IP.
-
You can also enable rrd graphs to keep track of lease usage over time (the setting can be enabled on the DHCP server settings page)
-
I was not quite as clear as I could have been.
The lease number at the bottom I believe is the non-static / reservation set leases. Most of my home devices are all set to static reservations, so its a fight over the 50 IPs left in pool. K8 deployment slurps up 8-10 at a time I just wanted quick and dirty means to see if their was X left so I could deploy another batch / test, select a batch that were destroyed from previous test runs and remove (aka no multiselect: but clearing all dhcp I think will cover this).
I have been avoiding splitting out the environment into another VLAN, as it adds complexity for access to assets (such as my NAS etc)... but I may have to give in on this.
Thanks for responses.
-
@penguinpages well just bump up this mask to something larger so you can have more IPs on this network.
Normally going from say to /23 or /22 from /24 is really low impact. Only static set on the devices would have to be touched. Only issue might be if you have other vlans that bump up right next too to the ip range.
Yeah if your only allowing for 50 ips in teh pool that could be limiting.
That number at the bottom would be lease in the pool, static reservations are set outside the pool so those shouldn't be listed. it shows you the active pool size you have set there as well with the start and end of the pool address.