0

I am looking for a method or tool that would allow me to scan my network and send out packets to see which machines will turn on either ether-wake or wake-on-lan.

John75077
  • 182
  • 1
  • 2
  • 16

1 Answers1

3

You need to gather MAC addresses then power off all the computers and then send out the wol packets. As far as I know there's no tool that will do all those steps but it's trivial to combine:

sudo nmap -sP 192.168.0.0/24 |grep MAC|cut -d\  -f3 > mac
# power off all systems and then...
wakeonlan -f mac
bain
  • 10,860
  • 2
  • 42
  • 48
  • This is great, another part is how do i tell it use a specific adapter, for example eth1? – John75077 Jan 20 '16 at 02:45
  • Glad that it helped, please remember to [accept the answer](http://meta.askubuntu.com/questions/1137/how-do-i-accept-an-answer) by clicking on the tick circle next to it. WOL packets are UDP packets, so to specify a particular adaptor, use `-i` option - the default is `-i 255.255.255.255` which will broadcast to every interface, but if you specify something like `-i 192.168.0.255` then it will only broadcast on the interface assigned to 192.168.0 (`ifconfig` will show you then bcast addresses for each interface). See `man wakeonlan` for examples. – bain Jan 20 '16 at 13:22
  • Thank you for explaining the rest of this in plain English for me. – John75077 Jan 20 '16 at 13:50