Networking Forums

Networking Forums > Computer Networking > Linux Networking > Detecting unused IP addresses in a subnet using ping?

Reply
Thread Tools Display Modes

Detecting unused IP addresses in a subnet using ping?

 
 
dkarthik@gmail.com
Guest
Posts: n/a

 
      07-09-2008, 06:06 AM
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
 
Reply With Quote
 
 
 
 
Tauno Voipio
Guest
Posts: n/a

 
      07-09-2008, 07:33 AM
(E-Mail Removed) 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

 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      07-09-2008, 10:26 AM
Hello,

Tauno Voipio a écrit :
> (E-Mail Removed) 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.
 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      07-10-2008, 01:31 AM
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.

You have to ask the network administrator.

DS
 
Reply With Quote
 
Dave {Reply Address in.Sig}
Guest
Posts: n/a

 
      07-10-2008, 03:13 AM
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
 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      07-10-2008, 06:48 AM
On Jul 9, 8:13*pm, "Dave {Reply Address in.Sig}" <noon...@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
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Reserved addresses in subnet & Number of subnets unruh Windows Networking 0 01-11-2010 03:56 AM
Problems accessing DMZ (different subnet) addresses w/ PPTP VPN Henry Windows Networking 3 01-26-2007 11:10 PM
Linux server taking unused (and used) IP addresses Ken Anderson Linux Networking 1 07-30-2003 07:17 AM
Re: Cannot ping host in another subnet M. Swope Linux Networking 1 06-24-2003 10:34 PM
Re: Cannot ping host in another subnet Michael Heiming Linux Networking 1 06-24-2003 06:36 PM



1 2 3 4 5 6 7 8 9 10 11