CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: General Discussions: General Questions:
Same Subnet:MacAdress from IP Address

 



Kishorerp
Novice

Sep 5, 2008, 10:57 AM

Post #1 of 2 (4276 views)
Same Subnet:MacAdress from IP Address Can't Post

All,
I have an ipaddress(of a remote machine) which is in the same subnet.Is there a way to get the MacAddress of the corresponding remote machine.


TomS_
New User

Dec 30, 2008, 4:33 AM

Post #2 of 2 (2749 views)
Re: [Kishorerp] Same Subnet:MacAdress from IP Address [In reply to] Can't Post

If the remote host is in the same subnet and network segment as your computer, you can reference the ARP table of your machine. You'll need to look at your OS's documentation to find out how to view your ARP table, as each OS is different.

However, if prior communication has not occurred between your computer and the remote host, your computer may not have an existing ARP entry, so you wont find anything. So you may need to send some data to the remote host and have it respond first.

You could use Net::Ping to ping the known IP address until it responds. As soon as it responds your computers ARP table will contain an entry which will tell you what the MAC address is of the remote machine.


(This post was edited by TomS_ on Dec 30, 2008, 4:34 AM)

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives