Rama, you've basically asked the same question 3 times now. PLEASE don't do that! Just keep the original
thread going. It keeps the message board from getting untidy.
There is no absolute way to do what you want. There's no central authority in TCP/IP that hands out IP addresses. Each machine that participates in the network is free to select one
or more addresses to service.
Actually, there's sort of a central authority, and that's DHCP. But DHCP cannot forbid machines from grabbing any address they want, it just manages a database of addresses that it can assign to machines that solicit it.
All you can do is ping each possible IP address in the subnet. Excluding, of course, the network and broadcast addresses. If a machine answers the ping. If it does not, one of the following is true:
1. No machine has been configured for that address
2. The machine that responds to that address is not currently live on the network.
3. A machine is using that address, but has been instructed not to respond to PING requests (usually by firewall rules).
4. The address may be served up by DHCP, but at the moment, no machine has been assigned to it.
Actually, I had to take an inventory just this past Friday. I needed a new IP address for a
test server. At one time almost all my public IP addresses were assigned, but over the years, many of them had fallen idle. So I pinged all possible addresses to see which ones were still in use.