Friday, February 24, 2006

Finding the MAC Address of Remote Computer (Advanced)

Every device on a TCP/IP network has a unique number assigned to it called the MAC (Media Access Control) address. The MAC address is used by the network hardware such as routers, switches, etc. to send traffic from one device to another device on your network.

Your computer uses a service called ARP (Address Resolution Protocol) to resolve and track the TCP/IP and MAC address of the remote devices that you're communicating with. This information is handy for doing semi-low level network troubleshooting. It can also be used for granting or denying permissions to a network segment or device on that network.

To determine the MAC address of a remote device:
  • Open the MS-DOS prompt (From the Run... command, type "CMD" and press Enter).
  • Ping a remote device that you want to find the MAC address (for example: PING 192.168.0.1).
  • Type "ARP -A", and press Enter.

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\WINDOWS>arp -a


Interface: 192.168.1.100 --- 0x10004
Internet Address Physical Address Type

192.168.1.1 aa-fb-c8-34-da-7a dynamic

21 comments:

  1. Thanks. this is helpful for me and no need to check on client side.

    ReplyDelete
  2. Anonymous10:07 AM

    but only works on single subnet network. once the ping hits a gateway you can't tell the remote ip/MAC.

    ReplyDelete
  3. Anonymous4:50 AM

    GetMAC does the same thing in an enterprise environment - it's part of Windows XP - getmac /s w.x.y.z - make sure you have admin permissions on the remote system.

    ReplyDelete
  4. Sylvio - if you are reading this, i'm very proud of you! It means that even after writing it on your whiteboard and asking me multiple times over the years, you finally figured out how to use google to answer your questions... Congratulations!

    (to make this comment useful, if you need to get MAC's from other subnets, check the DHCP server table)

    ReplyDelete
  5. How about "getmac /s pcname' in the CMD prompt....

    ReplyDelete
  6. James8:03 AM

    Thanks guys or gals. This saved me an hour trip to get a remote MAC!

    ReplyDelete
  7. Anonymous10:35 AM

    You guys are awsome. 'getmac' works perfectly with IP or Computer Name. Saved me alot of time.

    ReplyDelete
  8. Anonymous12:56 PM

    hi to all....
    ping to remote computer ip
    arp -a
    it displays remote ip address and mac address of ur neighbour router address.

    ReplyDelete
  9. Anonymous12:04 PM

    Thanks bro.
    Gud Work. Keep it up.
    :)

    ReplyDelete
  10. Anonymous2:31 AM

    use: "getmac /S ip adress" to get a remote MAC address outside your subnet: like getmac /S 192.168.1.1

    ReplyDelete
  11. Anonymous1:30 AM

    Thanks!!

    ReplyDelete
  12. use: "getmac /S ip adress" to get a remote MAC address outside your subnet: like getmac /S 210.xxx.xxx.xxx


    system waits for a long time and tells

    ERROR: The RPC server is unavailable.

    ReplyDelete
  13. This Gives only to Find out our own MAC address.In order to Get Remote system's MAC address , you must run a Data Sniffer.

    ReplyDelete
  14. Anonymous2:11 PM

    ERROR RPC server is unavailable, means remote asset is powered off.

    ReplyDelete
  15. Anonymous said...
    ERROR RPC server is unavailable, means remote asset is powered off.


    -------------

    Remote Procedure Call services could be turned off as well. Or the asset type is maybe a different OS other than Windows.

    ReplyDelete
  16. Anonymous8:57 AM

    you may also ssh into your router and look at its arp table, in the case of cisco this would be show arp.

    ReplyDelete
  17. Anonymous6:05 AM

    thanks

    ReplyDelete
  18. Hi All

    Try nbtstat -a in the command prompt, it give you the mac address of the remote computer better than Getmac command.

    ReplyDelete
  19. Anonymous10:05 AM

    nbstat -a worked for getting the MAC address for a device on a different subnet. thanks!

    ReplyDelete
  20. Anonymous12:00 PM

    nbstat -a was successful in retrieving the mac address of a Brother printer from a school district building in the next town. Both on the education network but 1/2 hour apart.

    ReplyDelete
  21. Anonymous8:59 AM

    In my experience: "nbtstat -a IPADDRESS" can be used on machines for which you are not local administrator, whereas "getmac /S IPADDRESS" seems to require local admin on the remote machine (at least here on our network).

    ReplyDelete