[CentOS] ether-wake

Mon May 18 13:57:44 UTC 2020
R C <cjvijf at gmail.com>

thank you,  that was the/an answer I was looking for.


On 5/18/20 7:51 AM, Jonathan Billings wrote:
> On Sun, May 17, 2020 at 07:46:00PM -0600, R C wrote:
>> what port does ether-wake use?  (I believe it is port 9? but not sure).
> The 'ether-wake' command in net-tools doesn't use a port at all.  It's
> just a raw packet of EtherType 0x0842 as the so-called "Magic Packet"
> <https://en.wikipedia.org/wiki/Wake-on-LAN#Magic_packet>
>
> For example, if you were to run:
>
> (assuming interface name 'eth0')
> # tcpdump -i eth0 ether proto 0x0842
>
> You'd see the ether-wake command's packet.  If you strace the process,
> you'll see the socket is created as
> socket(AF_PACKET, SOCK_RAW, htons(0)).
>