Dr.Dan
Dr.Dan

Reputation: 21

Can wake on lan funciton work by the device itself

There's a device with WOL function and it's enabled in Linux. In order to test the functionality of WOL

  1. I can wake it up by another computer (wakeonlan -i device_ip device_mac)

    where can I find the log or message about WOL success after this sent command

  2. if I do the command on the device itself when its power state is ON, can I get any successful message?

Upvotes: 0

Views: 33

Answers (2)

MortenVinding
MortenVinding

Reputation: 11

Wake-on-Lan is "fire and forget" so there is noting to log.

Wikipedia has a pretty good explanation about how WoL works, particularly this seens relevant:

"Since the magic packet is only scanned for the string above, and not actually parsed by a full protocol stack, it could be sent as payload of any network- and transport-layer protocol, although it is typically sent as a UDP datagram to port 0 (reserved port number),[6] 7 (Echo Protocol) or 9 (Discard Protocol),[7] or directly over Ethernet using EtherType 0x0842.[8] A connection-oriented transport-layer protocol like TCP is less suited for this task as it requires establishing an active connection before sending user data."

It really is that simple: a simple "magic" packet containing the MAC address will wake up the computer if it parses by it's interface. IP is irrelevant other than to make the network route the packet to the right recipient, so usually it is just set to the broadcast address.

Less know fact: you can wake up remote computers by forwarding any UDP port (usually port 9) on the remote router to the network broadcast address.

Upvotes: 0

Infected
Infected

Reputation: 21

You could use a network analyzer tool like WireShark to see the magic packet sent from another device if that's what you mean.

Upvotes: 1

Related Questions