×
Find Device or IP Address Using MAC Address

What can you do to communicate with devices when you don’t have their IP?

Situations where you can’t quickly ascertain the IP of a device within a network, are daily. Thankfully, a MAC address is all you need to solve this issue.

Sometimes, your computer might start giving you error messages like “No Valid IP Address.” This inability to display an IP can happen due to various reasons; however, we’ll be dealing with all of them today.

Now, getting the IP from a MAC address is usually the task of ReverseARP applications; however, these RARP applications rely on RARP, a now-obsolete protocol. Because of this, today, we have much more sophisticated protocols like DHCP or BOOTP that let us deal with IPs directly.

Today, we’ll be looking at how you can find an IP address on a network based on the MAC address free of charge.

What Is ARP?

The Address Resolution Protocol or ARP is tasked with finding MAC addresses with an IP within a network segment.

It works with frames in the data link layer. In the data link layer, each device depends on its MAC addresses to establish communication. These frames contain packets with the allocated IP address info.

Any given device has to know its destination MAC address to establish local communication between different media types such as WiFi or Ethernet- this occurs in the 2nd layer with the OSI model. Therefore, grasping the way ARP works is very important in finding IP and MAC addresses quickly.

First, the local device sends an ICMP echo request, also known as a “ping,” to a given IP held by a remote device in that segment. However, the local device isn’t yet aware of the MAC address, just the IP.

Because the MAC of the remote device isn’t known, the ping is then put on hold. At this point, the local device is only aware of its IP, the destination’s IP, and its MAC. Thus, ARP is capable of employing two kinds of messages: Request and Reply.

The local device then sends an ARP REQUEST message to find who owns the IP address.

This message is transmitted to each device in that segment or LAN by using a broadcast MAC address as its destination.

Since the remote device is within the same LAN or segment, it will receive this message with all other devices. The other devices will recognize that they’re not the IP the message was addressed to, tossing away the packet. This way, only the remote device for which the packet was addressed will read the message and respond to the ARP REQUEST using ARP REPLY, with the reply containing its MAC.

Finally, the ARP REPLY is received by the local device, reading the MAC. This is where the ping is processed, and the remote device responds to it.

Finding An IP With ARP

First, you’ll need to update your ARP table locally to gather all of the info necessary from the devices on your network locally.

This is done by sending a ping to your entire LAN network or segment to get every MAC entry on the table.

To send a ping to that whole LAN or segment, you’ll need to do the following:

  1. Open your command-line interface(terminal on macOS or Command Prompt on Windows devices)
  2. Type in ping [insert subnet here]

Then, the broadcast address will be [insert subnet here]; it can then be calculated using the print route command on Command prompt or netstat -nr on the terminal. Alternatively, there is a variety of different subnet calculators available online for free.

Finding An IP Using ARP On Windows

  1. Open up the Start menu, and type in “Run,” alternatively, press the Windows key together with the R key to open the Run application.
  2. Type in “cmd” in the Open field.
  3. Press Ok- this will open Command Prompt.
  4. Type in “arp” in the command-line interface. This will provide you with a variety of options you can use without entering any further commands. These commands make finding IPs trivial.
  5. Use commands like “arp -a” to show the ARP table together with all of the entries on it that you’ve populated by sending a broadcast ping.  This is essentially the ARP table of the local device, showing you a list of IPs, MACs, and the types of allocation for each of these addresses(they can be dynamic and static.)
  6. Assuming you want to find an IP and have the MAC address [will depend on screenshot].
  7. We can map the MAC address to the IP address within the same line from what we see above.
  8. For example, if the IP [will depend on screenshots] belongs to the [MAC from screenshot], you’re done! Feel free to ignore any 224.0.0.x and 239.0.0.x addresses because they’re just multicast IP addresses.

Finding An IP Using ARP On MacOS

  1. Go to the Applications tab, then navigate to Utilities
  2. Click “Terminal or Launchpad” then “Other”
  3. Click “Terminal”; this will open the macOS terminal.
  4. Type in the “arp” command together with an “-a” flag
  5. This will output a list of all of the ARP entries within your device’s ARP table, and there you’ll be able to see the IP address, MAC address, interface, and allocation type(these can be dynamic or static)
  6. Match the MAC address with its IP, and you’re done!

Using The DHCP To Find IP Addresses

The DHCP or Dynamic Host Configuration Protocol is a network protocol utilized by IP and TCP to facilitate the dynamic allocation of IPs and other parameters for devices within a network.

The DHCP server is a device tasked with assigning IPs inside a network, with the client is your local computer most of the time. In a LAN or home network environment, the DHCP server is usually a router.

