Wake-on-LAN a FreeBSD server

Compiled from at least three sources of wisdom, here is a brief wake-on-lan note for FreeBSD 10.1-STABLE.

Set your BIOS first, mine is tuned in “Advanced >> APM >> Power On By PME”!

Next, check your NIC:

# grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c

and see if ifconfig reckons it, too:

# ifconfig re0 | grep options

At a machine that is going to wake the server, install the tools for that purpose:

pkg_info | egrep ‘wol|Wake’
p5-Net-Wake-0.02p1 perl5 module for Wake On LAN
wol-0.7.1p2 Wake On Lan client

A one-liner is enough at a gateway that is going to wake the server:

the-gateway # cat /scripts/summon-the-zombie.sh
/usr/local/bin/wol -i AA:BB:CC:DD:EE:FF

Finally, shorten the boot-time a bit:

# grep delay /boot/loader.conf

Voila! Your FreeBSD server is prepared for the life in XXI century capitalism – you can now pretend that you both take care about the power consumption AND wake the worker any time you want!

Compiled with the notes from lampros.chiadas.com, linux-bsd-sharing.blogspot.com, and forums.freebsd.org.


P.S. found out yet another way to wake a server from an OpenBSD box:

/usr/sbin/arp -W AA:BB:CC:DD:EE:FF if0

Leave a Reply

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