3

My problem has become pretty specific but probably pretty easy to solve. I've followed numerous guides on the internet to setup wake on lan and managed to get it working quite good although I still have one issue.

I can wake up my computer via LAN and even over 3G, but when I'm sending over 3G I can only send about a minute or two after I shut down the computer (might be longer), but if it takes much longer my computer won't boot.

The guides mentioned something about the router forgetting my MAC address after some time, but if that is the problem, should it work over a private network?, and how do I resolve this issue?

I've installed DD-WRT on my DIR-615 router. The computer I want to wake up is running Windows 7 Ultimate.

1
  • On a private network it doesn't matter if the router remembers your MAC address as it will just forward it out to all ports on the network. Apr 3, 2011 at 9:43

1 Answer 1

7

WoL works by sending a specially formatted ethernet packet to the MAC address of your computer. If you are on the local network (the LAN) you can communicate direct with your computer's MAC address and WoL works all the time quite happily.

From anywhere outside the local network you rely on IP routing to forward IP encapsulated packets through the network to get to your computer. This forwarding relies on ARP (Address Resolution Protocol) at the final hop (your router to your computer).

Your router keeps a record of which IP addresses are mapped to which MAC addresses - the ARP table - which periodically has stale entries purged.

Under normal network operation the router first sends an ARP WHOHAS packet to all the computers on the network (MAC address ff:ff:ff:ff:ff:ff) requesting the computer that has the IP address specified in the packet to respond with an ARP HAS packet stating that it has the IP address in question. This gets cached in the ARP table for a period of time.

If the computer is switched (or asleep) the network stack can no longer respond with anything, so the ARP WHOHAS request never succeeds - so the router cannot work out where to send the packet to - hence WoL then fails.

There are 2 possible ways around this problem:

  • Set up a static ARP entry on the router

This is by far the simplest if the router has the ability to store a MAC->IP mapping permanantly. This will remove the need for ARP to try and discover the MAC address of your computer.

  • Have another network device on the local network that never sleeps and is able to perform the WoL for you.

Seems to defeat the object really, but it may be the only way to do remote-WoL.

6
  • Thanks for the really great answer and I got some really good information on how this all works, and after reading the DD-WRT wiki on WOL it actually says to add static ARP:s to the router, it suggest writing in these commands into the router: Apr 4, 2011 at 6:57
  • ip neigh change 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0 ip neigh add 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0 I'm guessing that the IP that is chosen is random and does not matters long as it not assigned to anything? But I'm still a little unsure of what mac-adress I should write instead of ff.ff... The wiki post can be found here: dd-wrt.com/wiki/index.php/WOL Apr 4, 2011 at 7:07
  • It must be stressed that the MAC address to ff:ff:ff:ff:ff:ff (the broadcast address) needs to be used as otherwise the traffic will not get propagated over all switch ports in the network. i.e., use ff:ff:ff:ff:ff:ff so that the switch doesn't care what port the computer is plugged into. Note that this will send the WoL packet to all computers on the network - waking them all up.
    – Majenko
    Apr 4, 2011 at 8:00
  • Just one more stupid question, when you say "MAC address to ff:ff:ff:ff:ff:ff (the broadcast address)" is that the routers mac-adress, the computer I want to wake up, the device sending the WOL. Or should it simply be ff:ff:ff:ff:ff:ff? for it to send over all the ethernet ports? Apr 4, 2011 at 10:49
  • It should simply be ff:ff:ff:ff:ff:ff
    – Majenko
    Apr 4, 2011 at 10:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .