Wake-On-Lan not working after a long sleep

Page 2 of 2 FirstFirst 12

  1. Posts : 2
    Windows & 64 bit
       #11

    I had this issue when I was first setting up my WOL. However, it now works flawlessly. Like everything, the answer lies in the details. Let me explain.

    It's my understanding that when the computer is in S1 or S2 sleep (see earlier post in this thread from Parmer for definitions), an IP address can still be used for WOL. But, once it gets to S3 or S4 sleep, the computer essentially loses it's IP as an identifier. This explains why WOL might work right after the computer has been put to sleep, but not when the computer has been sleeping for a long time.

    So, if you can't send the WOL signal directly to the IP of your computer your trying to wake, to what IP can you send it? The answer is that you need to send the WOL signal sent out to EVERY IP on the subnet. This is accomplished by sending the WOL signal out to xxx.xxx.xxx.255. (255 broadcasts to every device on a subnet.)

    So, the WOL signal has to go out as a broadcast (aka xxx.xxx.xxx.255) and it has to contain 2 things:
    1. The MAC address of the device you want to wake, and
    2. The UDP port number for the NIC that's listening for the WOL signal (UDP port is usually 7 or 9 for WOL).

    Herein lies the problem. You can generally configure a router to forward incoming data to any specific IP, but not all IP's. In other words, I've never seen a router that will port forward anything to the xxx.xxx.xxx.255. This is for good reason, but limits your ability to use WOL.

    If you're only trying to send and receive the WOL signal within one subnet, you just need to follow the rules above and make sure that your NIC is configured properly (read on for an easy way to check.)

    But, if you're trying to do this across different networks (i.e. over the internet), you'll need a router that is capable of sending out the WOL signal and you'll need a way to ask the router to do so.

    So, how does one "ask the router to send out the WOL signal"? So long as the router is capable (many are not), you should be able to do it through the GUI interface on the router, or by connecting to it (via telnet or SSH) and executing the proper command. If your router is NOT capable or sending out WOL signals, you might be able to make it so by flashing the router with a third party firmware like DD-WRT, Tomato, etc.

    The GUI method is easier to understand, but the telnet or SSH method allows you to write a little batch file that allows you to do WOL with a simple double click. (I won't get into this here.) Regardless of which method you use, when trying this from the internet, you'll have to configure your router to allow WAN connections to the GUI, telnet, or SSH interface before you'll be able to ask it to send the command.

    Lastly, before banging your head against the wall trying to set this up, do an easy check to see if you NIC can even handle WOL:

    From the command prompt type:
    powercfg –devicequery wake_from_any
    ... and hit enter.

    The device with the NIC you want to be listening for the WOL signal needs to be listed. If it is not, pick a different device or give up because WOL isn't going to work (not reliably any way).

    If it is listed, from the command prompt type:
    powercfg –devicequery wake_armed
    ... and hit enter.

    If the device with the NIC you want to be listening for the WOL signal is properly configured, it will be listed. If it is not listed, change the configuration and check it again.

    Lastly, don't forget to check that the power management settings in your bios are configured as well. You can have everything else correct, and improper bios settings can still hold you back.

    For what it's worth, I use a router flashed with DD-WRT for WOL. I think most if not all DD-WRT versions can do WOL. If your router can be flashed with DD-WRT, I highly recommend it.

    Good Luck!
      My Computer


  2. Posts : 1
    win 7 64
       #12

    Same problem I had: WOL will not work after few minutes.

    Add this: arp -s 192.168.1.xxx 01-02-03-04-05-06 in a bat file. Add the file in Task Scheduler to run on Startup or Logon, check box "Run with highest privileges".

    Now is solved.
      My Computer


  3. Posts : 3
    Mac OS X; Win XP,7
       #13

    Hi,
    please, my IP is static and public. My bios and network adapter based on many tutorials and threads is set properly. My network adapter is working all the time. Even though WOL works 1 min max after shut down. Based on powercfg -devicequery wake_armed command it's able to WOL also. Based on ipconfig/all command and ping my IP is static and public and is not behind any router. I've tried every bios and magic packet configuration possible. Still no luck after longer period of time.
    Thank you very much
      My Computer


  4. Posts : 1
    Windows 7 Home Premium 64bit
       #14

    Hi,
    If your WOL works correctly but times out after a certain time all you need to do is set up static IP within the computer which will be on WOL as well as your router.

    If you have not yet configured static IP within your computer -

    Open Windows Start menu.
    Open Control Panel.
    Classic view: Open Network Connections
    Category view: Select Network and Internet Connections, and then Network Connections.
    Double-click on your active LAN or Internet connection.
    Click Properties.
    This opens the Local Area Connections Properties window.
    In the General tab, highlight the Internet Protocol (TCP/IP) item, and click Properties.

    This opens the Internet Protocol (TCP/IP) Properties window.
    In the General tab, click Use the following IP address, and enter:
    - IP address. The static IP address you want to assign to this computer. (make sure it's not xxx.xxx.x.1 as that's what your router is configured to)
    - Subnet mask. Subnet mask used by your router. (255.255.255.0)
    - Default gateway. IP address of your router's default gateway. (xxx.xxx.x.1)
    - Make the preferred DNS to 8.8.8.8 and Alternate to 8.8.4.4
    Click OK.

    Then:
    Click OK to close each window.
    Restart your computer.


    Now you need to configure your router.
    Within the router look for something called DHCP, you will have to look for something like "Reserve DHCP"
    Click on that and you should be able to see your computer and it's IP address, add it to the reserves (There will be different machines with reserved IP's however they will have the expiry time and date)
    Don't forget to apply the settings and then save and quit


    To check whether your IP is now fully static run cmd
    In the cmd enter ipconfig/all
    Look for something that says DHCP enabled, if it states yes then you have done something incorrectly, if it says no then everything is now set up and you should have no problems with WOL getting timeout

    Hope this helps ^^



    Resources - hotComm FAQ: Assign Static IP Address (Windows XP)
    Last edited by MaticJ; 02 Apr 2015 at 09:40. Reason: Misspelled
      My Computer


  5. Posts : 1
    Windows 7 Pro x64
       #15

    How to circumnavigate limited AT&T Gateway for U-Verse


    I setup a Lenovo M53 for my mother in CA, but will soon be returning to my home in Kansas City. I want to keep it in good working order for her, and have uses for it myself, while at home working on my Arch Linux computer. She will be keeping it completely turned off most of the time, so I wanted to be able to turn it on at will. I got wol working just fine, but like everyone on this thread, it stopped working after a minute.

    I eventually realized the fault was with the AT&T Gateway because after a minute, it saw that the Lenovo was not active, and would not forward the wol packet to it. Of course, AT&T U-verse tech support (and advanced support that you pay for if they solve the issue) was useless, since I had to teach them how wol works in the first place. They were convinced a computer could not be turned on after it was off just by receiving a packet. Anyway, AT&T U-Verse doesn't have the option to just use a modem and your own router. You have to use their gateway, and you can't even define internal static IP addresses for the devices connected to it.

    Here's how I got around it (probably missing a lot of steps, but this should be enough for somebody else to figure out how to do it):

    1. I bought "BUFFALO AirStation N300 Open Source DD-WRT Wireless Router (WHR-300HP2D)"
    2. Set a switch on it to "Bridge"
    3. Unplugged my linux computer from the AT&T Gateway and plugged it into the Buffalo dd-wrt router.
    4. Connected an ethernet cable from the AT&T Gateway to the "Internet" port of the Buffalo dd-wrt router.
    5. DON'T DO THIS -> Used the web interface on the Buffalo dd-wrt router to disable wi-fi (Wireless Network Mode Disabled). TURNS OUT THE AT&T GATEWAY WIFI LOSES ABILITY TO CONNECT TO DEVICES WHEN BRIDGED DEVICE HAS WIFI OFF
    6. In the web interface, under Administration Router Management, Remote Access, I enabled HTTP remote access. (For some reason, whenever I tried to use HTTPS, I completely lost access to the web interface and had to start over after doing a hard reset.)
    7. Unplugged my linux computer from the Buffalo dd-wrt router, and plugged it back into the AT&T Gateway.
    8. Unplugged the Lenovo from the AT&T Gateway, and plugged it into the Buffalo dd-wrt router.
    9. Used whatsmyip.org from my linux computer to find the AT&T Gateway public IP address, let's call it att.pub.ip.add.
    10. In the AT&T Gateway web interface, set up a custom port forwarding that I called Buffalo HTTP to forward port 8080 to the Buffalo dd-wrt router.
    11. Accessed the Buffalo web interface through the internet at att.pub.ip.add:8080 (of course, I put in the address found from whatsmyip.org)
    12. In the Buffalo web interface, Administration WOL tab, checkmarked to enable WOL on the Lenovo that is now connected to the Buffalo dd-wrt router.
    13. Verified WOL from the web interface worked well, no matter how long the Lenovo was turned off.
    14. Really though, I wanted to issue a command from a terminal in my linux computer and have it turn on the Lenovo without using the Buffalo web interface, so had to do some more port forwarding.
    15. First, went into the web interface of the AT&T Gateway and set up a custom port to be forwarded to the Buffalo dd-wrt router; let's call it BuffPort. (Can keep a tab open to both interfaces)
    16. Back in the Buffalo web interface, under Services Management, enabled SSHd and related stuff, including the same custom port (BuffPort) that will be forwarded from the AT&T Gateway.
    17. In the Buffalo web interface, under Administration Router Management, Remote Access, I enabled SSH Management and set the custom BuffPort remote port again.
    18. Got ssh from my linux computer into the Lenovo working

      Code:
      ssh -p BuffPort root@att.pub.ip.add
    19. Figured out that the wol command didn't work in a straightforward way, but that the command that did work was stored on the Buffalo dd-wrt router, and could be printed to the screen with

      Code:
      nvram get wol_cmd
    20. Here is the command that can be ran from my Linux computer to turn on the Lenovo:

      Code:
      ssh -p BuffPort root@att.pub.ip.add '$(nvram get wol_cmd)'


    The last step above is all that's related to this thread, but I also had to do some trickery to be able to ssh directly into the Lenovo from my Linux Computer because for whatever reason, I was not able to setup port forwarding using the Buffalo dd-wrt web interface. Here's how I was able to do it from the ssh terminal though:
    Code:
    iptables -t nat -I PREROUTING -p tcp -d $(nvram get wan_ipaddr) --dport Buff2Port -j DNAT --to 192.168.11.140:Buff2Port
    
    iptables -I FORWARD -p tcp -d 192.168.11.140 --dport Buff2Port -j ACCEPT
    Where 192.168.11.140 is the internal IP address the Buffalo dd-wrt router has for the Lenovo connected to it, and Buff2Port is another custom ssh port being forwarded to the Buffalo dd-wrt router from the AT&T Gateway. To make these port forwarding commands last after a reboot of the Buffalo dd-wrt router, I used the web interface to save them as a firewall script. It's in the Administration Commands tab. Just copy the commands in there, run them, and click the "Save Firewall" button.

    A command for turning off the Lenovo from my Linux computer is as follows:

    Code:
    ssh -p Buff2Port Win7User@att.pub.ip.add 'shutdown /s /t 1'
    Where, of course, Win7User is the username setup for ssh (using bitvise). I had to do similar stuff to get RDP working as well.

    I was even able to get around the problem of att.pub.ip.add not being static by using another great feature of the Buffalo dd-wrt router: ddns. I found a completely free way to do it, but that's enough for this post.
    Last edited by colinkeenan; 22 Jun 2015 at 14:51. Reason: Warn that WiFi needs to stay on
      My Computer


  6. Posts : 1
    Windows
       #16

    Hi,

    I just made an updated article for configuring wake-on-lan in windows 10 and windows 8.1.

    Hope it will help somebody.
      My Computer


 
Page 2 of 2 FirstFirst 12

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:43.
Find Us