WOL – Pollutant Solution

As part of my preparations for this year’s studies I pulled my study apart – not a fun project. One of my main frustrations was that my multiple desktops chew power, generate heat and most importantly make noise! While I don’t need access to all the systems all of the time I certainly need the ability to access any of them at a moment’s notice – normally remotely.

Wake-On-Lan to the rescue… Yes, this is hardly a new technology but sometimes the simplest things work best (and often get overlooked ;-)). There are a number of implementations and some are better supported than others. In general I’ve found the “magic packet” method to work best – YMMV.

Wake-on-Lan makes use of the unique MAC address of the ethernet card. When it sees a specific packet on the wire that matches the MAC address it wake’s the PC from its slumber.

Wake-on-Lan needs to be configured on the computer’s bios and as I discovered more often than not in software as well.

Most of my routers around the house are faithful Mikrotik units. These guys have natively supported wake-on-lan (wol) for many years, its as simple as running a command on the terminal

/tool wol mac=00:11:22:33:44:55 interface=ether1;

And hey presto box power’s itself back up again … well, not quite. My windows boxes all worked perfectly out of the box – even one via WiFi (this needs specific bios support). If yours does not you need to check the network interface or power management settings and look for wake-on-lan options there.

My linux boxes however didn’t play along…

Turn’s out ethtool is the beast for the job. This little swiss army knife can set a variety of options for network cards, in this case we need to specifically enable the wol functionality:

ethtool -s eth0 wol g

where eth0 is the ethernet adapter who’s mac address you’re going to call; “wol g” sets the adapter to respond to magic packet wake-on-lan requests.

This needs to be set each time the pc

Now it all works … simple but frustrating when you’re not sure why a box ignores your magic packet…

With that all working I’ve now scheduled all my systems to hibernate after a specific time. If I need access to any of the boxes at home I simply call the script on the router and the box wakes up. Just one word of warning, the windows boxes seem to sometime not resume from sleep/hibernate – it may be worthwhile to shut them down when not needed – takes longer to boot but you have a more reliable startup.

This change should save me a couple of kilowatt 😉

(Hope to flesh this out some more since I had some comments requesting more detailed info)

Permanent link to this article: https://www.vdvyver.net/wol-pollutant-solution/