I have a wireless AP setup with one LAN port connected to the main router and another to a windows PC (which is turned off). Note that the connection to the main router is through a LAN port, not the WAN port.

How do I get the router to correctly forward the magic packet (for wake-on-lan) to the 'right' LAN port? This seems to work sporadically, and not at all after some time (indicating some sort of cache is being flushed).

For reference, the IP address my PC grabs (static) is, with the AP assigning itself the IP address (no DHCP running on the AP).

This would work fine if I plugged the AP's WAN port to the router and then did normal port-forwarding of port 9. Unfortunately other requirements preclude me from using that setup, as the windows PC must directly access the subnet/IP range that the router is giving out.

  • What destination addresses do you use for the magic packet itself? Dec 28, 2018 at 23:40
  • Whether I'm using the IP of the PC or the AP doesn't seem to make a difference.
    – Ng Oon-Ee
    Jan 2, 2019 at 1:16
  • Maybe, but they don't work for different reasons. The address of the PC doesn't work because of ARP, and the address of the AP doesn't work because it makes no sense whatsoever to use it in the first place. Jan 2, 2019 at 5:56

1 Answer 1


Make sure the NAT gateway router at the head of your network has a permanent static ARP table entry for the IP address -> MAC address mapping for the machine you want to wake.

  • The reason I'm running this convulated setup in the first place is a lack of control of the head router.
    – Ng Oon-Ee
    Jan 2, 2019 at 1:15
  • @NgOon-Ee Well, you're probably stuck then. Routers (and all devices doing IP on Ethernet really) have ARP caches, and they time out old entries after a few minutes of not being used. So when your NAT gateway router wants to forward your WOL magic packet to the sleeping device's IP address, it doesn't know how to address the frame because it doesn't know the device's MAC address because it has timed it out of the ARP cache. So it can't send it and drops it.
    – Spiff
    Jan 2, 2019 at 2:08
  • Previously when my AP's WAN was facing the router I could manually specify the IP of the AP to send the packet to, and the AP would forward that packet internally (based on it's own ARP table). How do I do that with my AP's LAN facing the router?
    – Ng Oon-Ee
    Jan 2, 2019 at 2:47

You must log in to answer this question.

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