The WOL (Wake On LAN) feature allows the administrator to remotely power up all sleeping machines so that they can receive updates. WOL sends coded network packets, called magic packets, to systems equipped and enabled to respond to these packets. WOL is based on the principle that when the PC shuts down, the NIC still receives power, and keeps listening on the network for the magic packet to arrive. This magic packet can be sent over connectionless protocols (generally UDP).
Wake on LAN packets do not traverse routers/Layer3 switches so you need to configure your network to do this. There are some security implications you need to be aware of first.
Here is an example where we have Wake On LAN controller PC on the IP address 192.168.2.10 in VLAN 20. The PCs we want to switch on are in the VLAN 10 subnet. We need to configure our core switch with the below configuration so that to allow the controller PC to send a request to the subnet to wake up the PC.
Access-list 101 permit udp host 192.168.2.10 any eq 7!
ip forward-protocol udp 7
Interface vlan 20
ip helper-address 192.168.2.255
Interface vlan 10
ip directed-broadcast 101
Note – IP directed broadcasts are used in the common Smurf denial of service attack, and can also be used in such attacks.