[CentOS] ether-wake

Mon May 18 13:51:35 UTC 2020
Jonathan Billings <billings at negate.org>

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)).

-- 
Jonathan Billings <billings at negate.org>