Skip to content

Commit 70eccaf

Browse files
committed
FEAT: add post wake on lan
1 parent fc00fa3 commit 70eccaf

File tree

1 file changed

+134
-0
lines changed
  • content/posts/2024-04-10-wake-on-lan

1 file changed

+134
-0
lines changed
Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
---
2+
title: "Config Wake on LAN"
3+
date: 2024-04-10T12:11:03+08:00
4+
# weight: 1
5+
# aliases: ["/first"]
6+
tags: ["System", "Network"]
7+
author: "Square Zhong"
8+
# author: ["Me", "You"] # multiple authors
9+
showToc: true
10+
TocOpen: false
11+
draft: false
12+
hidemeta: false
13+
comments: false
14+
description: "Wake your computer remotely."
15+
canonicalURL: "https://canonical.url/to/page"
16+
disableHLJS: true # to disable highlightjs
17+
disableShare: false
18+
disableHLJS: false
19+
hideSummary: false
20+
searchHidden: false
21+
ShowReadingTime: true
22+
ShowBreadCrumbs: true
23+
ShowPostNavLinks: true
24+
ShowWordCount: true
25+
ShowRssButtonInSectionTermList: true
26+
UseHugoToc: true
27+
cover:
28+
image: "<image path/url>" # image path/url
29+
alt: "<alt text>" # alt text
30+
caption: "<text>" # display caption under cover
31+
relative: false # when using page bundles set this to true
32+
hidden: true # only hide on current single page
33+
editPost:
34+
URL: "https://github.com/squarezhong.github.io/content"
35+
Text: "Suggest Changes" # edit text
36+
appendFilePath: true # to append file path to Edit link
37+
---
38+
39+
## Introduction
40+
41+
> [Debian Wiki]
42+
>
43+
>
44+
> Wake On LAN (WOL) enables other systems on your local area network (LAN) to turn on your system over the network. Support for WOL is required in your network card, motherboard, UEFI/BIOS boot firmware and operating system network configuration.
45+
>
46+
47+
## Enable WOL
48+
49+
### BIOS
50+
51+
**Normal**: Enable “Wake on LAN” in the BIOS.
52+
53+
**HASEE**: Enable “Network Stack” in the BIOS. It may be set in different place in different bios.
54+
55+
### Windows
56+
57+
By default nothing is needed to do.
58+
59+
If you changed some networking settings, you can use following steps:
60+
61+
[Ethernet Properties][Configure][Power Management] → check [Allow this device to wake the computer]
62+
63+
### Linux
64+
65+
Check the state of wol:
66+
67+
1. first use `ifcong` to find your ethernet device: e.g. “enp8s0f1” is the name of ethernet device of my laptop
68+
2. check wake-on-lan status:
69+
`sudo ethtool enp8s0f1 | grep Wake-on`
70+
3. You may see the following content:
71+
72+
```bash
73+
Supports Wake-on: pumbg
74+
Wake-on: d
75+
```
76+
77+
if “Wake-on” is “g”, that means you have already turned on wol.
78+
79+
4. enable the **wol**: modify the global interface config file /etc/network/interfaces
80+
81+
remember change `enp8s0f1` to your device name
82+
83+
```bash
84+
$ sudo vim /etc/network/interfaces
85+
86+
# add following content
87+
auto enp8s0f1
88+
iface enp8s0f1 inet dhcp
89+
ethernet-wol g
90+
```
91+
92+
93+
WOL modes explanation:
94+
95+
refer to [ethtool manual](https://man7.org/linux/man-pages/man8/ethtool.8.html)
96+
97+
```
98+
wol p|u|m|b|a|g|s|f|d...
99+
Sets Wake-on-LAN options. Not all devices support
100+
this. The argument to this option is a string of
101+
characters specifying which options to enable.
102+
p Wake on PHY activity
103+
u Wake on unicast messages
104+
m Wake on multicast messages
105+
b Wake on broadcast messages
106+
a Wake on ARP
107+
g Wake on MagicPacket™
108+
s Enable SecureOn™ password for MagicPacket™
109+
f Wake on filter(s)
110+
d Disable (wake on nothing). This option
111+
clears all previous options.
112+
113+
```
114+
115+
### Reference
116+
117+
[WakeOnLan - Debian Wiki](https://wiki.debian.org/WakeOnLan#Checking_WOL)
118+
119+
## Use WOL to wake computer
120+
121+
### By command line
122+
123+
Wake other computers.
124+
125+
```python
126+
$ sudo apt install wakeonlan
127+
$ wakeonlan <mac address>
128+
```
129+
130+
In macOS you can use `brew install wakeonlan` to install it.
131+
132+
### Phone App
133+
134+
Many app can use the WOL feature. With some apps and ddns on your router, you can also use WOL feature in a larger local network, such as campus network.

0 commit comments

Comments
 (0)