0

Last week I installed Ubuntu and tried to get it to boot with Wake On Lan.

I rerouted all incoming packets at port 9 to the server. When it's the magic packet the server will boot. All went well until I tried it the next day from a different location. It wouldn't work. So I started Googling and did some tests and found out the server won't respond to the magic packet after x amount of minutes.

I've got telnet access to my router, if there is anything I need changed there.

jscott
  • 24,484
  • 8
  • 79
  • 100
user57121
  • 1
  • 1
  • 1
  • 1
  • Would be useful if you gave some more details. Are the servers you want to wake and the system issuing the magic packet on the same subnet with no routers in between them? Not sure what you mean by server not responding after x amount of minutes. How many is x? What googling and testing did you do? – dunxd Oct 14 '10 at 11:35
  • Yes i've did the following tests with success: Wake up server on same subnet without any routers in between Wake up server from internet so with router in between x amount of minutes is unknown, but it did work within 20 minutes after server shut down. After that it wont respond anymore to the magic packets. – user57121 Oct 14 '10 at 11:53

3 Answers3

1

If your router is configured to forward the WOL packet to your sleeping computer, it needs to be able to discover the computer's MAC address based on the IP address, which is what the ARP protocol does. However, with the computer off, ARP won't work, so once the router's ARP cache becomes stale the relevant entry is removed and you're out of luck (that apparently takes 20 minutes in your case).

Some routers let you configure this ARP mapping statically, or use the static IP configuration as an ARP mapping as well, or contain their own WOL tool to do the job (e.g. Tomato and DD-WRT firmwares) - you'll have to check yours to see if it's supported.

Another option is to forward the WOL packet to the broadcast address (such as 192.168.1.256, if that's your subnet's address), but this too is not supported on all routers.

amichair
  • 11
  • 1
1

If you are using an enterprise grade switch or router you may want to look at the following two directives:

ip directed-broadcast

and

ip forward-protocol

These directives are mostly prevalent on Cisco or other vendors that adopt a Cisco-like CLI. The ip directed-broadcast directive instructs the switch/router to forward any packets destined to a subnet's broadcast address as if it were a unicast packet. Meaning, your UDP packet destined for 192.168.1.255 (for subnet 192.168.1.0/24) would be forwarded along to the destination subnet 192.168.1.0/24 as if it were addressable. Once the packet reaches the hop (router/switch) that is directly connected to 192.168.1.0/24, your ip forward-protocol directive will take over.

Since 192.168.1.255 is a broadcast address, there is no MAC address associated with it. Therefore, the switch will have to explode the destination MAC address to FF:FF:FF:FF:FF:FF. Meaning, the switch/router will have to send the packet to all the operational ports on the switch (i.e. layer 2 broadcast). The ip forward-protocol directive does just that. This eliminates the need to store static ARP entries in your router/switch's ARP table. Note, you do not want to use the ip helper-address directive (unless you need to) because it is limited to forwarding a few common udp protocols like NTP, NetBIOS, etc. Wake-on-LAN is not one of them.

Furthermore, we have been experiencing problems in our workplace with BIOS settings on machines, and different NICs. In some cases, WoL will work only once and then fail subsequent times. Completely disconnecting the PC from the wall (network & power cable), allowing the capacitors on the motherboard to discharge, and then reconnecting these PCs appeared to remedy the issue. However, this is no solution. We are currently in the process of investigating these anomolies with our vendor (Dell). Hope this helps.

Nadeem Douba
  • 121
  • 1
0

Some routers wont forward the wake on lan packets to your local network, you will need to check to see if your router will

beakersoft
  • 997
  • 15
  • 29