<- Back
Comments (33)
- drob518Wow, that brings back memories. In 1995, I sat right next to one of the guys who invented what we called “Magic Packet” inside AMD and what became known as Wake On LAN. I was working on what later became WiFi. Those were fun times; lots of innovation in the networking space. We worked with HP and Microsoft on this since it needed OS support from Windows, too. Yea, it’s not sophisticated at all since the hardware needed to decode it before generating an interrupt and passing anything to the driver. It just needed to be something statistically unlikely to occur in a real network to avoid false positives. And it needs to be unique per NIC, because you don’t want a single packet waking up every machine. So, it just repeats the MAC address a few times. The original use case was for doing things like network backups late at night. The file server needed a way to wake up a machine that had gone to sleep. Almost everything in the computer can be asleep excelpt for the NIC and whatever power-on circuitry is necessary to power everything back up and resume. In other words, it can be a deep sleep.
- FwirtNot wanting to install an OS package to do something as simple as sending some bytes a couple years back, I wrote a shell script to send WoL packets. Its only dependencies are netcat and bash so if you have busybox it should run almost anywhere. It just takes the mac address and interface as an argument and sends a WoL packet on that interface #!/bin/bash hex="\xFF\xFF\xFF\xFF\xFF\xFF" mac_hex="\\x`printf "$1" | sed 's/:/\\\\x/g'`" wol_string="$hex" for i in {1..16} do wol_string+="$mac_hex" done printf "$wol_string" | nc -u -b -w 1 "$2" 9 It took me a while to find an explanation of something so simple, I can't figure out why everyone relies on huge binary packages and libraries to do it. I just needed something on my router so that I could wake my machines from outside the house. I ended up just writing a couple shell scripts that called it and triggering them with nginx via FastCGI so I could click on a link to wake up my machines.
- ysleepyI was kinda hoping to get the nitty gritty of how the NIC does the packet matching, how, it wakes up the system via PCIe and how switches route the frames to the port which has/had the client.Nothing against the article though, but maybe someone knows a good writeup.
- lights0123> The computer that you are trying to wake up also needs to be connect with an ethernet cable as it is not possible to send a magic packet over wifi.While WiFi adapters may not support waking up the computer from a WiFi signal, you absolutely can send magic packets over WiFi as they're normally just UDP broadcast frames. Convenient for waking up a desktop from a laptop!
- anonundefined
- anonundefined
- dang[stub for offtopicness]