Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Getting Ip Address

by Joost (Canon)
on Apr 04, 2007 at 19:57 UTC ( [id://608362]=note: print w/replies, xml ) Need Help??


in reply to Getting Ip Address

this link says that you can't do this generally, but that you can get the mac address from visited IPs in the arp cache.

Depending on your OS, you can get at that information in different ways. My linux box seems to store the IP/MAC info in /proc/net/arp, for instance. I have only one machine running here at the moment so it only shows my own address:

IP address HW type Flags HW address Mask + Device 192.168.2.1 0x1 0x2 00:13:F7:27:FB:8A * + eth0

I suppose that you could ping all the IP addresses in your local subnet and then check the arp cache for matching MAC addresses.

Replies are listed 'Best First'.
Re^2: Getting Ip Address
by mreece (Friar) on Apr 04, 2007 at 20:25 UTC
    I suppose that you could ping all the IP addresses in your local subnet and then check the arp cache
    fyi, often pinging the broadcast address (ie, 192.168.2.255) will suffice for this.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://608362]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-03-28 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found