On Windows, Linux, or macOS, the command arp -a displays all currently connected devices (via IP and MAC address) on your local network. For a more detailed list, use netstat -rn on Linux/macOS or Get-NetNeighbor in PowerShell. Below is a platform-specific, step-by-step guide to reveal every active IP address—including hidden ones—without third-party tools.
What You'll Need
- Admin or root access (on Linux/macOS, you’ll need to run commands with
sudo) - A terminal (Windows:
cmdor PowerShell; macOS/Linux: built-in Terminal) - Your network’s subnet (e.g.,
192.168.1.xor10.0.0.x; find it inipconfigon Windows orifconfigon macOS/Linux)
Step-by-Step
-
Open a terminal
- Windows: Press Win + R, type
cmdorpowershell, then hit Enter. - macOS/Linux: Launch Terminal (search for it in Spotlight or the app drawer).
- Windows: Press Win + R, type
-
List all active connections (Windows)
In
cmd, run:arp -a
This shows a table of IP addresses, MAC addresses, and "dynamic" entries (devices currently communicating with your router). Note:
- Only devices that recently sent/received packets appear here. Idle devices (e.g., a phone charging) may not show.
- For a refresh, unplug your router for 10 seconds, then reconnect and run
arp -aagain.
-
List all active connections (PowerShell, Windows)
For a more detailed list (including unused IPs), run:
Get-NetNeighbor | Select-Object IpAddress, LinkLayerAddress, State
This filters by
State("Reachable" = active; "Stale" = recently active but idle). -
List all routes and active interfaces (Linux/macOS)
Run these commands in sequence to map your network:
ip route show
ifconfig
arp -an
The
ifconfigoutput shows your subnet (e.g.,inet 192.168.1.100) and broadcast address. Thearp -ancommand lists all resolved IPs (usesudoif empty). -
Scan for hidden devices (Linux/macOS)
To find all devices in your subnet (even if inactive), use
nmap(install viasudo apt install nmapon Debian/Ubuntu):sudo nmap -sn 192.168.1.0/24
Replace
192.168.1.0/24with your subnet (e.g.,10.0.0.0/24). This scans your entire network and lists all live hosts. -
Cross-reference with your router’s DHCP list (all platforms)
Log into your router’s admin panel (usually
192.168.1.1or192.168.0.1) and check the DHCP client list. This shows all devices ever assigned an IP (including offline ones).Note: Router menus vary by brand (e.g., Netgear vs. TP-Link). Look for "Connected Devices," "DHCP Clients," or "LAN Clients."
Common Mistakes
-
Assuming
arp -ashows all devicesOnly devices that have recently communicated with your machine appear. To see truly idle devices, use
nmapor your router’s DHCP list. -
Skipping
sudoon Linux/macOSWithout admin privileges,
arp -anmay return no results. Prefix withsudoto force a full scan. -
Ignoring the subnet
If you run
nmapwith the wrong subnet (e.g.,192.168.2.0/24when your network is192.168.1.0/24), it will scan the wrong range and miss devices. -
Not refreshing the ARP cache
If a device was recently offline, its entry may have timed out. Plug/unplug the router for 10–15 seconds to clear stale entries, then run
arp -aagain.
Tips
-
Filter for your subnet
In
arp -a(Windows) orarp -an(Linux/macOS), look for IPs starting with your network’s first three octets (e.g.,192.168.1.x). Ignore IPs like127.0.0.1(localhost). -
Use PowerShell’s
Get-NetIPConfigurationfor extra detailsRun
Get-NetIPConfigurationto see your active adapters and their assigned IPs. Combine this withGet-NetNeighborfor a full picture. -
Check for duplicate IPs
If two devices have the same IP (e.g., both show
192.168.1.50), one is misconfigured. Use your router’s DHCP reservation list to assign static IPs to critical devices (like a NAS or printer). -
Export the list for later
Pipe the output to a file:
arp -a > devices.txt
Or in PowerShell:Get-NetNeighbor | Export-Csv -Path devices.csv -NoTypeInformation
This lets you compare lists over time to spot new/unexpected devices.
Troubleshooting
If arp -a shows no devices
This usually means:
- The ARP cache is empty (devices haven’t communicated recently). Fix: Plug/unplug your router for 10 seconds, then reconnect and run
arp -aagain. - You’re not on the same subnet as the devices. Fix: Check your subnet with
ipconfig(Windows) orifconfig(macOS/Linux), then scan that range withnmap. - Your network uses IPv6. Fix: Use
Get-NetNeighbor -AddressFamily IPv6(PowerShell) orarp -a -A In6(Windows 10+).
If nmap times out or fails
Possible causes:
- Firewall blocking ICMP requests. Fix: Temporarily disable the firewall (
sudo ufw disableon Linux) or use-Pnto skip host discovery. - The subnet is wrong. Fix: Verify your subnet in
ifconfigor your router’s settings. - Too many hosts to scan. Fix: Narrow the scan to a smaller range (e.g.,
nmap 192.168.1.1-100).
If the router’s DHCP list is incomplete
This can happen if:
- Your router has a DHCP reservation conflict. Fix: Remove duplicate reservations in the router’s DHCP settings.
- Devices use static IPs outside the DHCP range. Fix: Check your router’s static lease table (look for "LAN Reservations" or "Static DHCP").
If devices disappear after rebooting
Some devices (like phones or laptops) may not appear until they’re actively using the network. To force them to show:
- Wake the device (e.g., press a button on a smart plug or unplug/replug a printer).
- Run
arp -aornmapagain within 1–2 minutes. - If still missing, check the router’s DHCP list for "leased" but inactive devices.
Frequently Asked Questions
Why don’t all my devices appear in arp -a?
arp -a only lists devices that have recently communicated with your machine. Idle devices (like a phone charging) won’t show. For a full list, use nmap or your router’s DHCP client table.
Can I find the MAC address of a device using just its IP?
Yes. Once you have the IP (from arp -a or your router’s list), run:
arp -a | find "IP_ADDRESS"
On Linux/macOS, use:
arp -an | grep "IP_ADDRESS"
The next line will show the MAC address next to the IP.
How do I exclude my own device from the list?
Your device’s IP is the one assigned to your active adapter. On Windows, check it with ipconfig (look for "IPv4 Address"). On Linux/macOS, use ifconfig. Filter out that IP when reviewing the list.
Is there a way to see devices that were connected but are now offline?
Yes, but with limitations:
- Check your router’s DHCP client table—it may show "leased" IPs for devices that are currently offline.
- Use
nmap’s-Pnflag to scan for hosts that aren’t responding (though this may include faulty devices). - Review historical logs if your router supports them (e.g., Time Warner Cable routers have usage logs).
Why does my router show more devices than arp -a?
Your router’s DHCP list includes all devices that have ever requested an IP, even if they’re not currently active. arp -a only tracks devices that have communicated with your machine in the last few minutes. For a complete picture, combine both methods.
Can I automate this to run daily?
Yes! Save these commands to a script:
- Windows (Batch):
arp -a > devices.log Get-NetNeighbor | Select-Object IpAddress, LinkLayerAddress, State >> devices.log - Linux/macOS (Bash):
sudo arp -an >> devices.log sudo nmap -sn 192.168.1.0/24 >> devices.log
Schedule the script to run daily using Task Scheduler (Windows) or cron (Linux/macOS). The output will grow over time, showing new devices as they connect.