Live ARP traffic sniffer for MAC address lookup. Find IP addresses associated with a MAC address in real-time by monitoring network communication.
Important: mac2ip only sees ARP packets sent AFTER you start it. For best results, plug in or power on the device after starting mac2ip.
- 🔍 Live ARP monitoring - Shows IP assignments as they happen
- 🌐 Layer 2 protocol - Works even if device has wrong IP configuration
- 🎯 Partial matching - Search by full MAC or partial pattern (e.g.,
dd:ee) - 🖥️ Cross-platform - Linux, macOS, Windows
- 📦 Single binary - Just needs libpcap/Npcap
Recommended: Build from source for best compatibility and performance. Pre-built binaries are also available and should work on most systems.
git clone https://github.com/revlat/mac2ip.git
cd mac2ip
make build
sudo mv mac2ip /usr/local/bin/Building from source ensures the binary is optimized for your specific system and uses your installed libpcap version.
Download pre-built binaries from Releases:
# Linux/macOS
wget https://github.com/revlat/mac2ip/releases/latest/download/mac2ip-linux-amd64.tar.gz
tar -xzf mac2ip-linux-amd64.tar.gz
sudo mv mac2ip /usr/local/bin/
# Windows (PowerShell)
Invoke-WebRequest -Uri https://github.com/revlat/mac2ip/releases/latest/download/mac2ip-windows-amd64.zip -OutFile mac2ip.zip
Expand-Archive mac2ip.zipMonitor ALL ARP traffic:
sudo mac2ipMonitor specific MAC:
sudo mac2ip aa:bb:cc:dd:ee:ffPartial match (finds all MACs containing pattern):
sudo mac2ip dd:ee # Matches aa:bb:cc:dd:ee:ff
sudo mac2ip 00:1a:2b # Find by vendor prefixList available interfaces:
mac2ip --listSpecify interface (by name, index from --list, or description substring):
sudo mac2ip -i eth0 aa:bb:cc:dd:ee:ff
sudo mac2ip -i 2 aa:bb:cc:dd:ee:ff # by index
sudo mac2ip -i "Ethernet" aa:bb:cc:dd:ee:ff # by description (handy on Windows)Help:
mac2ip --helpInstead of using sudo every time, you can grant the binary the CAP_NET_RAW capability:
sudo setcap cap_net_raw+ep ./mac2ipNow you can run without sudo:
./mac2ip aa:bb:cc:dd:ee:ffNotes:
- More secure than
sudo(only grants packet capture permission, not full root) - Must be reapplied after each
make build - Linux/macOS only
Windows typically requires Administrator privileges for packet capture.
Standard: Run as Administrator
- Right-click
mac2ip.exe→ Run as administrator - Or open PowerShell/CMD as Administrator:
.\mac2ip.exe aa:bb:cc:dd:ee:ff
Choosing the right adapter on Windows
On Windows, Npcap reports interfaces as opaque device paths like
\Device\NPF_{GUID} rather than friendly names. Use --list to see all
adapters with their descriptions and IP addresses, then select one by index or
by a part of its description:
.\mac2ip.exe --list
.\mac2ip.exe -i 2 aa:bb:cc:dd:ee:ff
.\mac2ip.exe -i "Ethernet" aa:bb:cc:dd:ee:ffAuto-detection (no -i) skips loopback and virtual/APIPA adapters and prefers
the interface with a real IPv4 address.
Optional: Non-Admin Access (Advanced)
You can configure Npcap to allow non-admin users:
- During Npcap installation, uncheck: ☐ "Restrict Npcap driver's access to Administrators only"
- Then normal users can run
mac2ip.exewithout admin rights
Note: This is a security risk (any app can sniff packets) and not recommended for production systems.
Requirements:
🔍 Listening for ARP traffic with MAC pattern '18:69' on eno1...
Press Ctrl+C to stop
[17:08:50] REP | 60:cf:84:cb:18:69 → 192.168.10.130
[17:09:06] REQ | 60:cf:84:cb:18:69 → 192.168.10.130
[17:09:36] REP | 60:cf:84:cb:18:69 → 192.168.10.130
[17:10:06] REP | 60:cf:84:cb:18:69 → 192.168.10.130
[17:10:06] REQ | 60:cf:84:cb:18:69 → 192.168.10.130
Simpler than Wireshark for this task - No complex UI or filters, just enter a MAC address. Perfect when you don't have access to the DHCP server or router!
A colleague has a new device and needs to know its IP:
# 1. Read the MAC address from the device label
# 2. Start mac2ip FIRST
mac2ip a1:b2:c3:d4:e5:f6
# 3. NOW plug in/power on the device
# 4. Instantly see: [16:34:21] REQ | a1:b2:c3:d4:e5:f6 → 192.168.10.42
# Done! Device has IP 192.168.10.42Works without:
- DHCP server access (no admin rights needed)
- Router/switch login credentials
- Complex Wireshark filters or network knowledge
A device is on the network but you don't know its IP:
# 1. Check the MAC address label
# 2. Start mac2ip
mac2ip 00:1a:2b:3c:4d:5e
# 3. Power cycle the device (unplug/replug or reboot)
# 4. Wait for ARP activity - shows IP when device communicatesCommon scenarios:
- New printer, tablet, or IoT device
- Temporary equipment from external vendors
- Devices with wrong/static IP configuration
- Root/Admin privileges (requires promiscuous mode)
- libpcap (Linux/macOS) or WinPcap/Npcap (Windows)
Debian/Ubuntu:
sudo apt install libpcap-devFedora/RHEL:
sudo dnf install libpcap-develOpenSUSE:
sudo zypper install libpcap-develmacOS:
brew install libpcapWindows:
# Local build (current OS)
make build
# All platforms
make build-all
# Clean
make cleanMIT