Getting the MAC address of remote machine?


R

Rajesh Gupta

How can i retrieve the MAC address of remote machine? I know the IP address.

Is there anyway of getting the MAC address programatically from the ARp
table?

Thanks in advance.
Rajesh
 
Ad

Advertisements

D

Dusty Harper {MS}

If you ping the machine and then look in the ARP table ( ARP -G ) you should
see the MAC.

***Note that if the machine is not on the same network segment, then this
will not work as only the router's MAC that was used to reach the next hop
will be shown.
 
O

Oli Restorick [MVP]

Place the following in a batch file called "pingarp.bat" on your path.

@echo off
ping -n 1 %1 >nul
arp -a | find "%1"

Then you can "pingarp" an IP address. As Dusty says, you have to be on the
same subnet as the machine for this to work.

Hope this helps.

Oli
 
Ad

Advertisements

Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top