In message
<876ed66d-3716-4327-8c27-(E-Mail Removed)>, David
Schwartz wrote:
> On Jul 9, 3:26*am, Pascal Hambourg <boite-a-s...@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.
>
If it's assigned by DHCP then chances are they'll both get the same one.
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.
> 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.
--
Dave
mail da
(E-Mail Removed) (without the space)
http://www.llondel.org
So many gadgets, so little time