怎么填写wake on lan 设置gui中的ip address or fqdn?

网络唤醒全攻略(Wake On Lan)
家里组了台服务器存放资料,或者作为开发服务器,远程登陆成为刚性需求,由于机器需要的时候才用到,所以如果经常开机的话很费电,按需开机是最佳办法;网上教程很多,但是比较杂乱,表达累赘;还是自己总结一篇简单好用的;
主板支持,现在的主板基本都支持,所以基本不用担心,很旧的主板好像是2000年左右的,还是需要插网卡(PCI2.1标准)需要3针WOL线连接主板; 关机时候为主板通电(600mA以上电流),把电源切断是不行的,网卡带电才可以; 非正常关机可能会唤醒失败,所以里如果断电导致关机的话可能需要手工开启机器; 被唤醒的电脑必须连接网络,或者,并且有一台手机或者电脑可以发送唤醒包;
首先现在唤醒客户端
PC端可以使用(Aquila Technolgy)
https://wol.aquilatech.com/ 安卓端(极致工具箱-网络唤醒
http://sj.qq.com/myapp/detail.htm?apkName=com.easyapps.txtoolbox
https://play.google.com/store/apps/details?id=com.easyapps.txtoolbox 苹果(RemoteBoot WOL)
https://itunes.apple.com/CN/app/id?mt=8
客户端参数设置
以安卓为例子,极致工具箱安装好后打开网络唤醒,按+添加参数;
- Name:填写一个别名就可以,例如:HomePC
- Mac Address:填写电脑网卡MAC地址(注意是主板上有线网卡),这个要填写正确,如何获得? 进入命令行运行:ipconfig /all,然后查看对应的物理地址即可,共6组2字节十六进制字符;
- Broadcast IP/Hostname/FQDN
- Broadcast IP/Hostname 是电脑所在的局域网的广播地址:如果你的电脑分配到192.168.1.100则填写192.168.1.255,将唤醒包广播到1网段下面所有电脑,Hostname:则是你电脑的主机名.
- FQDN:是广域网唤醒,例如你的手机在公网(4g上网),不在局域网,则需要填写路由器的DDNS域名,如:homepc.router.net
- Port 端口默认是9,这里默认就可以
被唤醒电脑设置
B打开唤醒设置
在BIOS电源相关选项寻找Resume By LAN,Enable Wake ON LAN 类似选项开启 网卡设置
知道对应的网卡,打开可唤醒选项:
防火墙设置
添加入站规则,允许端口9通过:
作用域选&公用&
IP地址选所有
路由器设置
静态IP(局域网唤醒)
建议设置静态的IP地址,那内网的话你要唤醒的电脑就固定IP了,否则的话每次都不一样,以我的华硕AC68U路由器为例:
外围端口映射(广域网唤醒,如果你没有广域网唤醒需求可以跳过)
端口映射的意思是在公网的时候将数据包通过域名(路由器通过DDNS和域名绑定)发送到路由器IP,路由器会将相应的包转发到指定IP的电脑上。
ARP绑定(广域网唤醒,如果你没有广域网唤醒需求可以跳过)
假如你的路由有ARP绑定功能,直接设置就可以了,
我的路由器没有ARP绑定,是可以刷梅林固件,支持开机脚本配置,所以设置脚本就可以了:新建一个脚本arp_b85m.sh,名字自己定义,放入命令:
arp -s 192.168.2.200 XX:XX:XX:XX:XX:XX
现在要被唤醒的PC上安装Aquila Technolgy WOL
https://wol.aquilatech.com/
打开封包监控诊断:
- 局域网唤醒
确保同一局域网并且能互通(WiFi或者有线网络)
- 广域网唤醒
断开WiFi,连接数据网络
如图能看到数据包的表示唤醒包能发到网卡
正常关掉电脑,进行唤醒测试,一般情况下都能成功
网络唤醒的关键之处
- 硬件支持并打开相应的设置
- 网卡设置可接受唤醒数据包
- MAC地址和静态IP
- 如果广域网的端口转发和ARP绑定很重要分享此应用,方式:
Wake On Lan的描述
Easily wake up computers from your phone/tablet!* For this app to work, you need to make sure that your computer and network is set up for and supports Wake On Lan / WOL *Automation------------------------------Automate waking up your computers by sending an intent broadcast from apps such as Llama and Tasker! In the latest version there is now support for Tasker plugins to make it even easier to automatically wake devices.Instructions on how to do this are available in the latest version of the app under the help section.Quick Feature List------------------------------* Groups* Network Search (Find devices on your network and add them to your list. No more finding out MAC addresses etc!)* One touch wakeup widget for both devices and groups (A widget with online status is coming soon)* Tasker plugin* Intent Broadcast support (See instructions inside app help section for details on this)* CSV Import/Export - So you can share your list of devices easily!* Material Design (Taking suggestions on this!)* Auto-Refreshing Device Online Status (Using both ports and ping)* Supports Wake On Lan(WoL) and Wake On Wan(WoW)
* SecureOnFor WoW, just set the broadcast address to be the remote IP address of the device. This may require some extra setup on the remote network to make sure that the wakeup packets actually arrive on the remote device.If you're trying to wake up a device that is connected via WiFi it may not work, there's not many WiFi cards that support the WOL standard. WOL works best via an ethernet connection. Some devices such as laptops may not support WOL very well or at all. Some might only work when they are in sleep mode, and others might allow you to turn it on when it is powered off.Permission Details---------------------------------Photos/Media/Files/USB Storage - This is used for reading/writing CSV files to your internal storage so that you can copy your list of devices to other devices easily.Network/WiFi - This is so that the app can actually send the magic packets to wake up your devices. It is also used in the network search screen and for pinging devices to see if they are online.Supported Languages---------------------------------EnglishItalian - Davide SalvatoreVietnamese - Altra NineDutch - Ackuna websiteRussian - Павел МонаховGerman - sendyourmessageto & ngdeinhardt (Don't know their real names)Spanish - Martín Sánchez Rastrilla, ?lvaro Sillero Sánchez and others!
French - Raphael & 3 other people!
Japanese - Tag & Toeshoe1
Portuguese (Brazil) - Danilo & Cássio
Slovak - jurajovCzech
KoreanIf you want to help translate Wake On Lan into your language please visit: http://translate.mr-webb.co.ukIf your language isn't on the website, please email me and I'll add it!If you have any suggestions for Wake On Lan, please drop me an email and I'll see what I can do!&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&&/br&
Wake On Lan的用户评分
标记Wake On Lan
下载与Wake On Lan类似的应用
Android 4.0.1+ (Ice Cream Sandwich)
android.permission.ACCESS_WIFI_STATE
android.permission.CHANGE_WIFI_STATE
android.permission.INTERNET
android.permission.WRITE_EXTERNAL_STORAGE
com.android.launcher.permission.INSTALL_SHORTCUT
下载Wake On Lan APK
我们使用cookie来为您提供功能丰富的应用商店!浏览此网站则表示您接受,单击可了解更多信息。远程开机软件(Wake On Lan) v2.11.18 官方中文版
Wake On Lan是一款很好用的远程开机软件,只要你的电脑支持WOL功能(目前大多数电脑都支持),就可以通过使用该软件实现远程开机的功能,支持局域网以及互联网,此外,还支持远程关机、ping、远程桌面、网络扫描、网络数据监听等功能。
Wake On Lan主要功能
1、唤醒已关闭的远程计算机
2、关闭远程计算机
3、ping所选的远程计算机,显示它的状态
4、一次执行所有定义的计算机的紧急关闭
5、通过远程桌面连接到远程服务器
6、监听WOL数据包(帮助排除故障)
7、安排定时远程开机、关机
8、支持命令行和GUI图形操作界面
Wake On Lan使用方法
1、验证您要控制的主机是否支持WOL。
2、使用控制面板,配置网络接口卡并启用&Wake on Magic Packet&。
3、开始WOL程序。默认情况下,它从开始 - & Aquila Technology - & WakeOnLAN访问。
4、将主机添加到WOL程序。点击文件&- &新建主机。
5、填写有关主机的一些基本信息:
Name 名称:这是您用来描述主机的名称。它可以是你想要的任何东西。
MAC Address MAC地址:必须是启用WOL的网卡的MAC。
IP Address&IP地址:如果使用静态寻址,请在此输入IP地址。如果您使用DHCP,请将此字段留空。
Broadcast&广播:这是WOL将发送数据包的有向子网广播地址。对于大多数网络,默认值为255.255.255.255是合适的。使用&计算&​​按钮打开一个帮助窗口。有关详细信息,请参阅&计算子网&下面的内容。
Host URI&主机URI:这是主机的Windows Netbios名称,或主机的FQDN。
Group&组:这是将主机放入的选项组,例如:&服务器&。
Emergency shutdown&紧急关机:如果选中此框,则当您单击&紧急关闭&按钮时,该主机将关闭。
Shutdown command line&关机命令行:Windows主机可以直接关机,但其他操作系统(如Linux)需要您在此处输入命令以关闭它们。我通常使用putty命令来做到这一点。将此字段留空以使用Netbios关闭Windows主机。
IPv4 Interface&IPv4接口:该字段选择使用哪个接口发送WOL数据包。例如,您的计算机可能具有多个接口,例如有线和无线,并且一些WOL数据包需要一个或多个外出。
UDP Port&UDP端口:这通常设置为端口9,但是当您需要将路由器穿越到其他子网时,您可以覆盖它。
TTL&TTL:此字段可以覆盖广播数据包的TTL或生存时间。几乎在所有情况下,默认128是令人满意的。
Delete&删除:使用删除按钮从数据库中删除此主机。
6、按ok保存更改。
远程开机软件(Wake On Lan) v2.11.18 官方中文版
高速下载器通道
其他下载地址
下载不了?|wakeonlan 0.2.2
A small python module for wake on lan.
Latest Version:
A small python module for wake on lan. It has been tested both locally and
externally using Python 2.7.3 and Python 3.2.3.
The project is hosted on . For more information on the wake on lan
protocol please take a look at .
To wake up a computer using wake on lan it must first be enabled in the BIOS
settings. Please note the computer you are trying to power on does not have an
ip address, but it does have a mac address. The package needs to be sent as a
broadcast package.
As a python module
Import the module
&&& from wakeonlan import wol
Wake up a single computer by its mac address
&&& wol.send_magic_packet('ff.ff.ff.ff.ff.ff')
Wake up multiple computers by their mac addresses.
&&& wol.send_magic_packet('ff.ff.ff.ff.ff.ff', '00-00-00-00-00-00',
'FFFFFFFFFFFF')
An external host may be specified. Do note that port forwarding on that host
is required. The default ip address is 255.255.255.255 and the default port
&&& wol.send_magic_packet('ff.ff.ff.ff.ff.ff',
ip_address='example.com',
port=1337)
As a standalone script
usage: wol [-h] [-i ip] [-p port] mac addresses [mac addresses ...]
Wake one or more computers using the wake on lan protocol
positional arguments:
mac addresses
The mac addresses or of the computers you are trying to wake.
optional arguments:
-h, --help
show this help message and exit
The ip address of the host to send the magic packet to.
(default 255.255.255.255)
The port of the host to send the magic packet to (default 9)
Dependencies
Python2.x or Python3.x
Py Version
Uploaded on
Remco Haszing
Home Page:
Package Index Owner:
remcohaszing
Copyright (C) ,之前我的一篇文章介绍过如何设置远程唤醒电脑,着重于使用,这篇主要从原理方面解析一下当中的奥妙;
将唤醒魔术包发送的被唤醒机器的网卡上,魔术包指AMD公司开发的唤醒数据包,具有远程唤醒的网卡都支持这个标准,用16进制表示如下:
6对“FF”前缀+16次重复MAC地址,举个例子假如我的网卡MAC地址是:AA:BB:CC:DD:EE:FF:11
那么魔术包就是:
0xFFFFFFFFFFAABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11AABBCCDDEEFF11
但是传送的时候必须封包成二进制格式才可以传送,简单来说,我们抽2个区段分析:
FFFFFFFFFFF 转成: 11 11
AABBCCDDEEFF11 转成:?00 11 ?
那么封包后就是把每个字节连接在一起:
11 111 00 11 ?
……..00 11 ?(第16次)
关键代码(Java):
private String Wake(String name, String host, String mac, int port) {
byte[] macBytes = getMacBytes(mac);//转成字节类型
byte[] bytes = new byte[6 + 16 * macBytes.length];
for (int i = 0; i & 6; i++) {
bytes[i] = (byte) 0
for (int i = 6; i & bytes. i += macBytes.length) {
System.arraycopy(macBytes, 0, bytes, i, macBytes.length); //放入16个MAC地址
InetAddress address = InetAddress.getByName(host);
DatagramPacket packet = new DatagramPacket(bytes, bytes.length, address, port);
DatagramSocket socket = new DatagramSocket();
socket.send(packet);
socket.close();
return "wol_package_sent_success";
} catch (Exception e) {
return "wol_package_sent_fail";
private static byte[] getMacBytes(String mac) throws IllegalArgumentException {
byte[] bytes = new byte[6];
String[] hex = mac.split("(\\:|\\-)");
if (hex.length != 6) {
throw new IllegalArgumentException("Invalid MAC address.");
for (int i = 0; i & 6; i++) {
bytes[i] = (byte) Integer.parseInt(hex[i], 16);
} catch (NumberFormatException e) {
throw new IllegalArgumentException("Invalid hex digit in MAC address.");
数据包流向示意图
魔术包通过手机或者电脑发送;
数据包经过路由器广播到每台机器;
被唤醒的电脑收到魔术包并且匹配成功,执行唤醒;
经过试验发现,如果电脑是待机状态,可以通过主机名或者具体IP如:192.168.1.200唤醒,如果是关机了则没有办法,我想应该是待机时候路由器分配给这个电脑的IP地址没有消失;
魔术包通过路由器的域名:mypc.router.net 发送到路由器;
路由器收到数据,通过端口转发到相应的IP地址,192.168.1.100和端口9,告诉这台机器可以唤醒,ARP绑定必须存在,这个是因为很多无法远程唤醒的关键所在;看过另一种处理就是转发地址改成192.168.1.255 子网广播地址,端口不变也是9,好像就不用ARP绑定,这种方法理论上行得通,我这边暂时就不试验,试过的同学可以告诉我;
被唤醒的电脑收到魔术包并且匹配成功,执行唤醒;
可以看到局域网和公网唤醒存在差别:
局域网被唤醒的IP地址是广播地址:192.168.1.255,路由器收到后通过广播,数据包一定可以发送192.168.1.100这台机器;
公网唤醒我们无办法填写具体的内网地址,只能配置路由器的公网IP,然后通过数据转发到具体的电脑IP地址,由于不是广播地址,也由于路由器ARP映射表在电脑关机后一定时间会丢失,所以路由器没有办法知道192.168.1.100是MAC所对应那台机器,所以魔术包被丢弃,所以要么增加ARP绑定,要么添加端口转发规则到广播地址,困扰多年无法远程唤醒的问题解决。
阅读(...) 评论()

我要回帖

更多关于 wake on lan 的文章

 

随机推荐