Detecting unused IP addresses in a subnet using ping? - Networking

This is a discussion on Detecting unused IP addresses in a subnet using ping? - Networking ; 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 ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Detecting unused IP addresses in a subnet using ping?

  1. Detecting unused IP addresses in a subnet using ping?

    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

  2. Re: Detecting unused IP addresses in a subnet using ping?

    dkarthik@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


  3. Re: Detecting unused IP addresses in a subnet using ping?

    Hello,

    Tauno Voipio a écrit :
    > dkarthik@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.

  4. Re: Detecting unused IP addresses in a subnet using ping?

    On Jul 9, 3:26*am, Pascal Hambourg
    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

  5. Re: Detecting unused IP addresses in a subnet using ping?

    In message
    <876ed66d-3716-4327-8c27-3411c37a7906@l64g2000hse.googlegroups.com>, David
    Schwartz wrote:

    > On Jul 9, 3:26*am, Pascal Hambourg
    > 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 ve@llondel.org (without the space)
    http://www.llondel.org
    So many gadgets, so little time

  6. Re: Detecting unused IP addresses in a subnet using ping?

    On Jul 9, 8:13*pm, "Dave {Reply Address in.Sig}"
    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 to Thread