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
--