Koozali.org: home of the SME Server

Wake On Lan

Bob

Wake On Lan
« on: October 23, 2002, 11:50:36 AM »
Does anbody know how to send a WOL command from SME server to a PC connected to the LAN

Thanks.

Christian NGUYEN

Re: Wake On Lan
« Reply #1 on: October 23, 2002, 12:21:18 PM »
I read your mail and here follow the link :
http://www.depicus.com/wake-on-lan/wake-on-lan-cmd.asp
There is a freeware to do this! :)
Best regards!

Bob

Re: Wake On Lan
« Reply #2 on: October 23, 2002, 02:07:03 PM »
Christian NGUYEN wrote:
>
> I read your mail and here follow the link :
> http://www.depicus.com/wake-on-lan/wake-on-lan-cmd.asp
> There is a freeware to do this! :)
> Best regards!

Thanks for your response but isn't that page only related to windows?
I have it running from windows PC's fine.
I would like to PUTTY into the server and run it to wake up other pc's on the LAN.

Thanks again.

Ray Mitchell

Re: Wake On Lan
« Reply #3 on: October 23, 2002, 04:15:41 PM »
Dear Bob

Would this work ? Just thinking out load. I have not tried this but I will later on.

If your workstation NIC & motherboard supports Wake on LAN and you configure your windows workstation to respond,
then logon via VPN to your sme server and either
ping the workstation IP
or
run net use X: \workstation IP\workstationsharedrivename
from the remote PC
This should create network activity which should (?) turn on the workstation.

Anybody have an opinion whether this will work,

Regards
Ray Mitchell

Bob

Re: Wake On Lan
« Reply #4 on: October 23, 2002, 04:34:54 PM »
Thanks for the reply Ray,
But WOL works off the mac address of the NIC.
The NIC doesn't eally have an IP while the PC is off.
I have an exe file for windows which all you need to do is write a tiny batch file for.
basically it goes like this.

D:\WOL
WOL 00:b0:d0:d2:5f:c0

'WOL'   being the exe file
'D:\WOL'  where the actual file is.
'00:b0:d0:d2:5f:c0' being the mac address of the NIC.
This works great from a windows PC and canbe used to wake up PC's on the LAN.
If anybody would like this I am happy to email it to you.
It's a whole 6kb

Thanks,

Bill Talcott

Re: Wake On Lan
« Reply #5 on: October 23, 2002, 06:17:30 PM »
A quick Google search turned up http://www.scyld.com/expert/wake-on-lan.html which looks like it would work. I don't have any WOL PC's here to test with though... I do have a separate SME setup for compiling though, so I could do that tomorrow if you need it.

Charlie Brady

Re: Wake On Lan
« Reply #6 on: October 23, 2002, 07:18:33 PM »
Bill Talcott wrote:

> A quick Google search turned up
> http://www.scyld.com/expert/wake-on-lan.html which looks like
> it would work.

And another found me:

http://gsd.di.uminho.pt/jpo/software/wakeonlan/\
mini-howto/wol-mini-howto-3.html

which contained a reference to the scyld.com document, plus a bunch of others, including this neat perl script written by a buddy of mine (hi Ken!):

http://www.han.de/~gero/netboot/archive/msg02524.html

Charlie

Ian Wells

Re: Wake On Lan
« Reply #7 on: October 24, 2002, 03:57:39 AM »
I can recommend tether-wake from http://www.scyld.com/expert/wake-on-lan.html
as I have been using it for some time now.

I compiled it on a RedHat box, and it makes a tiny binary.

I use it to wake up a Windows machine every morning to backup my SME server using a variant of the desktop backup.

# Everyday at 5am wakeup WinXP
0 5 * * * /usr/bin/ether-wake AA:BB:CC:DD:EE:FF

Bob

Re: Wake On Lan
« Reply #8 on: October 24, 2002, 04:30:50 PM »
Thanks for your replies I'll try acouple of the sites and let you know how I go.

Thanks again.

Bob

Re: Wake On Lan
« Reply #9 on: October 24, 2002, 05:18:01 PM »
Ian,

Thanks this worked perfectly.

http://www.scyld.com/expert/wake-on-lan.html

Regards,

Bob.

Larry

Re: Wake On Lan
« Reply #10 on: December 16, 2002, 11:52:45 AM »
Hi guys,

I am not fortunate enough to have a second machine running RedHat and for security reasons, I don't want to install on my sme 55 the devlopment tools.

My question is then: Does anybody have a binary file or better a integration with e-smith/server-manager?

Thanks in advance.
Larry

Larry

Re: Wake On Lan
« Reply #11 on: December 16, 2002, 11:52:45 AM »
Hi guys,

I am not fortunate enough to have a second machine running RedHat and for security reasons, I don't want to install on my sme 55 the devlopment tools.

My question is then: Does anybody have a binary file or better a integration with e-smith/server-manager?

Thanks in advance.
Larry

Ian Wells

Re: Wake On Lan
« Reply #12 on: December 16, 2002, 12:54:48 PM »
I quickly put my executable on my web-site

http://www.wellsi.com/sme/wol/wol.html

it worked on SME 5.12 and SME 5.6b7 so hopefully works on all versions.

the page also has a link to http://www.scyld.com/expert/wake-on-lan.html

which has the source and far more information.


I am sure that others would be able to prepare a better package, but hopefully this gets you started.

Ian

eric

Re: Wake On Lan
« Reply #13 on: December 17, 2002, 07:23:28 PM »
COuld you explain me how can i use ether-wake.gz

thanks for help !

Eric

Ian Wells

Re: Wake On Lan
« Reply #14 on: December 17, 2002, 07:48:51 PM »
Firstly I would recommend building the ether-wake binary from source to ensure that you know what you are using.

If you use ether-wake.gz that I compiled you need to decompress the file.
# gzip -d ether-wake.gz

This will give you the binary called ether-wake

You can read how to use it here: http://www.scyld.com/expert/wake-on-lan.html

Basically, if you have another machine on your LAN for which you know the MAC address, eg AA:BB:CC:DD:EE:FF then you can wake it up.

# ether-wake AA:BB:CC:DD:EE:FF

This presumes that you have set that machine for WOL Wakeup-On-LAN, often you need to connect a cabel between your NIC and the Mainboard.

I run this as a cron job to wake up my other PC for overnight backups and virus scanning.

eric

Re: Wake On Lan
« Reply #15 on: December 18, 2002, 11:22:10 AM »
fisrt thx for your response !

when i try to decompress the file I have this message:

[root@adele files]# gzip -d ether-wake.gz
gzip: ether-wake.gz: not in gzip format

thx for you help

Eric

Bob

Re: Wake On Lan
« Reply #16 on: December 18, 2002, 11:25:43 AM »
Here is how I did it.

WOL how-to

login as root

first download the Scyld Wake-up program:

type from the hash prompt.

#wget ftp://ftp.scyld.com/pub/diag/ether-wake.c

once downloaded you must use the 'compile-command' at the end of file by typing the following:

#pico ether-wake.c

go to the end of the file and type:

compile-command

now use ctrl-X to exit when asked to save changes answer yes.

If you don't yet now the mac address of your windows PC go to a command prompt and type in:

IPCONFIG / ALL

You should see your MAC address of your card XX:XX:XX:XX:XX:XX

this will now work just by typing:

ether-wake XX:XX:XX:XX:XX:XX (being the mac address)

To make it easier you can write a shell script for each machine name to execute the command.

type the following to make the script file:

pico machine_name.sh (machine_name being your personal preference for the name the file will be called) now type:

ether-wake XX:XX:XX:XX:XX:XX (being the mac address)


now use ctrl-X to exit when asked to save changes answer yes.

now you need to set execute permissions on the file by typing the following:

chmod 755 file_name.sh

Type:

#./file_name.sh

Your PC should now boot.

Ian Wells

Re: Wake On Lan
« Reply #17 on: December 18, 2002, 11:28:29 PM »
Eric,  If you get

bash-2.05a$ gzip -d ether-wake.gz
gzip: ether-wake.gz: not in gzip format

then your web-browser may have decompressed the file for you.

try ls -l and you should get something very like
-rwxrw----    1 wellsi   shared      19270 Dec 18 20:20 ether-wake.gz

in which case just rename the file.

I didn't know that this happened

I have checked that downloaded file is identical to the uploaded file, and that it works (on my machine)

Of course - if you have got another RedHat box with gcc then I recommend building from source, as Bob demonstrated.

eric

Re: Wake On Lan
« Reply #18 on: January 10, 2003, 01:32:50 PM »
Hello Bob it's me again ;-))

I have follow your How to but after this point:

ether-wake XX:XX:XX:XX:XX:XX (being the mac address)


E-smith say me :

bash: ether-wake : command not found ....

all files are in a ibays....


do you_ now where is the probleme ??

thanks for you help again and happy new year !!

Eric

Bob

Re: Wake On Lan
« Reply #19 on: January 12, 2003, 01:40:27 PM »
Hi Eric,
Happy new year to you too.

I have put the files in the root of my e-smith, purely because when you log in you don’t have to navigate to any other directories.
Try going to your ibays where the file is located and execute it from there.
Hope this helps.

Regards,

Bob.