2

I'm wondering what is the correct way to count how many IPs are in use in my network according to the dhcpd process.

Is it just a matter of counting "binding state active" lines in dhcpd.leases file? Or it is something more complicated?

Thanks in advance.

facha
  • 1,298
  • 2
  • 16
  • 26

3 Answers3

1

You could use ReportDHCP which parses your dhcp.leases file and provides you with a report that should give you what you are looking for.

Bryan
  • 7,538
  • 15
  • 68
  • 92
0

dhcpd-pools is probably what you want.

Example: dhcpd-pools -c 'path-to-dhcpd.config' -l 'path-to-lease-file' -L11 -sp -r

Explanation: It prints 'Range Headers' and 'Ranges' with '-L11' and then sorts recursively on 'percent' with '-sp -r'

Man page: http://dhcpd-pools.sourceforge.net/man.html

MoonMoon
  • 16
  • 1
-3

use at the command-line: Netsh dhcp server scope 192.168.1.0 show clients

Daniel
  • 6,780
  • 5
  • 31
  • 60
JGrave
  • 1