Wakeonlan cli tool2/21/2023 ![]() ![]() Send WOL from Mikrotik router: ] > tool wol mac=00:21:00:00:00:00 interface=lan-bridge If you have some strict firewall rules for outgoing traffic, makes sure these allow broadcast to leave: # iptables -A OUTPUT -p udp -d 255.255.255.255 -j ACCEPT Wakeonlan uses UDP packets and takes NIC MAC address as an argument: $ wakeonlan 00:21:00:00:00:00 We will send a magic packet (from the server “A”) by using the wakeonlan utility. It’s necessary to have the pm-utils package installed. ![]() Server can be sent to sleep via the pm-suspend command. MAC can be retrieved from /sys/class: # cat /sys/class/net/eth0/address We now have to find the MAC address of the NIC as it will be required to wake up the backup server. To make this procedure automated and avoid typing the same command again after the server is restarted, we need to open the network config file /etc/network/interfaces for editing and add the following line (in brown) to our existing network configuration: auto eth0Įnsure that WOL is enabled: # ethtool eth0 | grep Wake-on Let us set the option on a network driver to respond to magic packets: # ethtool -s eth0 wol g So, we can wake our server up by using a so-called magic packet. S Enable SecureOn™ password for MagicPacket™ĭ Disable (wake on nothing). TheĪrgument to this option is a string of characters specifying Supported link modes: 10baseT/Half 10baseT/FullĪdvertised link modes: 10baseT/Half 10baseT/FullĪs we may see above, Ethernet card supports Wake-on: g. We already have WOL enabled on BIOS, and need to check for the type of WOL our Ethernet card supports: # ethtool eth0 We will be configuring WOL on a Debian server. Update packages list and install ethtool: # apt-get update & apt-get install ethtool Configure WOL This can be done by using wake on LAN messages. It would be sensible to have the server sleeping and wake up only when needed to transfer backups. So, the backup server doesn’t need to be online 24/7, but on-demand instead. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |