wake on lan suse

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

Brabashka
Сообщения: 84

wake on lan suse

Сообщение Brabashka »

Здравствуйте.

Как сделать wake on lan на suse 11.1? Чтобы комп включать.

Спасибо.
Спасибо сказали:
Аватара пользователя
Ленивая Бестолочь
Бывший модератор
Сообщения: 2760
ОС: Debian; gentoo

Re: wake on lan suse

Сообщение Ленивая Бестолочь »

вы что хотите - сюсю включать или с неё включать?
если её включать - то так же, как и всё остальное - заходим в биос, включаем там wake on lan, посылаем ей magic, чтобы включилась.
Солнце садилось в море, а люди с неоконченным высшим образованием выбегали оттуда, думая, что море закипит.
Спасибо сказали:
Аватара пользователя
strah
Сообщения: 283
ОС: Freebsd, linux, Solaris.

Re: wake on lan suse

Сообщение strah »

А если бы ОП воспользовался гуглом, то ответ бы он получил бы гораздо быстрее.
/earth: file system full
Спасибо сказали:
Brabashka
Сообщения: 84

Re: wake on lan suse

Сообщение Brabashka »

ethtool wlan0 дает

Settings for wlan0:
No data available

что делать?
Спасибо сказали:
rootmce
Сообщения: 76
ОС: CentOS

Re: wake on lan suse

Сообщение rootmce »

У вас вирелес? Вы хотите через беспроводную сеть заводить комп?
Спасибо сказали:
Brabashka
Сообщения: 84

Re: wake on lan suse

Сообщение Brabashka »

С проводной что-то тоже не выходит.
Спасибо сказали:
Brabashka
Сообщения: 84

Re: wake on lan suse

Сообщение Brabashka »

включил в bios'е, использовал ethtool -s eth1 wol g, но при выключении компьютера эта настройка через ethtool сбрасывается.
Спасибо сказали:
Brabashka
Сообщения: 84

Re: wake on lan suse

Сообщение Brabashka »

блин, не хочет работать. нашел вот

Код: Выделить всё

Wake on LAN with SuSE Linux 10.0
    With my setup

    * nVidia Corporation CK804 Ethernet Controller (rev a3) on an Asus A8N SLI Premium mainboard
    * SuSE Linux 10.0
    * BIOS' "Poweron on PCI Devices" set to "enabled"

there is a problem to get Wake on LAN running.

The SuSE boot resp. shutdown script for getting up or down the network interfaces /sbin/ifdown calls ip link set dev $INTERFACE down which seems to disable wake on lan feature of the ethernet controller.
To get around this problem I put up and successfully tested the following mechanics:

The SuSE /sbin/ifdown script has implemented the option to define a script which is run after the shutdown of each individual network device. To get executed such a script, the variable POST_DOWN_SCRIPT in the network devices' configuration file /etc/sysconfig/network/ifcfg-eth-* must be set to to the file name of the script to run. An example script is listed below.

Be aware of the fact that not every ethernet hardware or driver supports wake on lan. E.g. the driver for the Marvell Technology Group Ltd. 88E8001 Gigabit Ethernet Controller (which is also installed on the Asus A8N SLI Premium mainboard) has not implemented the wake on lan enable (maybe this has changed with the most recent version of the driver). So make shure by using ethtool that wake on lan is really supported. A call to /usr/sbin/ethtool eth0 (as root) should reveal a line like:

Supports Wake-on: g

Where the shown characters mean:
p     Wake on phy activity
u     Wake on unicast messages
m     Wake on multicast messages
b     Wake on broadcast messages
a     Wake on ARP
g     Wake on MagicPacket(tm)
s     Enable SecureOn(tm) password for MagicPacket(tm)
d     Disable (wake on nothing). This option clears all previous options.

And don't forget to enable "Poweron on PCI Devices" or similar in the Bios setup.

Here comes the example of a /etc/sysconfig/network/ifcfg-eth-id-XX:XX:XX:XX:XX:XX:

BOOTPROTO='static'
BROADCAST=''
IPADDR='192.168.106.203'
MTU=''
NAME='ASUSTeK K8N4-E Mainboard'
NETMASK='255.255.255.0'
NETWORK=''
REMOTE_IPADDR=''
STARTMODE='auto'
UNIQUE='xxxxxxxxx'
USERCONTROL='no'
_nm_name='bus-pci-0000:00:0a.0'
POST_DOWN_SCRIPT=enable-wol


My script which is shown below brings up again the ethernet device and then uses ethtool to enable it's wake on lan feature.

Below my script /etc/sysconfig/network/scripts/enable-wol:

#!/bin/bash
#
# $Revision: 1.3 $, $Date: 2006/08/04 15:29:14 $
#
# Copyright © 2006 Zoologisches Institut und Programm MGU, Uni Basel
#                    Lukas Zimmermann, lukas.zimmermann@unibas.ch.
#                    All rights reserved.
#
######################################################################

# mode of "g" is wake on MagicPacket
WOL_MODE=g

# debugging
#LOG_LEVEL=7

# change the working direcory and source some common files
#
R_INTERNAL=1      # internal error, e.g. no config or missing scripts
cd /etc/sysconfig/network || exit $R_INTERNAL
# config has at least USE_SYSLOG
test -f ./config && . ./config
test -f scripts/functions && . scripts/functions || exit $R_INTERNAL

# check the command line arguments
if [ $# -gt 0 ]; then
  CONFIG=$1
  shift
else
  exit $R_USAGE
fi
if [ $# -gt 0 ]; then
  INTERFACE=$1
  shift
else
  exit $R_USAGE
fi

# set the interface up and running again
debug "`printf "    interface %s is getting put up again." $INTERFACE`"
if ! ip link set up dev $INTERFACE ${LLADDR:+address $LLADDR}; then
  logerror "Cannot enable interface $INTERFACE."
  exit $R_NOTRUNNING
else
  debug "`printf "    interface %s link has successfully been put up again." $INTERFACE`"
fi

# enable the wake on lan feature
debug "`printf "    enable WOL for interface %s." $INTERFACE`"
/usr/sbin/ethtool -s $INTERFACE wol $WOL_MODE

# check whether the enabling was successful
wol_status=$(/usr/sbin/ethtool $INTERFACE | grep Wake-on: | grep -v Supports \
  | sed -n -e 's/^[[:space:]]*Wake-on:[[:space:]]*\([^[:space:]]*\).*$/\1/p')
if [ "$wol_status" == "$WOL_MODE" ]; then
  msg='Successfully set WOL status for interface %s to \"%s\".'
  message "`printf "$msg" $INTERFACE $wol_status`"
else
  logerror "Enabling WOL on interface $INTERFACE did not work."
  msg='    WOL status is \"%s\" but should be \"%s\".'
  debug "`printf "$msg" $wol_status $WOL_MODE`"
fi


Finally you need a program which assembles and sends a MagicPacket to the network where the machine to be waken up listens. Such a program is e.g. Donald Becker's ether-wake. Have a look at his web page on the topic.
Or you could use wol program, which is included in SuSE 10.0 distribution.

More on wake on lan with linux you can find at the Wake on LAN mini HOWTO
    line
linux logo     HOME     Powered by Apache
line
This site maintained by:
lukas.zimmermann@unibas.ch
My public PGP key     last updated: 2006-08-04     Valid CSS! Valid XHTML 1.0 Stricth


не помогает все равно забывает.
Удалил, оставив только #!/bin/bash /sbin/ethtool -s eth0 wol g и, блин, опять забывает.
Кто-нибудь, подскажите, что за проблема у suse?
Спасибо сказали: