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 / October 2007

Tip: Looking for answers? Try searching our database.

remote type

Thread view: 
ione2z@yahoo.com - 10 Oct 2007 21:02 GMT
Hi all,

how can I find out what some ip represents on LAN (ex. router, switch,
server etc)?

thx....
lord.zoltar@gmail.com - 10 Oct 2007 21:23 GMT
On Oct 10, 4:02 pm, ion...@yahoo.com wrote:
> Hi all,
>
> how can I find out what some ip represents on LAN (ex. router, switch,
> server etc)?
>
> thx....

I don't think an IP address can tell you anything about the device
that it is associated with.
ione2z@yahoo.com - 10 Oct 2007 21:34 GMT
Maybe is better question how can I find this devices on LAN?
Mark Space - 11 Oct 2007 00:23 GMT
> Maybe is better question how can I find this devices on LAN?

Well, first, the device may not be on your LAN at all.  (Here I mean LAN
= Ethernet segment.)

But if you just want to talk to the device...

int [] addr = { 192, 168, 1, 0 };
InetAddress deviceInetAddr = InetAddress.getByAddr( addr );
Socket deviceSocket = new Socket( deviceInetAddr, somePort );
out = new PrintWriter( deviceSocket.getOutputStream(), true );
in = new BufferedReader( new InputStreamReader(
        deviceSocket.getInputStream() ) );

Note: not syntax checked or compiled...

http://java.sun.com/docs/books/tutorial/networking/sockets/index.html

http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html
Daniel Pitts - 11 Oct 2007 03:06 GMT
> Hi all,
>
> how can I find out what some ip represents on LAN (ex. router, switch,
> server etc)?
>
> thx....

google for nmap. :-)

Generally, you'd have to ask the device what it is, and not every device
will tell you.  Perhaps if you were more specific on *why* you need to
know this information? Its not generally that useful.

Signature

Daniel Pitts' Tech Blog: <http://virtualinfinity.net/wordpress/>

Roedy Green - 11 Oct 2007 03:09 GMT
>how can I find out what some ip represents on LAN (ex. router, switch,
>server etc)?

see http://mindprod.com/jgloss/ip.html

Internal IPs usually have the form 192.168.0.1 .. 192.168.255.254
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Lew - 11 Oct 2007 08:04 GMT
>> how can I find out what some ip represents on LAN (ex. router, switch,
>> server etc)?
>
> see http://mindprod.com/jgloss/ip.html
>
> Internal IPs usually have the form 192.168.0.1 .. 192.168.255.254

Or one of the other IP ranges allocated for the purpose.

Signature

Lew

RedGrittyBrick - 11 Oct 2007 10:34 GMT
>>> how can I find out what some ip represents on LAN (ex. router, switch,
>>> server etc)?
[quoted text clipped - 4 lines]
>
> Or one of the other IP ranges allocated for the purpose.

I suspect Lew refers to RFC1918 published in 1996.
http://www.faqs.org/rfcs/rfc1918.html

However, some (non IT) businesses internally use IP-address ranges that
they were allocated prior to 1996.
Roedy Green - 15 Oct 2007 04:10 GMT
>> Internal IPs usually have the form 192.168.0.1 .. 192.168.255.254
>
>Or one of the other IP ranges allocated for the purpose.

There are others possibilities, not seen as often, see
http://mindprod.com/jgloss/ip.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Roedy Green - 11 Oct 2007 03:12 GMT
>how can I find out what some ip represents on LAN (ex. router, switch,
>server etc)?

You would have to probe the device, perhaps with a generic GET on port
80 and see what happens.  I am unaware of any protocol by which
devices identify their powers other that which ports they respond to.

Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Gordon Beaton - 11 Oct 2007 08:10 GMT
> how can I find out what some ip represents on LAN (ex. router,
> switch, server etc)?

With SNMP. Or by keeping track of the addresses you assigned to those
devices when you installed them. There is no magic information in the
numbers unless you choose to assign them that way.

/gordon

--


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.