heredago's blog

January 3, 2012

WOL additionnal info NOT related to TOMATO / DD-WRT routers

Filed under: Uncategorized — Tags: , , — heredago @ 22:13

Why can’t I simply forward the magic packet to the IP address of the PC to wake up?

Well, actually you can, but only for a few minutes after the PC shutdown. Indeed, after this delay, the router will loose the mapping between the MAC address and IP address and will be unable to find the target, and therefore unable to forward the magic packet.

My router does not natively support Wake On Lan, what can I do?

By “natively”, I mean that the router will forward to the LAN all magic packets received from the Internet. If a router don’t support Wake on LAN natively a few workaround may be usable:

  • if the router supports it, forward the UDP packet to the broadcast address
  • if your router supports static DHCP, define a static DHCP entry for the PC wake up and try to forward to the choosen IP address. Hopefully, the router will read the static DHCP list and forward the magic packet the MAC Address in the according rule.

If none of the suggestion above work for you, the last solution is to use a third hardware device (router or PC always powered on) which will operate the UDP forward to broadcast address.

What is a broadcast address?

When a data frame is sent at a broadcast address, it is received by all devices connected to the network (assuming broadcast addresses are allowed on the LAN). In most home and small business it will end in .255. For example, a gateway router with an IP address of will typically have a broadcast address of

I mention that if the subnet mask is, the UDP broadcast address is

For Wake on LAN, sending a magic packet to a broadcast address is very convenient because all devices connected to the LAN will receive the magic packet. However, since the magic packet contain the target MAC address, only the destination PC (according to the MAC address) will take into consideration the wake up request. All other PCs will ignore the network packet. Remember that since the PC is powered off, it has no assigned IP address usable to submit a network message.

How to UDP forward to a broadcast address?

All routers include a “port forwarding” feature, it allows to forward all incoming (from the Internet) UDP packets (on a specific port) to an internal IP address and port. To forward to the broadcast address of your LAN, simply define a port forwarding rule to the broadcast adress of your LAN (ex: The exact procedure depend on your router brand and model and will be described in the manual.

Unfortunately, many router models won’t allow forward to the broadcast address. Furthermore a specific model may support it with a firmware version, and deny it with another firmware version.

While trying to set a destination as a broadcast address, some routers may refuse the save the forward rule, some others will accept to save the rule but won’t execute it.

Two workarounds may be tried:

  • If the router refuse to save the rule, it may be handled by a simple javascript. If this is the case, using Firefox, disable javascript, save the forward rule and try to wake up your PC.
  • Some router may refuse to save the rule if the destination address ends by “.255”. If this is the case, you may change you LAN subnetwork mask to and therefore use a broadcast address ending by “.127”. This is tricky solution because the subnet mask must be changed on all devices connected to your LAN. Plus, all private IP addresses ending in range 128-254 are not usable.

A last option, is to replace your router with a model supporting UDP forward to a broadcast address, most likely running an open source firmware Tomato or DD-WRT.


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: