I have Ubuntu server 12.10 as DRBL and CloneZilla. How can I find out how many IP addresses have been assigned to the clients. How do I control/monitor the DHCP daemon service(stop/start/status)?
The script used to control the DHCP daemon depends on which one you're using. I'm assuming isc-dhcp-server. Then it would be:
If that doesn't work, look in
To see "how many ip addresses have been assigned to clients", which was your original request, you can do this:
This will plainly give you the number of assigned addresses.
Again, if you get an error about
Note that as mentioned in another answer, this will miss the distinction between assigned and active (i.e. with a system using them at the moment) addresses. Also, if a client is forcefully shutdown and doesn't release the lease, you will also get unused addresses reported as assigned.
To list all the active Clients IP's you can use namp.It can list you both DHCP and as well as static clients also.
you can install namp in your PC with
Then to list all the active clients you can do like ,
here the IP's from 0 to 255 will be scanned and active IP's will be showup.
The better network monitor I can found my self is nethogs. you can get it by installing with
Can show the traffic monitor in your terminal.
hope this can help you.
If you are using
To control the
To monitor the
This method will work on a headless server (non-GUI) for "assigned DHCP leases only", login, enter the following command from the terminal
If NMAP has been installed enter this command from the terminal
This method will work on this subnet and scan 256 addressees, and output IP and MAC addresses. This will respond if the HOST is down with an IP Address that has no assignment and will respond with MAC and IP Address if the HOST is up.
Depending on if a switch or router is between the PC and the network, and depending what "network layer 2/3/4" router or switch operates at.
If DHCPDUMP has been installed enter this command from the terminal