Apple - How to find devices on my local network through their IP address
If you have Android or iOS devices running on the same network, you can install a FREE app called Fing and list all devices connected and their MAC addresses and IPs.
You can view this in Finder: in the Sidebar, there is a collapsable group called SHARED
(if you don't see it, Finder > Preferences > Sidebar > SHARED , and ensure that Bonjour Computers
is checked, but it's probably helpful to check all of them).
To view all detactable network devices, select All…
.
To get a device's IP address, select it and Get Info
(ctrl+click
> Get Info
or cmd+i
). Alternatively to find a specific device's IP via Terminal, run nslookup $hostname
, replacing $hostname
with the device's name listed in Finder: ex nslookup foo.yournetwork.com
.
Beyond that, you'd have to log into the router to see what devices are connected (its admin GUI will/should display the device's name next to the IP address it assigned to it).
There are different way to locate devices on your network : Netbios traffic / ARP traffic / bonjour traffic / ICMP probes...
Now the most reliable would be to use a good tool such as nmap which is able to perform multiple probes to discover nodes on your network. You can download nmap for Mac OS here (This isn't the latest version, but it is easier to install this way) : http://nmap.org/dist/nmap-6.46.dmg
You can then run this script, or paste line after line in the terminal. Add -sV in the sudo nmap command if you want it to be more reliable (but also slower)
#!/bin/bash
$i=en1
cidr=$(while read y; do echo ${y%.*}".0/$(m=0; while read -n 1 x && [ $x = f ]; do m=$[m+4]; done < <(ifconfig $i | awk '/mask/ {$4=substr($4,3); print $4}'); echo $m )"; done < <(ifconfig $i | awk '/inet[ ]/{print $2}'))
myip=`ifconfig $i | grep "inet " | awk 'NR==1 {print $2}'`
echo "sudo nmap -n -T4 -PN --exclude $myip $cidr"
sudo nmap -n -T4 -PN --exclude "$myip" "$cidr"