[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

¡Esta es una revisión vieja del documento!


Wake-on-LAN

Wake-on-LAN (o WOL) es un estándar por el cual una máquina se puede encender de forma remota a través de una conexión de red. Esto se hace enviando un llamado magic packet a la tarjeta de red de la máquina remota. Cuando se configura correctamente, la máquina remota arrancará.

La mayoría de las computadoras de escritorio recientes admiten esto, pero es probable que esté desactivada de forma predeterminada. En máquinas muy antiguas, es posible que deba instalar un cable especial desde la tarjeta de red a la placa base.

Configure the BIOS

The Wake-on-LAN option must be enabled in the BIOS. Unfortunately these settings are not standardized. Check the motherboard documentation. Browse the BIOS menu. The option may not be called Wake-on-LAN, but something like 'Power On By PCI Device'. This varies greatly from board to board and some experimentation may be needed.

Configure the network card

Assuming the first network port is connected, use ethtool to check the card settings:

# ethtool eth0 | grep -i wake-on
    Supports Wake-on: pg
	Wake-on: d

The supports line shows all options that are supported on the card. The option to look for is g, which means wake on magic packet. If the g option is not present, you are out of luck.

The Wake-on line shows the current options in use. If this shows d, it means wake-on is currently disabled.

To enable wake-on, use

# ethtool -s eth0 wol g

This will most likely not survive a reboot, so to switch this option on again at the next boot, add the command to /etc/rc.d/rc.local:

rc.local
echo "Setting Wake-on-LAN to Enabled"
/usr/sbin/ethtool -s eth0 wol g 

Finally, we need to note the MAC address of the network card we just prepared:

# ip addr show eth0 | grep -i ether 
    link/ether 20:cf:30:1f:e3:a4 brd ff:ff:ff:ff:ff:ff

Waking up the machine

Now we need a special command on a different machine to send a magic packet. The wol command is available from slackbuilds.org. This can be called by a regular user. At a minimum it needs the MAC address of the remote machine; for example:

$ wol 20:cf:30:1f:e3:a4

On a multihomed host, like a router, use the host option to specify the hostname or ip address of the remote host. This will broadcast the magic packet on the correct subnet:

$ wol -i hostname 20:cf:30:1f:e3:a4

Sources

 es:howtos:network_services:wol ()