2
1
This is an evolving question. See the 2 edits at the bottom for the latest version. I am keeping the original question here too though as it may prove useful.
Ok, So first of all sorry for yet another Wake on Lan question on the internet. I googled for many hours and was up all night last night trying to figure this out. There is definitely a lot of WOL literature out there, but I still could not figure this out.
The problem description (the problem has now changed, see edits below) is pretty simple. WOL stops working only a second or two after being shutdown. I am judging the moment of being "shutdown" as when all the LEDs shut off and the fans stop spinning on the case. It DOES work if I send the magic packet the instant it shuts down. Sometimes I can wait as long as 1 second (counting a thousand and one) and it will work. Any longer than that and it will never work again.
I have heard of issues of other people not being able to do it after a couple hours and what not. But not a few seconds.
System Details:
- Homemade PC with Gigabyte (GA-Z68X-UD3H-B3) motherboard
- Using the Realtek network adaptor built into motherboard
- TP-Link WR842ND router (default firmware upgraded to latest version, looked into putting OpenWRT or DD-WRT on it, but too much work right now)
- Dual boot system with Ubuntu and Windows 7 using GRUB2 bootloader
Things I have done:
- I have followed this fairly official tutorial for Ubuntu.
- Also this less official one for Windows which seemed thorough and like it might have a bit of overkill.
- Went into my BIOS settings and enabled anything that sounded like it might help (there were a couple things that the BIOS even warned me need to be disabled if using WOL so I left those disabled)
- I have googled for hours and tweaked things to no avail.
- I also have completely factory reset my router and reconfigured it.
Configuration of router:
- I am using the "address reservation" setting to make sure my realtek network adapter MAC address is always assigned the same IP.
- I am using ARP Binding to bind my mac address/IP address
- I am using port forwarding (virtual servers) to forward ports 9(WOL), and 22(SSH).
- I previously just had my PC in the DMZ, but when I reset everything I did not do that and used port forwarding instead. I know the port forwarding is working at least for SSH since I was able to login to my machine via my WAN IP.
Considering the fact my machine wakes up successfully via magic packet (even though it's only possible for a brief moment) I think the configuration of my PC (BIOS/Network Adapter/OSs) is generally OK. I don't have to reset any settings after boot to make WOL work the next time. It works every time I shutdown, just for a second or two.
My test case has just been using my LAN IP for now ( so port forwarding should not be an issue at this point). I am pretty sure if I can get that working then WAN will work. So we are talking about a pretty typical use case for WOL, but it wont work.
One final piece of information, which I was not sure where else to fit in this post: The network adaptor on the PC motherboard appears to remain on after shutdown. My router shows the corresponding light activated for where my PC ethernet cable is plugged in. There are other devices on my router plugged in and shut down that do not do this. So I mean.... IT SHOULD WORK RIGHT?!
I have been going nuts over this. Please help, someone. Hopefully this is the right "StackExchange" to be posting this on, there's only a million to choose from.
IMPORTANT EDIT
IT WORKS!! Kind of.... I need to experiment more. But basically, all last night I was testing on my local network using my local IP and it was sort of working (for that brief moment). Today, while I'm still at work, I decided to just send the packet to my PC from my cell phone using the WAN (I use freedns to give me a DNS name). Lo and behold a few moments later, I am able to login via ssh. Weird right? Maybe I just left my computer on this morning (although unlikely). Sent the sudo shutdown -h now
command to shutdown the computer (and not suspend or sleep I don't think). Waited actually like an hour while I had lunch. Tried to login via ssh and it timed out, sent the magic packet and a few moments later ssh works.
Now the question is, why does WOL work over WAN but not LAN?! Shouldn't that be the other way around? Just when you think you know technology it goes and does something like this.
EDIT 2
Tested. Definitely works fine when I send the packet via WAN. Does not work via LAN. I am still very confused. Might try looking for a networking expert at this point. Here's a question though. When I send via LAN, should I be sending to something other than my local IP address for the machine I want to wake up (192.168.0.100)? Or do I send it to something else? I see some people sending it to what looks like a subnet mask. Should I do that? I don't get why my local IP doesn't work though.
Do you mean shutdown or sleep? That is, are you trying to wake from standby/sleep or are you trying to do a remote boot? – Spiff – 2014-05-15T16:01:34.973
Shutdown means shutdown. Not sleep. I dont believe in any of that sleep/suspend nonsense. I like a clean memory slate when I boot my PC. – gnomed – 2014-05-15T16:03:20.127
1Okay, I think you might be conflating WOL with lights-out management (out of band management). WOL has traditionally been about waking a machine from sleep (standby), not about getting a fully shut down machine to power on. Does WOL work to wake your machine from sleep? – Spiff – 2014-05-15T16:21:34.187
That might be worth testing and would probably help me narrow down my issue (I'm at work right now, so I will test later). Your question made me do some reading. Wikipedia has a pretty good blurb that says it could be possible to boot using WOL only from shutdown state and not from sleep state or vice versa. http://en.wikipedia.org/wiki/Wake-on-LAN#Troubleshooting_magic_packets
– gnomed – 2014-05-15T16:36:20.650@Spiff New update. See edit above.... Extremely weird behaviour. – gnomed – 2014-05-15T19:34:17.463