Is there a Wake-On-Lan functionality

Status
Not open for further replies.

globus999

Contributor
Joined
Jun 9, 2011
Messages
105
Hi,
I don't use my FreeNAS server overnight and instead of shutting it off, I was thinking, is there a Wake-On-LAN functionality somewhere in FreeNAS or in its underlying BSD that I could enable?
 

SoftDux-Rudi

Contributor
Joined
Jun 2, 2011
Messages
108
the easier way would be to set your NAS's BIOS to auto-wake when needed (i.e. 8am or something) and then use the cron to automatically shut it down when not needed
 

vanhaakonnen

Dabbler
Joined
Sep 9, 2011
Messages
32
Hi there,

my mainboard (Supermicro C7Q67) doesn´t support an auto-wake function directly in the bios. But it does support wake on lan. So I could shutdown may Freenas via a cronjob and turn it on via other machine by wake on lan. But I can´t find any working information how to activate WOL in freenas8 or freebsd. Can you help me?
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Looks like WOL support in FreeBSD is still pretty new:

http://wiki.freebsd.org/WakeOnLan

It might be that it is not implemented yet for your NIC driver. If it is, it sounds like you'll probably have to tweak it in the shell using ifconfig.
 

vanhaakonnen

Dabbler
Joined
Sep 9, 2011
Messages
32
Thanks!

But FreeNAS dosn´t seems to have the the /usr/src/ directory from the command "grep -l IFCAP_WOL /usr/src/sys/dev/*/*.c".

I have two Intel onboard chips from the Supermircro-Board (Intel 82579LM and 82574L). Is there an option to upgrade the freeBSD under freenas (like apt-get dist-upgrade at debian)? Maybe the WOL-support is committed in actual releases.

ifconfig -m lists WOL at both interfaces:

[...]em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC>
capabilities=1399b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_UCAST,WOL_MCAST,WOL_MAGIC,VLAN_HWFILTER>
 

Durkatlon

Patron
Joined
Aug 19, 2011
Messages
414
Yeah, that grep on /usr/src is for machines that have FreeBSD source code on them. It looks like your NIC supports WOL, so try one of:
Code:
# ifconfig <device> wakeon magic
# ifconfig <device> wakeon broadcast

depending on what kind of packet you want to send to actuate the wake-up.

Then try another ifconfig on the device to see if it says "will wake on: magic" or broadcast.
 

vanhaakonnen

Dabbler
Joined
Sep 9, 2011
Messages
32
Thank you Durkatlon.

When I try theres commands I get the following:
Code:
[root@storage1] ~# ifconfig em0 wakeon magic
ifconfig: wakeon: bad value


FreeNAS seems to notice the cards as em0 and em1 (dmesg):

Code:
em0: <Intel(R) PRO/1000 Network Connection 7.1.9> port 0xf080-0xf09f mem 0xfe600000-0xfe61ffff,0xfe624000-0xfe624fff irq 21 at device 25.0 on pci0
em1: <Intel(R) PRO/1000 Network Connection 7.1.9> port 0xe000-0xe01f mem 0xfe400000-0xfe41ffff,0xfe420000-0xfe423fff irq 19 at device 0.0 on pci4



Edit:
I can do the commands like this "ifconfig em0 wol_magic" and "ifconfig em0 wol" - But the behavior is a little bit strange:
Same tests: I shut down the nas via "shutdown -p now" and try to wake up the system from a ubuntu linux again (with "etherwake" and some things like "wakeonlan -i 192.168.100.10 00:30:48:XX:XX:XX"

I could configure three different ways to power on the system via wol: WOL_MAGIC, WOL_MCAST and WOL_UNICAST. I tried them in different combinations.
WOL_MAGIC > no boot ->> not working
WOL_MAGIC,WOL_MCAST > boots direct after shutdown (without any command to boot the system) ->> not working
WOL_MAGIC,WOL_UNICAST > doesn´t wake up the box

The best way - the magic packet - is not working. With Multicast my system directly boots up (some network traffic seems to do this automatically in my network). Unicast doesn´t seems to do anything at all.

So - how can I power on the system with magic packet? :/ Any Ideas?
 
Status
Not open for further replies.
Top