In case you’ve got access to the DHCP Server in question, you’re able to look at all IP, MAC, and interface relationships, as well as the names of the devices and LAN lease times.

The way you find IP addresses using the DHCP Server is:

  1. Log into your DHCP server, and here we’ll be using the home gateway.
  2. If you aren’t aware of the IP address of the DHCP Server, you can run an ipconfig command on Windows or an ifconfig command on macOS or Linux.
  3. Type in the IP address within your browser and insert your credentials.
  4. Go to “DHCP” then to “DHCP Clients List” here, and you’ll be able to see how the MAC and IP addresses are mapped on the network.
  5. Match the IP with the MAC address, and you’re done!

Using A Free Sniffer Like Nmap

Suppose you can’t find the desired IP within the ARP list and don’t have any access to it. For example, DHCP Server, then you can use a sniffer tool for that.

Nmap is a free sniffer that can work as a network analyzer and is generally used as a network security tool. Although these tools are typically used to find vulnerabilities in the network and identify attacks, as a consequence, they’re great for finding IPs off of MAC addresses.

All you need to do is:

  1. Run a quick ipconfig command on Windows or ifconfig command on macOS or Linux to find your network IP. The terminal will then show you your local IP and its mask. If you can’t find it, there’s an abundance of free subnet calculators online to help you with this.
  2. Download and install Nmap(or Zenmap if you prefer a GUI)
  3. Open your sniffer and use the “sudo nmap -sn [your network IP] to start a network-wide scan preceding a port scan. This will lead to the tool showing you all the devices that respond to its ping, alongside their MAC addresses and vendors.
  4. Match the IP to the MAC, and you’re done!

Don’t forget to insert “sudo” before the command, as it won’t work correctly otherwise!

Using The DHCP To Look At IP Information

ARP used to have a counterpart- RARP made explicitly to find IP addresses from MAC addresses. However, the drawbacks of RARP were too significant, and it was swiftly discontinued.

Today, RARP has been almost entirely replaced with DHCP and BOOTP. However, ARP is still one of the core functionalities within the IP layer of the TCP/IP protocol stack. Moreover, it’s capable of finding MAC addresses when you know it’s MAC, which can be quite common today. Thus, ARP generally operates beneath the surface to keep a comprehensive list of MAC and IP addresses.

You can also use DHCP to help you view detailed IP information. This is because DHCP servers are usually tasked with keeping tabs on IP assignments. So if you’ve got access to the DHCP server being used, all you need to do is match the IP to the MAC address.

Finally, if that isn’t the case, you can use a network sniffer like Nmap to scan your network and help you find all IP and MAC addresses.

Frequently Asked Questions

Is it possible to find the IP address from a known MAC address?

Of course. You’ll need to open your command-line interface(Command Prompt on Windows or the terminal on macOS) then type in the command “arp -a.” This will show you a list of all IP and MAC addresses on the network segment or LAN.  After you’ve done that, all that’s left to do is match the IP to the MAC, you know. Alternatively, you can use a network sniffer like Nmap to make this process even more accessible.

What can I do to access a device knowing its MAC?

If you know the MAC address, all you need to do is type the “arp -a” command into your terminal or Command Prompt; this will quickly let you find its IP. In addition, this enables you to use a variety of different tools to gain access to the device. These can be a remote desktop manager, Telnet program, or similar.

What do I do to find a device for which I know the IP?

If you know the IP address, all you need to do is type in “tracert” into Command Prompt on Windows. You can open this by going to “Run” from the Start menu and typing in “CMD.” Once you’ve opened the command-line interface, type in “tracert” and write in the IP address. This command will output every router connecting to that device.

Conclusion

Having a device’s IP is crucial in maintaining good communication throughout the network segment or LAN. Forgoing this will cause problems, especially in the long run. If you’re looking to find the IP of a device for which you already know the MAC address, there are a few different avenues you could take:

  1. Use ARP to get a list of known IP and MAC addresses, then all you need to do is match them, and you’ve got the IP.
  2. If you have access to the DHCP, you can use its privileges to find the IP address from the MAC automatically.
  3. Free sniffer tools like Nmap(or its GUI counterpart, Zmap) are made to help with network security operations. These tools can also help you with finding MAC and IP addresses if no other solutions work.

Generally, you should apply these solutions in order, as they go from more accessible to do to more challenging. However, don’t feel dissuaded just because 1 or 2 didn’t work. Once you know how to do it, finding the IP addresses won’t be a struggle at all!

What’s your preferred way of finding IPs from MAC addresses?

Did this guide help you?

Let us know in the comments below!