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

Jonny Flowers
  • 121
  • 1
  • 1
  • 5

4 Answers4

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

strange walker
  • 592
  • 3
  • 10
0

As a previous answer has stated, "arp -a" in the command line is not sufficient ("mac adress is added to arp table only after you send something to that machine").

I think nmap (https://nmap.org/) is a good option. You can install this on windows. The command that will achieve what you want could be:

nmap -T4 -F 192.168.1.0/24 

or something similar depending on the details of your network.

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).

ott--
  • 1,091
  • 1
  • 11
  • 13
-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.

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47