7

I would like to setup the wake-on-lan, the two PCs are connected through a switch.

Here is the configuration of the eth0, in the BIOS I couldn't find any information regarding the wake-on-lan.

Supported ports: [ TP MII ]
    Supported link modes:   10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Supported pause frame use: No
    Supports auto-negotiation: Yes
    Advertised link modes:  10baseT/Half 10baseT/Full 
                            100baseT/Half 100baseT/Full 
                            1000baseT/Half 1000baseT/Full 
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Link partner advertised link modes:  10baseT/Half 10baseT/Full 
                                         100baseT/Half 100baseT/Full 
                                         1000baseT/Full 
    Link partner advertised pause frame use: Symmetric
    Link partner advertised auto-negotiation: Yes
    Speed: 1000Mb/s
    Duplex: Full
    Port: MII
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: pumbg
    Wake-on: g
    Current message level: 0x00000033 (51)
                   drv probe ifdown ifup
    Link detected: yes

After I shut down the PC, I used different tools to send out the magic package, but nothing happens. Any suggestion?

rosch
  • 8,198
Mokus
  • 4,592

2 Answers2

12

Your card is supported, now to configure wake-on-lan:

  1. Install ethtool

    sudo apt-get install ethtool
    
  2. Edit /etc/rc.local to add this line before the exit 0 line:

    ethtool -s eth0 wol g
    
  3. Find out the MAC address of your network card (replace eth if with your interface name, eth0, eth1, ..):

    ifconfig eth | grep "HWaddr" | awk '{print $5}'
    
  4. Shutdown the machine. You should be able to wake it up using:

    wakeonlan your_mac
    
Seth
  • 59,442
  • 44
  • 149
  • 201
rosch
  • 8,198
  • I tried this, and I'm receiving the following address. Sending magic packet to 255.255.255.255:9 with 4c:02:89:00:xx:xx send : Network is unreachable at /usr/bin/wakeonlan line 126.. But I'm connected to the network through a switch, I also can ping the UPS network card. What can be the problem? – Mokus Nov 02 '12 at 10:30
  • try this one: wakeonlan -i 192.168.0.255 mac. Where you might have to replace 192.168 to reflect your network. – rosch Nov 02 '12 at 14:08
  • Also make sure your network card really is in standby mode: there should be a green or yellow LED light. – rosch Nov 02 '12 at 14:19
  • Did you succeed? – rosch Nov 06 '12 at 22:50
  • I can't test now, because the PC is not in the office – Mokus Nov 07 '12 at 10:37
  • Note that step 2 is probably useless here - in the ethtool output, the Wake-on entry is already on g. I didn't have to execute this step. – Calimo May 08 '15 at 17:50
  • Also, step 0, enable PCI wakeup in the BIOS of the motherboard. This is usually disabled by default. – Calimo May 08 '15 at 17:51
  • According to Ubuntu Help Docs, they rec placing the line "up ethtool -s eth0 wol g" at the bottom of your /network/interface eth0 configuration line. https://help.ubuntu.com/community/WakeOnLan , but like others mine was already on by default. I still added it tho! Don't think it will hurt. – FreeSoftwareServers Aug 24 '16 at 13:43
1

You need to install ethtool by typing with root privilage:

apt-get install ethtool

Next step is to enable wake on lan in your system by typing:

ethtool -s eth0 wol g

I describe such scenario and few optional next step on my blog

Takkat
  • 144,810
Lukasz
  • 11