From: dkarthik on
Hello All,

Is there a way to find all the unused IP addresses of a particular
subnet using ping command? If yes, what is the parameter to be passed
to the ping command?

This is for a enterprise intranet.

For example, the subnet is 16.138.189 and I want to find some unused
IP adddresses in this subnet to use.

Thanks & Regards,

Karthik
From: Tauno Voipio on
dkarthik(a)gmail.com wrote:
> Hello All,
>
> Is there a way to find all the unused IP addresses of a particular
> subnet using ping command? If yes, what is the parameter to be passed
> to the ping command?
>
> This is for a enterprise intranet.
>
> For example, the subnet is 16.138.189 and I want to find some unused
> IP adddresses in this subnet to use.
>

The simple response is: DO NOT.

Many hosts, espeially in the current Windows world,
do not respond to pings, so you can tramp on some
quietly lurking host's address.

Ask the network administrator for the addresses,
if this is for a legitimate purpose.

--

Tauno Voipio
tauno voipio (at) iki fi

From: Pascal Hambourg on
Hello,

Tauno Voipio a �crit :
> dkarthik(a)gmail.com wrote:
>
>> Is there a way to find all the unused IP addresses of a particular
>> subnet using ping command?

> The simple response is: DO NOT.
>
> Many hosts, espeially in the current Windows world,
> do not respond to pings

But they do reply to ARP queries which come before the ping request. No
ARP reply -> no host. So you can ping an IP address until you receive a
message "Destination Host Unreachable" indicating that no host on the
network claimed the IP address.

Of course ping is not the best tool for this task. arping would be more
efficient.
From: David Schwartz on
On Jul 9, 3:26 am, Pascal Hambourg <boite-a-s...(a)plouf.fr.eu.org>
wrote:

> But they do reply to ARP queries which come before the ping request. No
> ARP reply -> no host. So you can ping an IP address until you receive a
> message "Destination Host Unreachable" indicating that no host on the
> network claimed the IP address.
>
> Of course ping is not the best tool for this task. arping would be more
> efficient.

That won't help. The device may simply be unable or unwilling to reply
to ARP requests at that particular time. It might be off, or
rebooting. It may also be an IP address inside a range that is
dynamically assigned.

You cannot detect unused IP addresses by looking at ARP replies.
Unless by "unused" you mean precisely "no response to ARP replies".

Consider a computer that dual boots between two OSes and each has a
different IP address assigned. At least one of those addresses will
appear unused at any given time.

You have to ask the network administrator.

DS
From: David Schwartz on
On Jul 9, 8:13 pm, "Dave {Reply Address in.Sig}" <noon...(a)llondel.org>
wrote:

> If it's assigned by DHCP then chances are they'll both get the same one.

True. I can think of quite a few reasons they wouldn't get the same
one, but those are all rare.

> You'll find that very often there's a ping to an address as part of the DHCP
> transaction when a new address is assigned (as opposed to a refresh) just
> to check that there isn't already something out there using it.

Right, but we got here because we understand that 'ping' is not a good
test of IP usage.

> > You have to ask the network administrator.

> This is, of course, the best answer, especially if you happen to want a
> spare address for testing something.

Definitely.

In many cases, no response to an ARP query is good enough to find an
IP for short-term testing. It depends on how critical the network is,
of course.

DS
 | 
Pages: 1
Prev: OpenVPN tun adapter
Next: problem installing NIC