1

Is it possible to get a list of MAC addresses of devices connected to a network, even though the device is currently turned off? The device has power so I could do a wake-on-lan. I'm trying to get something like this to work in Linux.

Using nmap would only give me a list of the devices that are powered on and got an IP address, but I would like to get a list of ALL devices in any power state.

John Gardeniers
  • 27,458
  • 12
  • 55
  • 109
airtruk
  • 13
  • 1
  • 3

2 Answers2

4

Sometimes you can get lucky and check the arp-cache in your switch or router, it may be hanging on to the unexpired arp-entry for that IP address. Your DHCP server usually has that information as well, though it depends on what you're using. Other then that, sometimes the device actually has the MAC address printed on the box.

sysadmin1138
  • 133,124
  • 18
  • 176
  • 300
3

You need the MAC address to do WOL, so you're pretty much out of luck. If you don't have an inventory of this type of info, you're going to have to do it the old fashion way: walk around and turn them on.

MDMarra
  • 100,734
  • 32
  • 197
  • 329
  • lets assume I already have a list of MAC addresses and I want to check which device is still connected to the network - without turning the machine on! – airtruk Feb 01 '12 at 00:44
  • If the 'device' isn't a remote management device of some kind (IPMI, ...) which gives you status info, I would say you have to dig down to level 1. – S19N Feb 01 '12 at 01:25
  • "still connected to the network" -- You mean *physically* connected to the *physical* network? I ask because a machine which is powered off is not 'connected to the network' in some sense. – Stefan Lasiewski Feb 01 '12 at 05:12
  • with "still connected to the network" i mean powered off but still physically connected – airtruk Feb 01 '12 at 06:08
  • there is a neat trick where you can do WOL without knowing the mac address! :-)... – The Unix Janitor Feb 04 '12 at 00:31
  • Ok, I'm listening. – MDMarra Feb 04 '12 at 00:57