2012-10-13

The "Missing Link" in "Vigor 2200E-plus" for "Wake on WAN"

To wake a computer in the Internet, there are some requirements must be met.
  • The "Wake-Up Packet" can be sent to this computer directly.
  • The IP sharer must support WoL if the computer is behind the IP sharer.
  • The "Wake-Up Packet" won't be filtered by any network equipment.
Unfortunately, when I want to wake up a computer in home from the Internet through the "Vigor 2200E-plus", there are two requirements did not match.

After several experiments, and finally the "missing link" is found.  The procedure is derived and shared to all in the following.

1. Enable "Allow management from the Internet"

Login the "Vigor 2200E-plus" management interface with a browser and enable the function, "Allow management from the Internet" which is located in "Main Menu -> System Management -> Management Setup -> Management Access Control".  There are some risks, but they can be reduced by changing the IP in "Access List" and "Telnet Port" in "Management Port Setup".
In the figure above, the "111.222.33.44" and "100" are modified to improve the security.

2. Steps to use "Wake on WAN" with "Vigor 2200E-plus"

There are two main steps in this method: "NAT Port Redirection" and "Setting the ARP cache table".  The first step can be set in advance, but the second step should be set each time before use the "Wake on WAN".

Although the setting before each use is inconvenient, some benefits of safety are obtained.  In my personal experience, the use of "Wake on WAN" should not be too much; therefore, this small inconvenience is acceptable.

A. Set the "NAT Port Redirection"

To redirect the external "Wake-Up Packets" to the computer behind the "IP Sharer", the "NAT Port Redirection" must be set.  The using port of the "Wake-Up Packets" sent by the program, wol, in Linux is UDP:40000.
In the example above, the internal computer's IP address is "192.168.10.99" and press [OK] to activate the setting.

The "Vigor 2200E-plus" will redirect the "Wake-Up Packet" received from Internet to the private IP address.  In fact, the private IP address is not assigned to any computer.  This private IP address is only used in next step.

Note: Usually the purpose to turned on a remote computer is to connect and access it.  For example, the SSH is planned to used for connection, the port should also be set.

B. Set the "ARP Cache Table"

Before the received "Wake-Up Packet" to be redirected, the "Vigor 2200E-plus" will query the MAC address according to the IP address.  Of course, no computer will response the query except router.  The redirected "Wake-Up Packet" with non-broadcast MAC address will be ignored by all computers in the private network.

To prevent this situation, the IP-MAC-pair with broadcast MAC address should be added into "ARP Cache Table".  Therefore, any "Wake-Up Packet" received when this pair is existing in the "ARP Cache Table" should be broadcasted to all computer in the private network.

Since the "ARP Cache Table" should be updated frequently.  The IP-MAC pair is removed if there is no packet with same IP-MAC pair has been transmitted in one minute.

Telnet Vigor 2200E-plus to establish a connection with text interface.  The procedure after login successfully is
  . . . . . .

> ip arp status
ip arp status
[ARP Table]
 Index IP Address         MAC Address
   1   192.168.10.10      00-09-73-51-BF-28

> ip arp add 192.168.10.99 ff-ff-ff-ff-ff-ff LAN

> ip arp status
ip arp status
[ARP Table]
 Index IP Address         MAC Address
   1   192.168.10.10      00-09-73-51-BF-28
   2   192.168.10.99      FF-FF-FF-FF-FF-FF

>
In the example above, the "ip arp status" is the command to query the contents of the "ARP Cache Table" and the "ip arp add ....." is the command to add the IP-MAC pair into "ARP Cache Table".

Note:  If the IP-MAC pair is removed according to over one-minute latency without sending the "Wake-Up Packet".  The "ip arp add ...." should command again.

C. Send the "Wake-UP Packet" of WoL

Send the "Wake-UP Packet" of "Wake on Lan" with following command
[SiB@Celeron-D ~]$ wol 54:05:1B:18:7d:52 -h 11.22.33.44
where the "54:05:1B:18:7d:52" is the MAC address of the computer which you want to wake it up and the "11.22.33.44" the IP address of "Vigor 2200E-plus" at the WAN side.

已測試版本:

  • Vigor 2200E-plus
  • Fedora: 14, 17

2012-08-11

Use the Android AVD in another computer

Using a computer for a long time, you may be preferred it or may be accustomed to it.  During developing the Android App, always start the emulator to test the program.  But, if your old computer is not good enough to execute the simulator, buy a new computer for this reason is a bit costly.  Of course, you can use a Android-x86 PC or a physical Android device.  you need to use the Android emulator (AVD), if you are developing an App using the Google API.

Can I use the AVD in another computer to test App? Of course!