LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-16-2012, 02:00 PM   #1
Sopalajo de Arrierez
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Rep: Reputation: 0
Wake on LAN using no special programs (handmade)?


Hello, Friends:
I am trying to build a Wake on LAN packet "manually", this is: whithout any tool intended for that. Or, at least, using the most simple method possible.
Purpose: sometimes I am managing a computer or a device (router, for example) with Linux inside, but with few chances to install my preferred programs, and I wanna wake up another computer on the same LAN. So, as the Magic Packet is has an easy syntax, I am wondering using something simpler, something like:

Code:
echo [MagicPacketForSpecificMAC] | /dev/eth0
or similar.
I have checked the Wake on LAN's Magic Packet specifications (Wikipedia):

Quote:
«The magic packet is a broadcast frame containing anywhere within its payload 6 bytes of all 255 (FF FF FF FF FF FF in hexadecimal), followed by sixteen repetitions of the target computer's 48-bit MAC address, for a total of 102 bytes.»
Assuming 11.22:33:44:55:66 is the destination MAC, what would be the best (the most standard, using program/s found in most Linux distributions, or at least at BusyBox) and more compatible (portable through platforms, maybe even Android) way to do this?

Thanks you all.
 
Old 06-16-2012, 02:24 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,001

Rep: Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629Reputation: 3629
It can't get any easier that the magic packet example you have for wol.

http://linux.die.net/man/8/ether-wake

http://linux.die.net/man/1/wol

Might have to make a static arp for that mac address in some cases if you want to use ip addresses.


Many examples on the web for similar tasks. http://www.unix.com/shell-programmin...an-script.html
 
Old 06-16-2012, 05:46 PM   #3
Sopalajo de Arrierez
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: 0
And without special programs?

Quote:
Originally Posted by jefro View Post
It can't get any easier that the magic packet example you have for wol.

http://linux.die.net/man/8/ether-wake

http://linux.die.net/man/1/wol
Yes, but "ether-wake" and "wol" are two special programs designed for this job. I wonder if this could be done using usual shell commands.
There are many cases for not using special programs: maybe you are inside a router where you can not upload files nor install programs, or you are logged in a Linux shell with very few privileges, or working with any small Linux embedded device. So you have no possibilities to install "wol", but you can use more standard commands.

Quote:
Originally Posted by jefro View Post
Many examples on the web for similar tasks. http://www.unix.com/shell-programmin...an-script.html
The example you are refering to in this thread is in Python. Same case as before: the Linux machine could easily have no Python installed.
 
Old 06-17-2012, 07:49 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,749

Rep: Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928Reputation: 5928
busybox does have ether-wake but your device may not have it built in. http://www.busybox.net/BusyBox.html

AFAIK there are no simple bash commands to send data over ethernet required for wake on lan.

Last edited by michaelk; 06-17-2012 at 07:52 PM.
 
Old 06-23-2012, 09:10 AM   #5
Sopalajo de Arrierez
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Original Poster
Rep: Reputation: 0
Hope it will be enough.

Quote:
Originally Posted by michaelk View Post
busybox does have ether-wake but your device may not have it built in. http://www.busybox.net/BusyBox.html

AFAIK there are no simple bash commands to send data over ethernet required for wake on lan.
Well, at least BusyBox is able to be installed in many linux devices.
Thanks for answering.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I wake up a server in "standby" or "memory" mode using wake-on-lan? songweijia Linux - Server 2 03-03-2010 06:51 PM
Wake on Lan & Sleep on lan? ufmale Linux - Networking 1 06-25-2008 05:34 PM
wake on lan magic packet does not wake. albean Linux - Networking 1 06-30-2007 03:57 PM
wake on lan ampena Debian 3 11-16-2005 06:21 AM
wake-on-lan PlatinumRik Linux - Hardware 1 04-09-2003 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration