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.