- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
- Automatically mount an NVMe EBS volume in an EC2 Linux instance using fstab - Mon, Feb 21 2022
Wake-on-LAN (WOL) is a magic technology that allows you to "wake up" remote computers that are powered off. The problem with magic is that many things can go wrong if you are only a sorcerer's apprentice. I guess even Harry Potter wouldn't always succeed with firing magic packets through his magic wand at sleeping calculation monsters.
Just in case you missed the first semester in Hogwarts, a magic packet is an OSI layer 2 broadcast frame (usually Ethernet) with a payload containing 6 bytes of 255 followed by sixteen repetitions of the target computer's MAC address. If the motherboard, BIOS, and NIC support WOL (as is usually the case with newer machines) and have been configured properly, the computer will power up whenever it receives a magic packet. That is the theory, anyway. In practice, many PCs are somewhat resistant to magic. Experienced admins know that it only works with the right spell, but you had better ask Hermione about it because I don't know how to spell it.
Another option is to use to the SolarWinds free Wake-on-LAN tool, which allows you to automatically send up to 10 retries per packet to shake awake sleepy-headed PCs. You can also configure inter-packet delay, which can be useful for remote computers (multiple hops). Note that Wake-on-LAN across routers is reserved for wizard masters and only works if the involved routers are configured accordingly (Subnet Directed Broadcasts, VLAN) or if you have a VPN connection to the remote network.
The SolarWinds Wake-on-LAN utility needs both the MAC address of the target PC and the IP address, even though the IP protocol is not required for WOL within the LAN. If the magic packet was accepted by the target, the sender won't receive a response. However, the Wake-on-LAN tool will inform you if your magic was successful, which is the case if the corresponding IP address shows signs of life.
To make sure that your magic worked, you can use the command powercfg /lastwake (Vista and Windows 7) on the target machine to identify the wake source. The Wake-on-LAN event is also logged in the System event log.