Finding everything on my network

Published: 13 August, 2024

Concerning:
  • Ultratronics by Ryoji Ikea

This is the most useful took I've found for identifying other devices on a local network. 

I do a fair amount of work on local networks, mostly setting up new Raspberry Pi devices. My setup process usually involves accessing them via SSH on a local network, and at least initially, I don't know what a new Pi's IP address was.

For years I used arp -a to run a search, but it's sometimes difficult to find the RPis, because arp -a isn't precise. Sometimes it would not recognise all devices and because Raspberry Pi MAC addresses have changed over the years, it wasn't always easy to find their IP address. It includes the ip address and MAC address of devices but doesn't identify Raspberry Pis as clearly as I'd like.

Here's the alias that is set up, to identify devices by ip, MAC and manufacturer on a local network:

alias ips="sudo nmap -sn 192.168.1.0/24 | awk '/Nmap scan report for/{    printf \$5;}/MAC Address:/{print \" => \"substr(\$0, index(\$0,\$3)) }    ' | sort"

The result is something like this:

192.168.1.102 => E4:xx:xx:xx:xx:xx (Google)
192.168.1.105 => 40:xx:xx:xx:xx:xx (TP-Link Technologies)
192.168.1.113 => 80:xx:xx:xx:xx:xx (Samsung Electronics)
192.168.1.117
192.168.1.121 => B8:xx:xx:xx:xx:xx (Raspberry Pi Foundation)
192.168.1.221 => 6C:xx:xx:xx:xx:x (Intel Corporate)

Which is really helpful when looking for Raspberry Pi or any device on my network.

 

 

 

 

 

File under

Recent music cards

No content available.