Wake on LAN

Few days ago I had to go from work to home just to turn on my desktop computer. Now when I have possibility to remote login to my router I tried to get Wake-On-LAN working.

My desktop PC has 3 network cards:

I installed “ethtool” and started to checking which card support WOL. First tested was 3Com one:

root@home:~# ethtool eth0
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 24
        Transceiver: internal
        Auto-negotiation: on
        Current message level: 0x00000001 (1)
        Link detected: no

As you see — no WOL here.. So I build “tulip” module and checked SMC card:

root@home:~# ethtool eth1
Settings for eth1:
No data available

It’s so old card that I was not suprised that it does not support WOL. Next step was rebooting machine, enable onboard LAN and enabling two other options in BIOS:

Wake on Onboard LAN
Wake on PCI card

Started Linux and started ethtool:

root@home:~# ethtool eth2
Settings for eth2:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: d
        Current message level: 0x00000001 (1)
        Link detected: yes

And that card support WOL :) So I retired 3Com card and now VIA-Rhine is my default NIC. I added one line to /etc/init.d/hrw-misc:

ethtool -s eth0 wol pumbg

to get WOL turned on on each reboot.

On router I installed “wol” package and created one line script “/sbin/wake-home”:

wol -i 192.168.1.255 xx:yy:zz:aa:bb:cc

where “xx:yy:zz:aa:bb:cc” is MAC address of desktop NIC.

Thanks goes to Jimmy for his entry in blog.

my computers network