This has always been a mystery to me and with all the snow we're getting I'd like to work from home but the boss man wants us to turn our computers off a night to save energy. Figured I'd like to try Wake-On LAN, but not sure where to start.

  • 9
  • 1
    this url, in context with the question title, actually made me laugh :D (Yeah, it could have been crafted by randomly typing my best guess into the location bar - the "I'm feeling [ld]ucky" way I suppose?)
    – n611x007
    Mar 15, 2013 at 8:57

5 Answers 5


Basically, when your machine is plugged in, even turned off, some maintain some very basic functions such as the network card.

They can be configured so that when a special instruction is received, it can power up the machine.

The easiest way to start is simply, if you have an integrated NIC, look in the BIOS and see if it supports it. If you have an actual Network card, you may not be able to use it... But it is worth seeing if you have a slot for a Wake On Lan Chip or cable

Also, as for saving energy, you need to obviously turn on your device! You need to have a router that can turn on devices based on a schedule or a wireless mobile or similar that you can send the instruction from - obviously though, you may just be better off turning the machine on via its power button!

Wikipedia has a good article on Wake On Lan

Wake on LAN (WoL) support is implemented on the motherboard of a computer and the network interface, and as such, is not dependent on the operating system running on the hardware, although the operating system can sometimes control the WoL behaviour. If the network interface is a plug-in card rather than being integrated into the motherboard, the card may need to be connected to the motherboard by a cable. Motherboards with an embedded Ethernet controller which supports WoL do not need a cable.

  • Where does NIC take power for work?
    – Dims
    Oct 10, 2018 at 9:13

Ok, there isn't much good information about this on the net, so here's my wisdom:

How Wake-on-LAN works

So the whole point of WoL is to turn your computer on remotely using the network. Obviously if your computer were actually completely off, then there's no way this can work, so when modern computers are turned "off", the ethernet card actually remains on, in a (hopefully) low power state, listening for WoL packets.

