For the Seriously Lazy – wakeonlan

Written by James McDonald

February 17, 2016

Note: The caveat to using Wake-on-LAN to wake your Synology box is that if you switch off the switch that connects your Synology to your network it will loose it’s MAC address table map (the one that tells the switch which Ethernet port the Synology is plugged into). So this will only work when your Synology and it’s connected switch have been on and passed traffic at some time in the past and thus the Switch has a record of where to send the WOL broadcast.

It is approximately 10 feet from my couch to my Synology diskstation. But it’s nice to be able to fire up my NAS without having to walk over to it. So I turned on Wake On LAN under the Hardware and Power in the Synology Control Panel

wol_synology

Installed wakeonlan on my Mac using brew.

# install
$ brew install wakeonlan

# this is the detail of the package information
$ brew info wakeonlan
wakeonlan: stable 0.41
Sends magic packets to wake up network-devices
https://github.com/jpoliv/wakeonlan
/usr/local/Cellar/wakeonlan/0.41 (5 files, 17K) *
  Built from source
From: https://github.com/Homebrew/homebrew/blob/master/Library/Formula/wakeonlan.rb

 

Get the MAC address of your Synology

# get a ssh prompt on your Synology box

# issue ifconfig and look for HWaddr
# this is your MAC address

MYNAS01> ifconfig | grep -e eth[[:digit:]]
eth0      Link encap:Ethernet  HWaddr 00:12:33:43:96:8F  
eth1      Link encap:Ethernet  HWaddr 00:12:33:43:96:A7

 

And then created a script in /usr/local/bin/wolnas and made it executable ( chmod +x /usr/local/bin/wolnas )

#!/bin/bash
WAKETHIS=0:12:33:43:96:a7
echo wakeonlan $WAKETHIS
wakeonlan $WAKETHIS

The output when you run the above

$ wolnas
wakeonlan 0:12:33:43:96:a7
Sending magic packet to 255.255.255.255:9 with 0:12:33:43:96:a7

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

You May Also Like…

How to Research a CPU Upgrade

How to Research a CPU Upgrade

Upgrade Time! Doing a lot of VMWare Workstation virtualization to create labs for self-study and training. Finding...