Since all RPi use b8:27:eb
as the first three octets of their MAC address, you can use arp
from your Mac/Linux PC, but you'll need to refresh the arp cache first. Here's a bash
script that will do the job. You can get more details from my github page on the subject.
#!/bin/sh
: ${1?"Usage: $0 ip subnet to scan. eg '192.168.1.'"}
subnet=$1
for addr in `seq 0 1 255 `; do
( ping -c 3 -t 5 $subnet$addr > /dev/null ) &
done
arp -a | grep b8:27:eb
Save this as a file on your Mac/Linux (or any machine that runs bash
), make it executable, and then run it from your command line.
EDIT dtd 20200104:
As "The Foundation" has changed its organizational structure, a new OUI will be used on Raspberry Pi 4B models. Therefore, the original answer (above) must be updated to cover the latest model RPi. This change affects the last line of the bash
script above. Make the following change:
FROM:
arp -a | grep b8:27:eb
TO:
arp -a |grep -E --ignore-case 'b8:27:eb|dc:a6:32'
EXPLANATION:
Prior to the release of Raspberry Pi 4B, all RPi's used the OUI b8:27:eb
as the first 3 octets of its MAC address. Beginning with Raspberry Pi 4B, a different organization is responsible for production, and the new OUI is: dc:a6:32
. If the OUI of the MAC address of a device on the network matches one of these values, this tells us that one of the Raspberry Pi organizations have most likely made the hardware, and so it is most likely a Raspberry Pi device; the other possibility is that a device on the network is MAC spoofing!
it has Kali installed
... what isit
?