Public bug reported:

Binary package hint: powernap

Here is a suggestion for an enhancement that could be made to the
powerwake utility.  I am posting this suggestion as an enhancement bug
here since it seems very in line with the functionality of
powernap/powerwake, and I thought you might find the approach
interesting.  Feel free to use this idea (and code) or not as you see
fit.

I have written a short Python script that can be run as a daemon that
leverages the scapy package to monitor ARP traffic for a list of
targeted IP addresses on the local network.  When an ARP is sent for one
of the monitored addresses, the script will compose a magic packet for
that IP and send it out on the local network.

The scapy association is not strictly needed, but it made implementation
very simple.  The reason I wrote this tool is that the Intel E1000 nic
driver in Linux does not support wake on ARP (even though the card
supports filters and the kernel driver could be extended to cover that
feature as the related Windows driver for the same card does).  In fact
few cards in Linux seem to support wake on ARP.

This is very annoying, since there is no easy way to wake a sleeping
computer by simply attempting to access it over the network, since ARP
entries age out throughout the network and you end up with no way to
recover the MAC address via ARP (the computer continues to sleep).  The
drivers almost universally support wake on magic packet, so the natural
solution seemed to be to have a computer that is awake on the network
sniff for ARP requests to the sleeping computer and emit the Magic
Packet on behalf of that request.

On to the code.  The Python script sets up a scapy filtered sniff for
ARP traffic that uses very little system resources.  On receiving an ARP
it checks to see if it matches the list of IPs being monitored and if
so, constructs the appropriate Magic Packet and sends it.

Best Regards,

-Jim Heck

** Affects: powernap (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/737479

Title:
  powerwake enhancement, monitor ARP requests for sleeping machines and
  send magic packets

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to