Client Software
You need to use software to send WoL magic packets. You will find various tools for all modern oses, including MS-Windows, Apple OS X, Linux, and many smart phones.Linux Install etherwake Under Debian / Ubuntu Linux
etherwake command can be used to send a Wake-On-LAN "Magic Packet" under Linux operating systems. Type the following command to install the same under Debian / Ubuntu Linux desktop:$ sudo aptitude install etherwake
Sample outputs:
[sudo] password for vivek:Note: Red Hat Linux and friends user should use net-tools package which is installed by default.
The following NEW packages will be installed:
etherwake wakeonlan{a}
0 packages upgraded, 2 newly installed, 0 to remove and 11 not upgraded.
Need to get 20.9 kB of archives. After unpacking 98.3 kB will be used.
Do you want to continue? [Y/n/?] y
Get:1 http://mirror.anl.gov/debian/ squeeze/main etherwake amd64 1.09-3 [9,564 B]
Get:2 http://mirror.anl.gov/debian/ squeeze/main wakeonlan all 0.41-10 [11.4 kB]
Fetched 20.9 kB in 2s (10.3 kB/s)
Selecting previously deselected package etherwake.
(Reading database ... 195338 files and directories currently installed.)
Unpacking etherwake (from .../etherwake_1.09-3_amd64.deb) ...
Selecting previously deselected package wakeonlan.
Unpacking wakeonlan (from .../wakeonlan_0.41-10_all.deb) ...
Processing triggers for man-db ...
Setting up etherwake (1.09-3) ...
Setting up wakeonlan (0.41-10) ...
How Do I Send WOL Magic Packets Under Linux?
Type the following command:# wakeonlan MAC-Address-Here
OR
# etherwake MAC-Address-Here
# etherwake -D MAC-Address-Here
RHEL / Centos / Fedora Linux user, try:
# ether-wake MAC-Address-Here
If your MAC address were xx:yy:zz:11:22:33, you would type:
# wakeonlan xx:yy:zz:11:22:33
OR
# etherwake xx:yy:zz:11:22:33
Where,
- xx:yy:zz:11:22:33 is remote servers mac address. You can obtained mac address using combination of ping and arp command - 'ping -c 4 server3 && arp -n'.
How Do I Verify That Remote Linux Server Supports Wake-on-LAN (WOL)?
First, reboot the remote server and go to BIOS > Power Management > "Wake On LAN". Turn it on. Next, save and close the bios. After activating Wake On LAN in hardware (BIOS) it is also necessary to activate it using ethtool. The ethtool will configure eth0 to respond to the magic packet:# ethtool -s eth0 wol g
Where,
- -s eth0 : Your NIC. Feel free to replace eth0 with your actual network interface device name.
- wol g : Sets Wake-on-LAN options using MagicPacket.
# ethtool eth0
Sample outputs:
Settings for eth0:If you are using RHEL / SL / Fedora / CentOS Linux, edit /etc/sysconfig/network-scripts/ifcfg-eth0:
Supported ports: [ ]
Supported link modes:
Supports auto-negotiation: No
Advertised link modes: Not reported
Advertised auto-negotiation: No
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 1
Transceiver: internal
Auto-negotiation: off
Supports Wake-on: g
Wake-on: g
Link detected: yes
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
Add / modify the following line:
OR
ETHTOOL_OPTS="wol g"
Save and close the file. If you are using Debian / Ubuntu Linux, edit /etc/network/interfaces:
ETHTOOL_OPTS="wol g autoneg off speed 100 duplex full "
# vi /etc/network/interfaces
Append the following to eth0:
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
post-up /sbin/ethtool -s eth0 wol g
post-down /sbin/ethtool -s eth0 wol g
No comments:
Post a Comment