How to Use an IP Address to Find a MAC Address

Businesswoman using digital tablet at whiteboard in conference room
Hero Images / Getty Images

TCP/IP computer networks use both the IP addresses and MAC addresses of connected client devices. While the IP address changes over time, the MAC address of a network adapter always stays the same.

There are several reasons you might want to know the MAC address of a remote computer, and it's really easy to do by using a command line utility, such as Command Prompt in Windows.

A single device can possess multiple network interfaces and MAC addresses.

A laptop computer with Ethernet, Wi-Fi, and Bluetooth connections, for example, has two or sometimes three MAC addresses associated with it, one for each physical network device.

Why Figure out a MAC Address?

There are numerous reasons to track down the MAC address of a network device:

  • To set up MAC address filtering on a router to restrict local network access to only those devices whose addresses match a list of presets
  • To determine the device's manufacturer (first half of the address) and serial number (second half of the address), such as for warranty service
  • To masquerade (spoof) the identity of a different device. MAC addressing spoofing can be used legitimately to register a home network gateway device with an internet provider. However, it can also have malicious intent, like to defeat the MAC address filtering feature so as to break into the network

Limitations of MAC Address Lookups

Unfortunately, it isn't generally possible to look up MAC addresses for devices outside a person's physical reach.

It often isn't possible to determine the MAC address of a computer from its IP address alone because these two addresses originate from different sources.

A computer's own hardware configuration determines its MAC address while the configuration of the network it is connected to determines its IP address.

However, if the computers are connected to the same TCP/IP network, you can determine the MAC address through a technology called ARP (Address Resolution Protocol), which is included with TCP/IP.

Using ARP, each local network interface tracks both the IP address and MAC address for each device it has recently communicated with. Most computers let you see this list of addresses that ARP has collected.

How to Use ARP to Find a MAC Address

In Windows, Linux, and other operating systems, the command line utility "arp" shows local MAC address information stored in the ARP cache. However, it only works within the small group of computers on a local area network (LAN), not across the internet.

Note: There's a different method used to find the MAC address of the computer you're currently using, which involves using the ipconfig /all command (in Windows).

ARP is intended to be used by system administrators and is not a generally useful way to track down computers and people on the internet.

Nevertheless, below is one example of how to find a MAC address via an IP address. First, start by pinging the device you want the MAC to address for:

ping 192.168.86.45

The ping command establishes a connection with the other device on the network and should show a result like this:

Pinging 192.168.86.45 with 32 bytes of data:
Reply from 192.168.86.45: bytes=32 time=290ms TTL=128
Reply from 192.168.86.45: bytes=32 time=3ms TTL=128
Reply from 192.168.86.45: bytes=32 time=176ms TTL=128
Reply from 192.168.86.45: bytes=32 time=3ms TTL=128

Use the following arp command to get a list that shows the MAC address of that device you pinged:

arp -a

The results might look something like this but probably with many other entries:

Interface: 192.168.86.38 --- 0x3
 Internet Address Physical Address Type
 192.168.86.1 70-3a-cb-14-11-7a dynamic
 192.168.86.45 98-90-96-B9-9D-61 dynamic
 192.168.86.255 ff-ff-ff-ff-ff-ff static
 224.0.0.22 01-00-5e-00-00-16 static
 224.0.0.251 01-00-5e-00-00-fb static

Find the device's IP address in the list; the MAC address is shown right next to it. In this example, the IP address is 192.168.86.45 and its MAC address is 98-90-96-B9-9D-61 (they're in bold here for emphasis).