If yes, how does it work? The pc still has no ip, so where should I forward the port?
How to Configure Wake on LAN. In the upper-right pane, click on the Ethernet connection. In the Ethernet Status window, click Details, and then you’ll see the physical MAC address. After downloading and installing WakeOnLAN, launch the utility and select File New Host. Under the Display Properties tab, enter the name of the machine and a group name if you wish. Wake on Lan (WOL for short or sometimes called RWU for Remote Wake Up) uses UDP port 9. If you are behind a router and want to allow Wake On Lan packets to go through, make sure you forward UDP port 9 to the broadcast address, this is because a computer does not get an IP address until its booted up, and the magic packet needs to be sent to all the computers in the subnet (hence the broadcast).
Wake-on-LAN normally uses UDP ports 7 and 9.
The packets are sent to the special broadcast address of the LAN, so it will be received by all network-attached hosts, rather than by a specific host.
The MAC address is used to identify the particular host that should 'Wake Up'
If the PC is Wake-on-LAN enabled it will be listening for packets on the above ports.
If the magic packet is coming from the internet (WAN) then any firewall must be set up to allow entry of the Wake-on-LAN signal to a specified port, which can be forwarded to the computer to be woken up
Some routers permit the packet to be broadcast to the entire LAN.
Some routers do not support this as they will not forward broadcast packets.
WoL-enabled computers essentially wait for a “magic packet” to arrive that includes the NIC’s MAC address in it. These magic packets are sent out by professional software made for any platform, but can also be sent by routers and internet-based websites. The typical ports used for WoL magic packets are UDP 7 and 9. Because your computer is actively listening for a packet, some power is feeding your network card which will result in your laptop’s battery draining faster, so road warriors should take care to turn this off when you need to eke out some extra juice.
Magic packets are usually sent over the entirety of a network and contain the subnet information, network broadcast address, and the MAC address of the target computer’s network card, whether Ethernet or wireless. The above image shows the results of a packet sniffer tool used on magic packet.
Source How-To Geek Explains: What is Wake-on-LAN and How Do I Enable It?
DavidPostill♦DavidPostillI'm trying to set up Wake on LAN on my Uverse 2WIRE router, and running in to issues. I can't figure out how to set up UDP Port 9 forwarding.
I was using this tutorial, but got stuck at the UDP Port 9 forwarding bit. I've never tweaked much on my router, but this is the screen I get to:
I tried just putting 9 and 9 for Port (or Range), but that didn't work. Looks like a pretty simple question for someone with a bit of knowledge.
EDIT: I may be wrong about the plain old 9 not working, but I think that's the issue. Let me know if you guys think it could be something else.
sblairPut 9 in the from and to boxes then submit. It should tell you 'configuration successful'. Then click the back button to go back to the Applications, Pinholes and DMZ
page. Select your computer and find 'Wake on LAN' in the application list and add it. Then click save and you're done.
resmon6 is quite correct. Those are the needed steps. Note, however, that these 2wire routers tend to 'forget' the routing for sleeping devices. My experience has been that I can successfully send the magic packet (Wake-on-LAN activating packet) to my sleeping devices only during the first 20 minutes or so of them going to sleep. After that, the router flushes its cache, and no amount of magic packets end up making it to the sleeping devices NIC's (network interface cards).
In theory, the ability to access the router's ARP settings would alleviate this, by instructing the router to remember the MAC addresses of devices, but I have found no way to access such commands.