Wake-on-LAN (tutorial)

From DD-WRT Wiki

(Difference between revisions)
Jump to: navigation, search
Revision as of 15:45, 7 February 2008 (edit)
Soulstace (Talk | contribs)
m
← Previous diff
Revision as of 15:50, 7 February 2008 (edit) (undo)
Soulstace (Talk | contribs)
m
Next diff →
Line 13: Line 13:
ip neigh add 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0 ip neigh add 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0
- ''(substitute ff:ff:ff:ff:ff:ff with the actual MAC address of the computer which you wish to boot remotely+ ''(substitute ff:ff:ff:ff:ff:ff with the actual MAC address of the computer which you wish to boot remotely''
- likewise, substitute 192.168.1.254 with the actual IP address of that computer)''+ ''likewise, substitute 192.168.1.254 with the actual IP address of that computer)''
'''Please note that the IP address specified above should be in the same subnet as the one used by the router.''' '''Please note that the IP address specified above should be in the same subnet as the one used by the router.'''
-* Reboot router.+* Reboot router, or execute the startup commands manually.
* To wake your computer from the internet, try one of the following services; * To wake your computer from the internet, try one of the following services;

Revision as of 15:50, 7 February 2008

To remotely wake up a computer from the Internet using Wake On LAN, even if your router is rebooted, follow these instructions:

  • First, Wake On LAN is usually disable by default in most PCs. Make sure this feature is enable in your BIOS otherwise it ain't gonna work. Consult your motherboard's manual. If you don't see the option in your BIOS, chances is that your motherboard doesn't support WOL.
  • It's a good idea to test WOL-functionality of the target computer using a 2nd directly connected computer.
  • A good place to start is here: WOL-Mini-HowTO (Linux and Windows WOL programs are available to download).
  • Choose an IP address not used by any other computer in the local network (e.g. 192.168.1.254). For best results, the machine you wish to boot should have a static IP Address (either manually assigned by you, or via static DHCP).
  • Create a port forward rule on the Web Interface (Applications & Gaming -> Port Range Forward) to the chosen ip:
wol  |  9  |  9  |  udp  |  192.168.1.254  |  x

(you can choose any unused port instead of 9 here)
  • Add a static ARP entry by typing these commands one by one, on the Web Interface (Administration -> Commands) and save with Save Startup:
ip neigh change 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0
ip neigh add 192.168.1.254 lladdr ff:ff:ff:ff:ff:ff nud permanent dev br0

(substitute ff:ff:ff:ff:ff:ff with the actual MAC address of the computer which you wish to boot remotely
likewise, substitute 192.168.1.254 with the actual IP address of that computer)

Please note that the IP address specified above should be in the same subnet as the one used by the router.

  • Reboot router, or execute the startup commands manually.
  • To wake your computer from the internet, try one of the following services;
  1. Mestrona's online WOL. You need to forward port 9 udp to use this service.
  2. Remote Wake-On-LAN. Forward port 7 udp for this one.

To wake by name, see this script.

Automatic Wake-On-LAN daemon

The Automatic WOL daemon will send out a periodic wake on lan packet at the intervals you specify. This may be useful to keep a system online most of the time even if it is turned off. (eg: A Media Center PC).

For Interval you can enter a value in seconds as low as 15 seconds and as high as 86400 seconds (1 day). Host name should be the broadcast address for your LAN. eg: 255.255.255.255 or 192.168.1.255. SecureON Password is computers that have a BIOS feature that secures the WOL function. If you do not have a BIOS that requires this form of password then you can leave the box blank or type in 00-00-00-00-00-00. MAC Address(es) should contain the MAC address of the networked machines you want a WOL to be sent to on your LAN.

The packets generated by the WOL daemon are sent to UDP port 40000. You likely will not need to worry about this unless the system you are attempting to send the WOL packet is on another subnet or you are trying to monitor the packets.

note: the UI says that the Interval accepts a range of 1-86400 seconds but it will only send out a WOL packet at a minimum of 15 second intervals. All values below 15 are accepted but the interval will still be every 15 seconds.

A useful tool for watching the WOL packets on a Windows computer is available at www.depicus.com/wake-on-lan (use port 40000 when monitoring) Or you can use a more generic protocol analyzer tool like Wireshark.

References