Results 1 to 3 of 3
  1. #1
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default Knowing which IP address is active

    From a local network, let say there are 10 PCs, and they have the same network host address ( 192.168.1.xxx ).

    I would like to find out which IP address under 192.168.1.xxx is active, is it possible? though i still don't know their MAC Address.

    SETUP:
    1 out of 10 PCs has the software that could/might log all IP address that are used up by those remaining PCs, without installing any software that could communicate to that PC(who have installed the software)


    Any reply would be appreciated, :)
    freedom exists in the world of ideas

  2. #2
    neilcoffey is offline Senior Member
    Join Date
    Nov 2008
    Posts
    286
    Rep Power
    7

    Default

    Well, essentially you have to "hit" the machines and see if they give off any clues as to being alive.

    A starting point is to ping the machines, which in Java means calling isReachable(), e.g.:

    Java Code:
    if (InetAddress.getByName("198.168.1.1").
        isReachable(1000L)) {
       ...
    }
    There's just one tiny problem with ping: in practice, it probably won't work. For security reasons, many machines refuse to respond to pings nowadays, and many firewalls filter them out. If you have control of the machines and network in question, then the easiest solution is to allow pings. But it depends on whether you have this control.

    If not, you're into trying to hit other common ports (e.g. the one used by Instant Messenger or other crap that is typically installed on PCs) and seeing if you get any "sign of life". (Essentially, you do what hackers do when they're trying to find target machines; there are tools you can download to automate this task.) Again, you have the problem that "not responding to attempted incoming connections" doesn't mean "not active".

  3. #3
    sukatoa's Avatar
    sukatoa is offline Senior Member
    Join Date
    Jan 2008
    Location
    Cebu City, Philippines
    Posts
    556
    Rep Power
    7

    Default

    Thanks for your reply :)

    For security reasons, many machines refuse to respond to pings nowadays
    i've tested this last night with vista/xp...
    pinging vista to xp has the respond, but xp to vista have no respond.... you're right

    but, how about the packet i've seen from the sniffer with protocol type Address Resolution Protocol(ARP)(Request/Reply)?... i sometimes saw this packet logged from the sniffer randomly between 9 sec and 5 minutes(max).

    Can i make this as a key? or this could still be unreliable?
    freedom exists in the world of ideas

Similar Threads

  1. Accessing Active Directory using JNDI
    By Chandran in forum Advanced Java
    Replies: 0
    Last Post: 02-25-2009, 01:04 PM
  2. Close Active Window (?)
    By dcnorman07 in forum New To Java
    Replies: 2
    Last Post: 10-03-2008, 06:55 PM
  3. Changing Active Window
    By jmHoekst in forum New To Java
    Replies: 1
    Last Post: 06-14-2008, 01:21 AM
  4. Check Menu active
    By Mir in forum AWT / Swing
    Replies: 0
    Last Post: 06-12-2008, 07:53 AM
  5. Accessing Active Directory
    By javaplus in forum Advanced Java
    Replies: 1
    Last Post: 01-05-2008, 12:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •