Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2005

Tip: Looking for answers? Try searching our database.

get IPs at a LAN

Thread view: 
xanoutas - 13 Dec 2005 00:50 GMT
Hi everybody!!I need to find a way to automatically get all the IPs
from a small LAN.?Any ideas?Thanx in advance...:)
Luc The Perverse - 13 Dec 2005 00:53 GMT
> Hi everybody!!I need to find a way to automatically get all the IPs
> from a small LAN.?Any ideas?Thanx in advance...:)

Um . . .  Just keep making DHCP requests?

--
LTP

:)
Alex Molochnikov - 13 Dec 2005 01:51 GMT
Open a socket on a well-known port on each of the hosts in your LAN. If this
is a small LAN, most likely it will be type C network, with up to 254 hosts.
So, start with the host 1, and loop over:
192.168.1.1
192.168.1.2
...
192.168.1.254

(e.g. if your network IP starts with 192.168.1), and see if the socket
throws an exception. To speed things up, you can open 254 sockets at the
same time in asynchronous threads.

Alex Molochnikov
Gestalt Corporation

> Hi everybody!!I need to find a way to automatically get all the IPs
> from a small LAN.?Any ideas?Thanx in advance...:)
Chris Uppal - 13 Dec 2005 07:12 GMT
> Open a socket on a well-known port on each of the hosts in your LAN. If
> this is a small LAN, most likely it will be type C network, with up to
[quoted text clipped - 3 lines]
> ...
> 192.168.1.254

But tell your sysadmin/security people that you are going to be running a scan
first, or you'll likely find yourself politely, but firmly, kicked off the
premises...

   -- chris
Roedy Green - 13 Dec 2005 01:55 GMT
>Hi everybody!!I need to find a way to automatically get all the IPs
>from a small LAN.?Any ideas?Thanx in advance...:)

You know the range of IPs typically used.  See
http://mindprod.com/jglass/ip.html

You probe each machine.  If you can't find a way to talk to it, it is
as if it did not exist.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.