IT/Software/Command Line Applications/wakeonlan: Difference between revisions

From msgwiki
Jump to navigation Jump to search
Access restrictions were established for this page. If you see this message, you have no access to this page.
 
(5 intermediate revisions by the same user not shown)
Line 11: Line 11:
*You can login to the main server, wake up all the desktops and they update.
*You can login to the main server, wake up all the desktops and they update.


===Background===
*Find out who is on the lan.
<code>sudo arp-scan 192.168.2.0/24   </code>


==Configuration==
==Configuration==
Line 17: Line 22:
*Making it "persistent" is the tricky bit.
*Making it "persistent" is the tricky bit.
*Install some tools
*Install some tools
**test


<code>sudo apt install net-tools ethtool</code>
<code>sudo apt install net-tools ethtool</code>


**net-tools brings ifconfig and arp which allows a LAN scan for MAC addresses
*net-tools brings ifconfig and arp which allows a LAN scan for MAC addresses


See what is enabled.
See what is enabled.
Line 26: Line 32:
<code>sudo ethtool interfaceName</code>
<code>sudo ethtool interfaceName</code>


**for example sudo ethtool enp3s0
*for example sudo ethtool enp3s0
**look for Wake-on and see what is supported and enabled.  
**look for Wake-on and see what is supported and enabled.
***we want "g"
**we want "g"
*Look what is persistent
*Look what is persistent


<code>nmcli c show jademonkeyWired | grep 802-3-ethernet.wake-on-lan</code>
<code>nmcli c show jademonkeyWired | grep 802-3-ethernet.wake-on-lan</code>


**You will get an output like this
*You will get an output like this


802-3-ethernet.wake-on-lan:            magic
802-3-ethernet.wake-on-lan:            magic
Line 39: Line 45:
802-3-ethernet.wake-on-lan-password:    --
802-3-ethernet.wake-on-lan-password:    --


**We want "magic" not "default"
*We want "magic" not "default"
*If not "magic" then modify it by
*If not "magic" then modify it by


<code>nmcli c modify jademonkeyWired 802-3-ethernet.wake-on-lan magic
<code>sudo nmcli c modify jademonkeyWired 802-3-ethernet.wake-on-lan magic
</code>
</code>


Another thing you may need to do is
Another thing you may need to do is:


<br />
<code>sudo ethtool -s enp1s0 wol g</code>
<code>sudo ethtool -s enp1s0 wol g</code>


*This does not seem to be as persistent.
*This does not seem to be as persistent.

Latest revision as of 08:20, 4 December 2020

General

You need to allow this in the BIOS first.

Then the computers need to be kept attached to the network and power.

Having them on a UPS is good.

Basic Usage

  • Say you are working at home.
  • You want to turn on and update all the computers
  • You can login to the main server, wake up all the desktops and they update.

Background

  • Find out who is on the lan.

sudo arp-scan 192.168.2.0/24   

Configuration

  • There are countless tutorials on how to do this.
  • Making it "persistent" is the tricky bit.
  • Install some tools
    • test

sudo apt install net-tools ethtool

  • net-tools brings ifconfig and arp which allows a LAN scan for MAC addresses

See what is enabled.

sudo ethtool interfaceName

  • for example sudo ethtool enp3s0
    • look for Wake-on and see what is supported and enabled.
    • we want "g"
  • Look what is persistent

nmcli c show jademonkeyWired | grep 802-3-ethernet.wake-on-lan

  • You will get an output like this

802-3-ethernet.wake-on-lan: magic

802-3-ethernet.wake-on-lan-password: --

  • We want "magic" not "default"
  • If not "magic" then modify it by

sudo nmcli c modify jademonkeyWired 802-3-ethernet.wake-on-lan magic

Another thing you may need to do is:

sudo ethtool -s enp1s0 wol g

  • This does not seem to be as persistent.