IP address from MAC

I want to obtain the IP address of a network device based on its MAC address. Along the lines of the Linux ARP command (arp -a). I have the MAC address of the device, but need the IP address.

Is it possible to do this? How?


It is possible if you are on the same subnet (or have access to the DHCP server for the subnet). If you are on another subnet than the node, isolated by one or more routers its not possible since the mac address is only used on the local subnet.

There is no way to query “which IP has this mac address” but you can ping the broacast address, for instance if your network is then you can


and then use

arp -a

to list the mac adresses of all the nodes on the subnet.

You can use an IP scanner - something like “IP Scanner” or “IP Scanner Home” to discover which devices are on a specific WLAN.

Yes, I know. But I need a dynamic solution because the IP addresses may change, as happened recently when I needed to restart my DHCP server. I know the MAC address of the device I want to communicate with, so I need a method to determine the IP address of that device dynamically.

Why not set it as a static IP address?

I can not set this device up with a static IP address. It’s a commercial device and it won’t let me.

So this isn’t a Particle device? What kind of device is it? You may want to consult with the appropriate manufacturer’s configuration or use case documentation.

It’s a music streamer. No fixed IP address possible.

Although it looks like your problem is not with a Particle device, if you have access to the dhcp server, and previous know the MAC, we can just parse the dhcpd file that holds the valid leases (probably locate somewhere like /etc/dhcpd/interface_name)

That approach is similar to using arp. But unfortunately I don’t have access to the dhcp file.