How to find available IP addresses?
Hi guys,
I would like to write a script (using perl or shell, etc) to find available IP addresses in my network. I really don't know where to start.
Here's what I would like the script to do:
Ping (or any other tool that may work) a range of IPs (example: 0.0.0.1 to 0.0.0.255). Then whenever an IP replies, it means that its already being used somewhere so this IP will be sent to a file called usedIP, but if the IP gives no response, then chances are that the IP is not being used. So this IP will be sent to a file called availableIP.
Could you guys give me some hint/help on how I can accomplish this?
Cheers!
|