How to Detect the Computers on LAN

This is a discussion on How to Detect the Computers on LAN within the Networking/Device Communication forums, part of the General Programming Boards category; Hi People I am working on a Messenger prepared in JAVA (Backend). I need something, some code that would help ...

  1. #1
    Registered User
    Join Date
    Jan 2004
    Posts
    20

    How to Detect the Computers on LAN

    Hi People

    I am working on a Messenger prepared in JAVA (Backend). I need something, some code that would help in finding the IP Address of the active computers on LAN.

    Thanz
    Arvind
    Just b Crazy abt Life and Programming.....

  2. #2
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    If you ping the multicast address of the local LAN (which has the last client ID) every client will respond:

    Example:
    My IP address is 10.250.2.237 with 255.255.0.0 as netmask.
    Thus, the multicast address for this network is 10.250.255.255

    When I ping the multicast address, every client switched on will answer (although Windows' ping program will only show the first).
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

  3. #3
    S Sang-drax's Avatar
    Join Date
    May 2002
    Location
    Göteborg, Sweden
    Posts
    2,072
    If you use a packet sniffer you will see every client that responds to the echo request.
    Last edited by Sang-drax : Tomorrow at 02:21 AM. Reason: Time travelling

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Numeric addresses for computers
    By great in forum C Programming
    Replies: 4
    Last Post: 08-23-2010, 12:53 PM
  2. How to Write a Program in C to detect the Ethernet Cable?
    By christyyim in forum C Programming
    Replies: 1
    Last Post: 03-11-2009, 05:12 AM
  3. Computers as authors
    By hk_mp5kpdw in forum A Brief History of Cprogramming.com
    Replies: 8
    Last Post: 11-22-2004, 08:55 PM
  4. LAN IP masks?
    By whackaxe in forum Networking/Device Communication
    Replies: 7
    Last Post: 07-12-2004, 05:30 AM
  5. Replies: 5
    Last Post: 11-20-2003, 01:27 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21