I explained how to set ‘magic packets’ to wake-on-lan (WoL) enabled ethernet adapters and motherboards to switch on the PC or server. If then # start backup /usr /local /bin /rsnapshot "$1" # push everything offsite to aws-s3 buckets and exit this session due to slow upload links echo '/home/backups/push-mirror-to-aws-s3' | /usr /bin /at now + 5 minuteĮlse echo "Usage: $0 " exit 1 fi Summing up # Sleep for 30 seconds to that laptop comes online /bin / sleep 30 # Verify and start backup /sbin / ping -q -c 30 192.168.2.25 >/dev /null # Try to wake up sleeping laptop at night and odd time as per cronjob /usr /bin /wakeonlan 48:2a:e3:5c: 16:bc home /backups /.keychain /backup-ssh-key #!/bin/bash # load ssh keys from keychain # vi /etc/sysconfig/network-scripts/ifcfg-eth0 If you are using RHEL / SL / Fedora / CentOS Linux, edit /etc/sysconfig/network-scripts/ifcfg-eth0: Output from my NAS server: Settings for eth0: Type the following command to see current status of wol for eth0: wol g : Sets Wake-on-LAN options using MagicPacket.Feel free to replace eth0 with your actual network interface device name. The ethtool command will configure eth0 to respond to the magic packet: After activating Wake On LAN (WoL) in your BIOS hardware option for the network interface card, it is also necessary to activate it using ethtool. # IP address: 255.255.255.255 (the limited broadcast address )į0:1f:af:1f:2c: 60 How Do I Verify That Remote Linux Server Supports Wake-on-LAN (WOL)?įirst, reboot the remote server and go to BIOS > Power Management > “Wake On LAN”. # the last two are optional, in which case the following defaults # Hardware address, IP address, destination port # - other lines are considered valid records and can have 3 columns: # - comment lines are ignored (lines starting with a hash mark '#' ) Let us display it using the more command or cat command/ less command: The following is an example of a text file containing hardware addresses (macs). We can use a file as source of hardware and IP addresses: Here is how to use the limited broadcast address (255.255.255.255): ![]() You can obtained mac address using combination of the ping command and arp command:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |