The other day I was setting up a Raspberry Pi Zero. I used Raspberry Pi Imager to prepare the SD card, connected the Pi to Wi-Fi, and then hit the next obvious problem: I wanted to SSH into it, but I had no idea what IP address it got on my network.
That was when I was introduced to arp.
arp gives youarp stands for Address Resolution Protocol. On a local network, it is used to map IP addresses to MAC addresses. On macOS, the arp command lets you inspect the ARP cache, which is basically your machine's recent memory of which local IP addresses belong to which physical devices.
That makes it surprisingly useful when you are trying to find a newly connected device like a Raspberry Pi.
Once the Pi had booted and connected to Wi-Fi, I ran this on my Mac:
arp -aThat prints a list of local IP addresses and the MAC addresses your Mac has seen. The output looks something like this:
router.local (192.168.1.1) at 62:87:f0:xx:xx:xx on en0 ifscope [ethernet]
raspberrypi-zero.local (192.168.1.23) at dc:a6:32:xx:xx:xx on en0 ifscope [ethernet]
macbook-pro.local (192.168.1.12) at 3c:52:a1:xx:xx:xx on en0 ifscope [ethernet]In my case, the most useful part was that the Raspberry Pi name showed up in the output. That meant I could look for the hostname I had used during setup and immediately get the IP address I needed for SSH.
If the device name does not show up on your network, you can still look for the new entry that appeared after powering on the Pi, but the hostname makes it much easier when it is available.
Once you have the IP address, you can SSH into the Pi with:
ssh <For example:
arp -a is not a full network scanner. It only shows entries your Mac already has in its ARP cache, which means devices usually need to have communicated on the local network recently to appear there.
Still, for a quick Raspberry Pi setup, it was exactly what I needed. It let me see the IP-to-MAC mappings on my network and use that information to connect to the Pi without guessing or opening my router admin page.