When WoL was first created, you could set your network card to signal the BIOS to turn your computer on when there was any network activity. That is, whenever an ethernet frame (or maybe an IP packet; I'm not 100% sure) is seen by the network card. Seems kind of reasonable, but in reality it is useless because occasionally random packets flying over the network will wake your computer up for no reason. To fix this, someone invented MagicPacket™! By setting your card to MagicPacket™ mode, it will only wake the computer when it sees data containing your network card's MAC address repeated 6 times (as far as I remember). Now, random packets won't annoyingly wake your computer. This is also the reason you need to put your MAC address into WoL tools; so it can construct the MagicPacket™.

You might have noticed a small flaw with MagicPacket™: Anyone on the network can see you MAC address, so if you are trying to use WoL on an untrusted local network (e.g. a university), annoying people could keep waking your computer. Don't quote me on this, but looking at the ethtool man page it looks like someone has "invented" SecureOn™ for MagicPacket™. This apparently lets you set the MAC address that your card listens for, effectively turning it into a private password.

How the packet gets to your computer

Now here's the tricky part. Ethernet was designed to send data between computers that are on. This doesn't play well with WoL, which wants to send packets to computers that are off.

The first hurdle is that off computers don't really have IP addresses. Therefore you cannot send a WoL packet to an IP address (tools that let you put in your IP address are really asking for the IP address of a router, which is on). Instead, WoL packets are broadcast to every connected ethernet device. You can - in good routers - manually associate an IP address with a MAC address, but most routers don't allow this, and will drop IP packets that are sent to off computers.

Broadcasting packets works, but there is a problem...

Why it isn't very good

The problem is, most routers don't allow you to forward packets to a broadcast address. Ideally what you want in your typical "I'm at work and I want stuff from my home computer" WoL setup is to forward from external port 9 (for example; see below) to Routers simply won't do it. I did actually eventually find out how to do it for a speedtouch ADSL router, but it involved hand-editing config files.

Probably the only real way you will get this to work is by installing a decent third party router firmware, such as Tomato or DD-WRT. These have WoL tools built into the web interface. It's not quite so neat since you then can't do cool things like using your phone to auto-wake your computer when you get home. But still. I haven't actually tried, but you may be able to get those firmwares to do forward-to-broadcast. Who knows.

Port 7 and Port 9

Lots of guides say you must use port 7 or you must use port 9, and you're thinking "why?", "which one?". The answer is, it doesn't matter. You can use any port; 80, 666, it doesn't matter. The network card on your computer doesn't care which port the MagicPacket™ is send to, as long as it receives it, and it has the MAC address repeated in it. And if you do manage to get WoL-forwarding to work you can use any port there too (and then put the corresponding port in your WoL tool).

The reason 7 and 9 are recommended is because they were the ports used by a couple of completely useless servers that haven't been used by anyone since the 80s. Just like port 80 is the port for the web, port 7 is the port for the "echo" server which repeats everything back to the sender, and is a massive security vulnerability, and port 9 is the port for the "discard" server which simply discards all the data it receives and never sends anything back. They're completely useless now but I guess maybe they were good for network testing back when the internet was new (the 70s).

Troubleshooting - My computer won't turn on!

The first thing to check is that you receive the MagicPacket™ when your computer is on. For that, download wireshark (google it), tell it to listen to port 9 (or 7 or whatever), and send a WoL packet. You should see it. If you don't, the problem will be relatively easy to fix, or at least diagnose.

If you get the packet, but your computer still won't turn on, it gets a bit more tricky.

First, go into the BIOS/UEFI, and make sure an option like "Allow PCI to wake computer" or similar is enabled. Also enable the PCIe option. Second, on linux use ethtool to enable WoL for your network card. Something like ethtool -s eth0 wol bgm. In windows you find the option "Allow this device to wake up the computer" and maybe there are some MagicPacket™ options there somewhere. I dunno I'm not using windows right now.

Now, hopefully it will work. But maybe it only works for a few minutes (or even seconds) after you turn off your computer! Oh no! This is a problem with the router. I recommend you get a different one. Seriously, Tomato-USB is awesome.

  • Where does NIC take power for work?
    – Dims
    Oct 10, 2018 at 9:13
  • From the power supply. It still supplies the motherboard with a little bit of power.
    – Timmmm
    Oct 10, 2018 at 15:06
  • Why do you keep stylizing the name as "MagicPacket™"? Is it actually trademarked? Or is it a joke? Jun 27, 2022 at 21:17
  • I can't really remember. It was trademarked by AMD and I guess I just saw that they'd written MagicPacket™ in their UI or docs a few times and found it amusing that they'd trademark such a ridiculous thing.
    – Timmmm
    Jun 28, 2022 at 6:02

Wake on lan will (probably) not work if your computer is behind a firewall. To get it to work you have to have open ports in the company's firewall to let the message through and send it towards your computer.

One way to get around this is if you have access to a computer behind your firewall that is always on and send your WOL-signal from that computer.

  • Good suggestion on how to get around it, by leaving one computer on and issue the WOL packet from there, as long they are on the same LAN or the switches allow it through. When done you can shut down your computer. The one computer left on can also be used for simple stuff like checking email or using the intranet. As for how it works, check the other links provided. When your NIC sees that magic packet with it's MAC address, it signals the PC to boot up. Magic packet reminds me of ramen noodles.
    – Bratch
    Nov 18, 2011 at 0:08

Figured I'd like to try wake on LAN, but not sure where to start.

here's a nice tutorial for you:

How To: Wake on LAN / Wake on WAN


Timmmm Very well detailed answer !! I would also like to mention that since WOL Signals sit at layer 2 of the osi model (Data), so it is trasmited by Frame and MAC address. Therefore, the machine that sends the WOL Signals need to have access to all the vLANS of the machines that you want to turn on.

So most likely a server in the Management vLAN. This is why WOL signals are more commonly sent from the Main firewall, or the DHCP server of the specific vlan you are trying to communicate with. Which of course requires a VPN access or a RDP Machine setup in the DMZ with management acces (The latter is HIGHLY Unrecommended!!)

That would be a LOT of work to deploy, not to come to the office on a snowy day ;)

You must log in to answer this question.

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