Page 18 of 19 FirstFirst ... 816171819 LastLast
Results 171 to 180 of 190

Thread: HOWTO: Set your system up for Wake On LAN (WOL)

  1. #171
    Join Date
    Jan 2008
    Beans
    50

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    Chris, as you pointed out, wakeonlan only supports 1 interface: eth0, and although it's been five years since you posted your solution (otherwise spot on), Ubuntu is still distributing a version of wakeonlan with no ability send MagicPackets to interfaces other than eth0. An equivalent tool, which does support multiple interfaces, is ether-wake, available in the etherwake package in the universe sub-dist.

    This is important since a common use of wake-on-LAN is to access a desktop or other private box from a gateway server from outside a home or office LAN. In my particular case, the WAN IF on our gateway/router got knocked out by lightning a couple of years ago, and the remaining on-board IF, eth1, is connected to our in-house LAN, while the WAN is on a PCI NIC card designated as eth2. In most cases, a gateway server will have multiple interfaces, so it's a toss-up as to which one will be appropriate for sending out wake-on-LAN packets to an internal box.

    Otherwise, thanks for your solution, which was very helpful in getting wake-on-LAN running here.
    Last edited by fmouse; June 28th, 2011 at 01:55 PM.

  2. #172
    Join Date
    Feb 2011
    Beans
    3

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    My squeezeboxserver runs on Ubuntu server 10.04.3, and uses an onboard Via Rhine II, which has some problems. However I've finally found a way to make it WOL from suspend.
    I've made a script to put it in suspend, it works (fast) although it's probably full of crap that either doesn't have to be there, or should be somewhere else.

    Code:
    #!/bin/bash
    PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"
    echo 1 > /sys/class/net/eth0/device/remove
    echo 1 > /sys/class/pci_bus/0000\:00/device/0000\:00\:00.0/rescan
    ethtool -s eth0 wol g
    grep 'PCI0.*enabled' < /proc/acpi/wakeup >/dev/null || \
        echo PCI0  > /proc/acpi/wakeup;
    grep 'LAN0.*enabled' < /proc/acpi/wakeup >/dev/null || \
        echo LAN0  > /proc/acpi/wakeup;
    echo enabled > /sys/devices/pci0000\:00/power/wakeup
    echo enabled > /sys/devices/pci0000\:00/0000\:00\:12.0/power/wakeup
    echo mem > /sys/power/state
    EDIT: I think I'm halfway there, WOL only works for the first 10sec...anyone has any bright ideas?
    Last edited by W0153R; August 20th, 2011 at 07:17 PM. Reason: I'm not done yet..

  3. #173
    Join Date
    Nov 2011
    Beans
    5

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    I need some help with WOL:
    WOL WORKS from S5 if I shutdown thru Windows XP.
    WOL WORKS from S4 if I hibernate thru Ubuntu 11.10 Server.
    WOL DOES NOT WORK from S5 if i shutdown thru Ubuntu.

    My NIC is an integrated Broadcom BCM5752.
    >I have WOL from S5 enabled in bios.
    >WOL is enabled in Windows.
    >I am running the wakeonlanconfig startup script.
    >I have removed the -i option from halt
    >The lights on my NIC are on after shutdown and show activity when I send the MagicPacket.
    Here is my ethtool output:
    Code:
    Settings for eth0:
            Supported ports: [ TP ]
            Supported link modes:   10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            Supports auto-negotiation: Yes
            Advertised link modes:  10baseT/Half 10baseT/Full
                                    100baseT/Half 100baseT/Full
                                    1000baseT/Half 1000baseT/Full
            Advertised pause frame use: Symmetric
            Advertised auto-negotiation: Yes
            Speed: 100Mb/s
            Duplex: Full
            Port: Twisted Pair
            PHYAD: 1
            Transceiver: internal
            Auto-negotiation: on
            MDI-X: Unknown
            Supports Wake-on: g
            Wake-on: g
            Current message level: 0x000000ff (255)
                                   drv probe link timer ifdown ifup rx_err tx_err
            Link detected: yes
    Here is the output for the file /proc/acpi/wakeup
    note: my NIC is device BLAN
    Code:
    Device  S-state   Status   Sysfs node
    SLPB      S4    *enabled
    P32       S4    *disabled  pci:0000:00:1e.0
    UAR1      S4    *disabled  pnp:00:09
    PEX0      S4    *disabled  pci:0000:00:1c.0
    BLAN      S4    *enabled   pci:0000:02:00.0
    PEX1      S4    *disabled
    PEX2      S4    *disabled  pci:0000:00:1c.2
    PEX3      S4    *disabled  pci:0000:00:1c.3
    PEX4      S4    *disabled  pci:0000:00:1c.4
    PEX5      S4    *disabled  pci:0000:00:1c.5
    UHC1      S3    *disabled  pci:0000:00:1d.0
    UHC2      S3    *disabled  pci:0000:00:1d.1
    UHC3      S3    *disabled  pci:0000:00:1d.2
    UHC4      S3    *disabled  pci:0000:00:1d.3
    EHCI      S3    *disabled  pci:0000:00:1d.7
    AC9M      S4    *disabled
    AZAL      S4    *disabled  pci:0000:00:1b.0
    I suspect that the issue is that S4 is listed instead of S5, I have tried manually changing the file to S5 but that didn't work.
    If anyone has some suggestions I'd greatly appreciate it.

  4. #174
    Join Date
    Oct 2011
    Beans
    4

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    Oh boy, I have exactly the same problem as you...

    I'm using Ubuntu Oneiric.

    >I have WOL from S5 enabled in bios.
    >WOL is enabled in Windows.
    >I am running the wakeonlanconfig startup script.
    >I have removed the -i option from halt
    >The lights on my NIC are on after shutdown and show activity when I send the MagicPacket.
    Here is my ethtool output:

    Different driver though... I use a via VT6120/VT6121/VT6122 Gigabit Ethernet Adapter (driver via-velocity).

    Here is the output of lscpi -tv:

    Code:
    -[0000:00]-+-00.0  VIA Technologies, Inc. VX855/VX875 Host Bridge: Host Control
               +-00.1  VIA Technologies, Inc. VX855/VX875 Error Reporting
               +-00.2  VIA Technologies, Inc. VX855/VX875 Host Bus Control
               +-00.3  VIA Technologies, Inc. VX855/VX875 DRAM Bus Control
               +-00.4  VIA Technologies, Inc. VX855/VX875 Power Management Control
               +-00.5  VIA Technologies, Inc. VX855/VX875 APIC and Central Traffic Control
               +-00.6  VIA Technologies, Inc. VX855/VX875 Scratch Registers
               +-00.7  VIA Technologies, Inc. VX855/VX875 North-South Module Interface Control
               +-01.0  VIA Technologies, Inc. VX855/VX875 Chrome 9 HCM Integrated Graphics
               +-0f.0  VIA Technologies, Inc. VX855/VX875 EIDE Controller
               +-10.0  VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
               +-10.1  VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
               +-10.2  VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
               +-10.4  VIA Technologies, Inc. USB 2.0
               +-11.0  VIA Technologies, Inc. VX855/VX875 Bus Control and Power Management
               +-11.7  VIA Technologies, Inc. VX8xx South-North Module Interface Control
               +-13.0-[01]----03.0  VIA Technologies, Inc. VT6120/VT6121/VT6122 Gigabit Ethernet Adapter
               \-14.0  VIA Technologies, Inc. VT8237A/VT8251 HDA Controller
    And acpitool -w

    Code:
       Device	S-state	  Status   Sysfs node
      ---------------------------------------
      1. USB0	  S4	*disabled  pci:0000:00:10.0
      2. USB1	  S4	*disabled  pci:0000:00:10.1
      3. USB2	  S4	*disabled  pci:0000:00:10.2
      4. EHCI	  S4	*disabled  pci:0000:00:10.4
      5. SBRG	  S5	*enabled   pci:0000:00:11.0
      6. P2PB	  S5	*enabled   pci:0000:00:13.0
    To get there, I had to modify the rc.local script as follows:

    Code:
    /sbin/ethtool -s eth0 wol g
    grep 'SBRG.*enabled' < /proc/acpi/wakeup >/dev/null || echo SBRG  > /proc/acpi/wakeup
    grep 'P2PB.*enabled' < /proc/acpi/wakeup >/dev/null || echo P2PB  > /proc/acpi/wakeup
    echo enabled > /sys/class/net/eth0/device/power/wakeup
    echo enabled > /sys/devices/pci0000\:00/0000\:00\:13.0/power/wakeup
    echo enabled > /sys/devices/pci0000\:00/0000\:00\:13.0/0000\:01\:03.0/power/wakeup
    As you can see, I'm sort of enabling everything I can!

    Finally, I've removed network-manager (who is known to create issues) and configuring my interfaces manually through /etc/network/interfaces

    Code:
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
            address 192.168.253.2
            netmask 255.255.255.0
            broadcast 192.168.253.255
            network 192.168.253.0
            gateway 192.168.253.1
            up /sbin/ethtool -s eth0 wol g
            post-up /sbin/ethtool -s eth0 wol g
            post-down /sbin/ethtool -s eth0 wol g
            pre-down false
    The command ethtool eth0 outputs the following:

    Code:
    Settings for eth0:
    	Supported ports: [ TP ]
    	Supported link modes:   10baseT/Half 10baseT/Full 
    	                        100baseT/Half 100baseT/Full 
    	                        1000baseT/Half 1000baseT/Full 
    	Supports auto-negotiation: Yes
    	Advertised link modes:  100baseT/Full 
    	Advertised pause frame use: No
    	Advertised auto-negotiation: Yes
    	Speed: 100Mb/s
    	Duplex: Full
    	Port: Twisted Pair
    	PHYAD: 0
    	Transceiver: internal
    	Auto-negotiation: off
    	MDI-X: Unknown
    	Supports Wake-on: puag
    	Wake-on: g
    	Current message level: 0x00000002 (2)
    			       probe
    	Link detected: yes
    It is to be noted that wol works for Debian Squeeze (kernel 2.6.32). Wol has been broken since Ubuntu 11.04. I have tried Debian testing and Mint without success as well and I fear this may be related to a kernel change...

    I'm completely lost, please help!

    Thanks a lot guys
    Last edited by iditude; December 14th, 2011 at 10:28 AM.

  5. #175
    Join Date
    Jul 2008
    Location
    Ra'anana, Israel
    Beans
    58

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    I'm completely lost, please help!
    If you think that this is a kernel issue, then please file a bug report on the linux package.

    Some thoughts:
    Perhaps a module not loaded?
    Perhaps still some BIOS configuration bad?
    Perhaps router or switch is messing with packets?
    Perhaps you've messed up the MAC address or using the address of the wrong NIC?

    Good luck.

  6. #176
    Join Date
    Feb 2008
    Location
    NB, Canada
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    I was unsuccessful getting WOL to work almost 4 years ago, I try again using the additional info provided in this thread, software updates and gained experience...

    I can now wake up my home server (10.04.3) after shutting it down via the command:
    Code:
    sudo halt -i
    and awakening it using:
    Code:
    wakeonlan 01:23:45:67:89:a0
    There was no need to modify the halt script or create another script to make the 'g' persistent. A shutdown using
    Code:
    shutdown -P now
    or any variant will not work. Only the 'halt' command with the 'i' switch will.
    Awakening will also not work if the ip address is specified (actually it will work for a few minutes only after shutdown).

    This may not be sufficient for those who are trying to wake a hibernating computer or that was shut off manually, but in my case this is perfectly acceptable. Hopefully this can help someone else.
    100% Ubuntu: Laptop (Mint 13), Desktop(11.10), Server(10.04)

  7. #177
    Join Date
    Oct 2011
    Beans
    4

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    Thanks Guys for your help. I've done a bit more digging...

    DawnLight thoughts are good, thoughts are great!

    Here's my original post for reference...

    Quote Originally Posted by iditude View Post
    Oh boy, I have exactly the same problem as you...

    I'm using Ubuntu Oneiric.

    >I have WOL from S5 enabled in bios.
    >WOL is enabled in Windows.
    >I am running the wakeonlanconfig startup script.
    >I have removed the -i option from halt
    >The lights on my NIC are on after shutdown and show activity when I send the MagicPacket.
    Here is my ethtool output:

    Different driver though... I use a via VT6120/VT6121/VT6122 Gigabit Ethernet Adapter (driver via-velocity).

    Here is the output of lscpi -tv:

    Code:
    -[0000:00]-+-00.0  VIA Technologies, Inc. VX855/VX875 Host Bridge: Host Control
               +-00.1  VIA Technologies, Inc. VX855/VX875 Error Reporting
               +-00.2  VIA Technologies, Inc. VX855/VX875 Host Bus Control
               +-00.3  VIA Technologies, Inc. VX855/VX875 DRAM Bus Control
               +-00.4  VIA Technologies, Inc. VX855/VX875 Power Management Control
               +-00.5  VIA Technologies, Inc. VX855/VX875 APIC and Central Traffic Control
               +-00.6  VIA Technologies, Inc. VX855/VX875 Scratch Registers
               +-00.7  VIA Technologies, Inc. VX855/VX875 North-South Module Interface Control
               +-01.0  VIA Technologies, Inc. VX855/VX875 Chrome 9 HCM Integrated Graphics
               +-0f.0  VIA Technologies, Inc. VX855/VX875 EIDE Controller
               +-10.0  VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
               +-10.1  VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
               +-10.2  VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller
               +-10.4  VIA Technologies, Inc. USB 2.0
               +-11.0  VIA Technologies, Inc. VX855/VX875 Bus Control and Power Management
               +-11.7  VIA Technologies, Inc. VX8xx South-North Module Interface Control
               +-13.0-[01]----03.0  VIA Technologies, Inc. VT6120/VT6121/VT6122 Gigabit Ethernet Adapter
               \-14.0  VIA Technologies, Inc. VT8237A/VT8251 HDA Controller
    And acpitool -w

    Code:
       Device	S-state	  Status   Sysfs node
      ---------------------------------------
      1. USB0	  S4	*disabled  pci:0000:00:10.0
      2. USB1	  S4	*disabled  pci:0000:00:10.1
      3. USB2	  S4	*disabled  pci:0000:00:10.2
      4. EHCI	  S4	*disabled  pci:0000:00:10.4
      5. SBRG	  S5	*enabled   pci:0000:00:11.0
      6. P2PB	  S5	*enabled   pci:0000:00:13.0
    To get there, I had to modify the rc.local script as follows:

    Code:
    /sbin/ethtool -s eth0 wol g
    grep 'SBRG.*enabled' < /proc/acpi/wakeup >/dev/null || echo SBRG  > /proc/acpi/wakeup
    grep 'P2PB.*enabled' < /proc/acpi/wakeup >/dev/null || echo P2PB  > /proc/acpi/wakeup
    echo enabled > /sys/class/net/eth0/device/power/wakeup
    echo enabled > /sys/devices/pci0000\:00/0000\:00\:13.0/power/wakeup
    echo enabled > /sys/devices/pci0000\:00/0000\:00\:13.0/0000\:01\:03.0/power/wakeup
    As you can see, I'm sort of enabling everything I can!

    Finally, I've removed network-manager (who is known to create issues) and configuring my interfaces manually through /etc/network/interfaces

    Code:
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eth0
    iface eth0 inet static
            address 192.168.253.2
            netmask 255.255.255.0
            broadcast 192.168.253.255
            network 192.168.253.0
            gateway 192.168.253.1
            up /sbin/ethtool -s eth0 wol g
            post-up /sbin/ethtool -s eth0 wol g
            post-down /sbin/ethtool -s eth0 wol g
            pre-down false
    The command ethtool eth0 outputs the following:

    Code:
    Settings for eth0:
    	Supported ports: [ TP ]
    	Supported link modes:   10baseT/Half 10baseT/Full 
    	                        100baseT/Half 100baseT/Full 
    	                        1000baseT/Half 1000baseT/Full 
    	Supports auto-negotiation: Yes
    	Advertised link modes:  100baseT/Full 
    	Advertised pause frame use: No
    	Advertised auto-negotiation: Yes
    	Speed: 100Mb/s
    	Duplex: Full
    	Port: Twisted Pair
    	PHYAD: 0
    	Transceiver: internal
    	Auto-negotiation: off
    	MDI-X: Unknown
    	Supports Wake-on: puag
    	Wake-on: g
    	Current message level: 0x00000002 (2)
    			       probe
    	Link detected: yes
    It is to be noted that wol works for Debian Squeeze (kernel 2.6.32). Wol has been broken since Ubuntu 11.04. I have tried Debian testing and Mint without success as well and I fear this may be related to a kernel change...

    I'm completely lost, please help!

    Thanks a lot guys
    Now I have downloaded Debian Squeeze again and installed it on my system (so same hardware is used: linux machine, computer sending wol, network hardware)

    I've successfully managed to setup wol following exactly what's written above. I have to add that debian was still a bit tricky so I modified the /etc/init.d/networking script so it never shuts down my network interface. Here is the modification:

    Original:

    Code:
            log_action_begin_msg "Deconfiguring network interfaces"
            if [ "$VERBOSE" != no ]; then
                if ifdown -a --exclude=lo; then
                    log_action_end_msg $?
                else
                    log_action_end_msg $?
                fi
            else
    New version:
    Code:
            log_action_begin_msg "Deconfiguring network interfaces"
            if [ "$VERBOSE" != no ]; then
                if ifdown -a --exclude=lo --exclude=eth0; then
                    log_action_end_msg $?
                else
                    log_action_end_msg $?
                fi
            else
    I've played around with Ubuntu 11.10 again but it seems that it keeps doing something to the network interface before shutting down. I've even removed the networking script from /etc/rc0.d/ without success.

    Now it seems that this has changed recently. Apparently there are new scripts involved (/etc/init.d/network-interface and /etc/init.d/network-interface-security). No idea what they do...

    now to answer your questions


    Perhaps a module not loaded?

    -> I checked all loaded modules between the working debian 6 and the non-working ubuntu 11.10, they are the same

    Perhaps still some BIOS configuration bad?

    -> I checked everything for the sake of it, but given the fact that I can wol with debian, I believe the Bios is setup correctly

    Perhaps router or switch is messing with packets?

    -> Again using the exact same hardware in both configurations, so I don't think so...

    Perhaps you've messed up the MAC address or using the address of the wrong NIC?

    -> Checked also, no problem there...

    Any ideas or leads greatly appreciated! Thanks a lot guys

  8. #178
    Join Date
    Aug 2009
    Beans
    65

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    Is there a way to change the port on wake on lan?? cause my isp blocks ports 1-10.

  9. #179
    Join Date
    Aug 2005
    Beans
    7

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    Sounds like you want to do this over the internet. See post #113 July 12th, 2009 by dmizer. Its not a good idea.

    An alternative, I do option #1...
    1. Have an old laptop running some low ram version of debian (remember - its an old otherwise useless laptop). Have an ssh port open on my router to the old laptop. Use some other port beside the default one for added security. Have a simple script to send a magic packet. SSH to your box, call the script.
    2. Some routers will send a WOL on your lan. Linksys wrt54g older versions for example, flashed with dd-wrt. Access the router and have it send the magic packet.

  10. #180
    Join Date
    Aug 2009
    Beans
    65

    Re: HOWTO: Set your system up for Wake On LAN (WOL)

    it describes tls encyption? does that mean it needs password authentication?
    and also if there is a way to change the wake on lan port how do you do it using ethtool?

Page 18 of 19 FirstFirst ... 816171819 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •