Alex Rivera | Logout

List the IP Address of all computers connected to a single LAN

Asked 2010-01-03T03:41:55.643
9

I am writing a program where you connect, for various reasons, to other computers in a LAN. However, rather than having to input the IP address for multiple computers (a pain in the butt), I was wondering if there is a way to list the IP addresses of all the computers in a LAN. I have researched all day, and as of yet have found nothing suitable. Is this because nothing of this sort exists? Thank you in advance.

EDIT: It would seem that with the many views this post is getting, I should post my actual solution. In general, the naming conventions for computers IP addresses on a LAN are the same. example being 192.168.2.*, * being replaced with any valid number. My program detects the IP address, displays it to the user, then asks for the first 3 blocks of IP. It then sequentially scans up to 200 in the given IP naming convention by pinging and waiting for a response. No response, no computer. It can do everything you can do with an IP once it knows it has a computer behind it.

Edit
Report

1 Answer

0

Can you just look at the IP and subnet mask on the network adapter and ping every address? Whichever ones respond can be queried to see if it has whatever you need to connect.

answered 2010-01-03T03:45:15.120

Your Answer