For top performance

Enable wake-on-lan on Linux Debian

I have an asus motherboard with an integrated NIC. Integrated NICs on recent motherboards have WOL capability. I hope yours has too, otherwise you may have to obtain some kind of wire to connect the NIC to the motherboard.

  • Read up on WOL on wikipedia.
  • Download ethtool (f.e. apt-get install ethtool)
  • The command 'ethtool eth0' should yield the output 'Supports Wake-on: g'. 'g' means the NIC can read the magic packet.
  • Make a shell script to enable WOL with ethtool, put this command in it: /usr/sbin/ethtool -s eth0 wol g
  • Change your /etc/network/interfaces so this script is executed each time the interface is brought up.
  • The tricky part was finding out why the settings set with ethtool were thrown away with each reboot. The answer lies in the /etc/init.d/halt script. Remove the '-i' from the halt command at the end of the script so the interfaces are not affected. In debian 4 (etch), simply set NETDOWN var to 'no'.

Good luck. :-)