Wake-on-LAN Script Update

📆 2026-02-23 18:09

This is an update to my earlier post:

Using Wake On Lan so you don't have to use your fingers

For context, I use Wake-on-LAN so I don't have to manually power on my cluster of Lenovo machines (worker nodes) every morning. The script checks the MAC addresses of each machine and sends a "magic packet" to wake them up.

Recently, my script stopped working. My master node Tiny kept running this script but the workers didn't wake up. The reason is that Wake-on-LAN packets are sent as broadcast messages. Without specifying the broadcast IP, the packets were only being sent to a single IP, which doesn't always reach sleeping machines. This is why my machines stopped waking up.

The fix was simple: add the broadcast IP to the script. Here's the new working version:

This post exists to save you a few hours of frustration. If you're using wakeonlan and your machines suddenly stop waking up, check whether you're sending to the correct broadcast address. It might be the simplest fix you didn't think of.

🚶 Back to my blog