Wake on Lan for FreeBSD ************************************************************** I don't use FreeBSD anymore, and probably won't update these patches. There is some WOL support in FreeBSD-8-CURRENT, which I partly backported to 7.0-RELEASE. See here for these patches: http://stsp.name/wol/FreeBSD-8-CURRENT-wol-backported-to-7.0/ For -CURRENT wake on lan status, see wiki.freebsd.org/WakeOnLan ************************************************************** I have written a patch that teaches FreeBSD about wake on lan. You can download it here (pick the latest version). It currently works with cards based on the following chipsets: * NatSemi DP83815 (if_sis) * Via Rhine (if_vr, only VT6102 and up chips support WOL) * Nvidia nForce (if_nve, not tested!, nve is a binary blob driver and will afaik be replaced by if_nfe in FreeBSD-7) * 3Com Etherlink XL and Fast Etherlink XL (if_xl, not all 3Com XL adapters support WOL) There is also an entry for this in the FreeBSD bug database. See http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/83807 WOL patches are available for RELENG_7 and RELENG_6_2. I try to keep them in sync. To apply the patch, do # cd /usr/src # patch -p0 < /path/to/patch and re-compile your kernel. Note that you will need ACPI support in your kernel. Reboot. Now recompile ifconfig: # cd /usr/src # make includes # cd /usr/src/sbin/ifconfig # make clean obj # make && make install I modified ifconfig to make wake on lan configurable from userspace: [stsp@ted ~]$ ifconfig vr0 vr0: flags=8943 mtu 1500 options=40 inet 10.42.42.2 netmask 0xffffff00 broadcast 10.42.42.255 ether 00:0b:6a:d5:1e:b1 media: Ethernet autoselect (100baseTX ) status: active supported wake events: unicast magic ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [stsp@ted ~]$ su - Password: [root@ted ~]# ifconfig vr0 wakeon magic [root@ted ~]# ifconfig vr0 vr0: flags=8943 mtu 1500 options=40 inet 10.42.42.2 netmask 0xffffff00 broadcast 10.42.42.255 ether 00:0b:6a:d5:1e:b1 media: Ethernet autoselect (100baseTX ) status: active supported wake events: unicast magic will wake on: magic ^^^^^^^^^^^^^^^^^^^ Now shut down the box with "shutdown -p now" or "halt -p" and try to wake it from another box using a tool like /usr/ports/net/wol to send a magic packet. You'll need to pass wol the MAC address of the box you want to wake up on the command line, and the broadcast address of your local network. In my case this would be: wol -h 10.42.42.255 00:0b:6a:d5:1e:b1 Don't forget you may also need a WOL cable connecting the network card to the mainboard, and you may need to turn on wake on lan in the BIOS. You can configure WOL from /etc/rc.conf: ifconfig_vr0="DHCP wakeon magic" For more information see the ifconfig man page which is updated by the patch -- see the description of the "wakeon" subcommand. If there are any problems don't hesitate to get in touch. If your card isn't supported yet but you know C, see here: http://marc.info/?l=freebsd-hackers&m=119602736908444&w=2 If you really cannot add support for the card yourself, get in touch.