chore: improved knowledge about wake on lan

This commit is contained in:
Michele Cereda
2023-10-15 13:34:25 +02:00
parent 1efbc8f34e
commit e93eccf548
3 changed files with 13 additions and 5 deletions

View File

@@ -49,6 +49,9 @@ tcpdump -r 'path/to/capture.file'
# Isolate TCP flags.
tcpdump 'tcp[tcpflags] == tcp-fin'
# Capture and show Wake-on-Lan magic packets.
sudo tcpdump -nXxei any ether proto 0x0842 or udp port 9
```
## Sources

View File

@@ -12,6 +12,11 @@ The host needs to support wake-on-LAN and have it enabled.
See [`wakeonlan`][wakeonlan] or [`wol`][wol].
```sh
# Check the magic packet arrives on the target machine.
sudo tcpdump -nXxei any ether proto 0x0842 or udp port 9
```
## Further readings
- [`wakeonlan`][wakeonlan]

View File

@@ -12,15 +12,15 @@
# Install `wakeonlan`.
brew install 'wakeonlan'
# Send a WOL package to the host.
# Broadcast a WOL package.
wakeonlan '11:22:33:44:55:66'
# Simulate.
# Simulate the broadcast.
wakeonlan -n '11:22:33:44:55:66'
# Limit the magic package to a specific network or host.
# Use a network's *broadcast* address unless you have a static ARP table
# configured so the magic packet can actually reach the single host.
# Limit the magic package to specific networks or hosts.
# Use network *broadcast* addresses to ensure the magic packets can actually
# reach the target host; avoid this by having a static ARP table configured.
wakeonlan -i '192.168.1.255' '11:22:33:44:55:66'
wakeonlan -n '11:22:33:44:55:66' -i '192.168.100.3'
```