0

So I'm trying to find the MAC and IP addresses of all devices connected to LAN on my RaspberryPi running Raspbian. So far I've tried to get the list with:

$ arp
$ sudo arp-scan -l
$ sudo nmap -sn 10.0.0.1/24

...but they're not really reliable. If for e.g. my phone connects to the network sometimes it'll be found immediately and sometimes not. I would like to find a way to discover all newly connected devices quickly.

3

Arp will list your arp-cache. This is the list of devices that your system has had contact with.

The nmap scan will contact all the devices, so after the nmap scan, arp will list all the devices. So, if you do it in the sequence

$ nmap 10.0.0.0/24 > /dev/null
$ arp

you should get the complete list.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.