1

I have a machine on my network that needs to create a list of all mac addresses connected to the network. This is running OSX when I run the arp command it doesn't always display everything connected sometimes only the broadcast (255.255.255.0). However if I run the command on the DHCP server everything gets displayed.

The DHCP server is running Zentyal Linux. Are there any option I need to enable to allow anyone to scan the network?

Many thanks

4

mac adress is added to arp table only after you send something to that machine. That's why it is empty on common machine (no communication) and full on server (dhcp negotiation with clients).

Simple arp isn't suitable for what you trying to do

2
  • Is pinging considered as sending someting? Sep 27 '15 at 3:50
  • @Ashkan Mobayen Khiabani yes when you ping a target for the first time, an arp first is sent if that target do not exist in the arp cache 10 hours ago
0

255.255.255.0 is the netmask, not the broadcast. And the arp-cache entries are removed after some time when they are not used. To get all active mac-addresses in your subnet, you can create a loop with i=1..254 with ping -c 1 192.168.8.$i (assuming your net is 192.168.8.0).

2
  • 1
    You can actually ping the broadcast address e.g. ping -b 192.168.x.255
    – Marki
    Aug 18 '13 at 18:11
  • The broadcast ping is usually allowed to the root user only.
    – ott--
    Aug 18 '13 at 18:19
-1

a lot of people are searching this site for Windows 'arp' command also, so I'll put a quick guide here to help you solve it as well:

Windows 10 or beyond, this is posted Year 2021:

  1. Open Powershell with admin rights.
  2. Run arp.exe -a.

This will give you 100% of all devices on your LAN includings those not shown in the outdated cmd prompt. Remember, your system will only show devices on your Local area network that you're connected to. If you have two LANs you must first connect to the second LAN before running this command in Powershell.

1
  • Not working, I just tried it from my laptop trying to see my Android phone's IP and MAC but its not listed. Nov 11 '21 at 23:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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