据我自己的测试和一些文档了解,WOL已经不仅仅是AMD的Magic Packet了,还有更多的网络唤醒包格式被发展起来,只是AMD的MP是最早也是被支持最广泛的WOL包种类。
因为研究WOL,找到了一篇很好的文档,涉及WOL的机理,常见的操作系统设置(主要是XP和2K),以及各种网络唤醒工具(这个还是比较有用的,因为我要找一个好用类Unix系统的WOL软件)
在开始文档之前,先说说我的座机是如何实现的。因为机器上的网卡是集成的,所以不存在连唤醒线之类的步骤。而且据资料说,PCI 2.2的架构应该也不用再用唤醒线,因为PCI插槽本身被提供微电流至网卡。虽然是集成网卡,但是在架构上应该还属于PCI总线的部件,所以我要在 CMOS里设置RESUME PCI EVENT为ENABLE才可以。这一点我不是十分确定,因为也有文档说,只有当使用外插的PCI网卡时才需要此项,但是我的CMOS除了这个,却没有普 通机器里所以的RESUME ON LAN之类的明确网络唤醒选项。这样设置完毕之后,就可以在关机状态下唤醒了。额外的,我还在XP的网卡高级属性里设置了只有MP类型的包可以唤醒,排除 了其他几种包。经过二次测试,证明的确不需要在网卡的电源管理里设置允许脱离脱机状态。主要是受从前DOS唤醒下的设置程序的影响,那些程序是可以直接设 置网卡内的一些配置,而WIN系列的应该只是设置在该操作系统下的行为。下面是我找到的关于WOL的极有参考价值的文档。
Wake On LAN (WOL) / Remote Wake Up (RWU) & the Magic Packet
Background
The illusive Magic Packet! What is it? The Magic Packet is a packet containing, among other things, the hardware (or MAC) address of a specific network card repeated 16 times. NICs that are WOLable & active (see below), upon receiving the Magic Packet, will send a power-on signal to the motherboard, activating the power supply and booting the system! Pretty damn cool!
This is often considered a security hazard in many circles; a system can't be hacked if it's turned off. So if a hacker can first power on the system.... For this reason, while most NICs are WOLable, many are not active out-of-the-box. Obviously the first thing you need to do is verify your NIC is WOLable. Check your documentation or the manufacturer's website. Then check the system BIOS; make sure the BIOS can handle it and that it is turned on.
For most systems, that's all you need to do. When working with Windows 2000, however, you may not be finished. Here at Towson we work mainly with Dell OptiPlex systems, which come with 3Com Etherlink cards, typically on-board. Systems with the 3Com 3C920 Fast Etherlink (3C905-TX Compatible) cards running Windows 2000 have to have a specific 3Com driver installed and the NIC configured to specifically enable Magic Packet RWU. (There are other types of WOL packets (Ping Wake-Up, ARP Wake-Up, Link State Change Wake-Up); the Magic Packet seems to be the most common.) For more information on this, check out Dell Knowledge Base
Document TT1041772and Microsoft Support Article 257277
The two articles mentioned above should include additional technical information that involves the Windows registry. The key in question is
HKLM\System\CurrentControlSet\Control\Class\{GUID}\0000.
The GUID value is the class for the Network Adapters; in the case of most every Windows 2000 system I've looked here, the GUID is {4D36E972-E325-11CE-BFC1-08002BE10318}. The trailing value (0000) has also always been "0000" for the primary Local Area Connection network adapter. I'll discuss the importance of the registry key in the next two paragraphs.
The above Dell article discusses an additional step that is required for systems with the 3Com 3C920 NIC (such as the OptiPlex GX110 & GX150) - you have to install a 3Com driver (instead of what ships with Win2k) along with the diagnostics utility. I haven't fully tested this, but I don't think you actually have to install the diagnostics utility. All it appears to do (again, untested!) when configuring the Remote Wake Up settings is set four registry values in the above mentioned registry key:
- RWUARP = "ENABLE"
- RWULink = "DISABLE"
- RWUMagic = "ENABLE"
- RWUPING = "DISABLE"
The above Microsoft article discusses adding a line to the INF of the network adapter driver before installation. This involves greater knowledge of INF files than I posess, so I gathered enough knowledge to piece together a reghack. (A MSDN article on INF AddReg Directive was of great help.) Basically, instead of going into the Properties of the network adapter driver, Power Management tab, and clicking "Allow this device to bring the computer out of standby" (which sets the following value to 0x20), simply set/create the DWORD value PnPCapabilities in the above mentioned registry key (HKLM\System\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318}\0000) to 0x120 (decimal 288). This "allows the device to bring the computer out of standby" specifically via the Magic Packet.
For the OptiPlex GX260, which uses an integrated Intel PRO/1000 MT adapter, this is even easier, since WOL is already enabled on the NIC. Just enable the BIOS, set the PnPCapabilities registry value to 0x120, and you're ready to WOL.
Utilities
Now, the question in everybody's mind is: how do I send the Magic Packet?? There are many ways, and here are links to some that I've found.
Links good as of 8Nov2002.
- AMD PCnet Magic Packet Utility This Windows application comes from AMD, the father of the Magic Packet. It a simple interface and a few nice features (like group announcements and scheduling).
- Magic Packet Perl script There isn't really a title associated with this one; it's a Perl script written by Marc Heuse, which I found on a couple of hacker and security websites.
- Depicus WoL Along with lots of good WOL info, there are several downloadables on this site, including a command-line & GUI WOL utility, and a graphic ARP utility. Thanks to Miha for the tip! (Updated 15 May 2002 by Brian Slack @Depicus.com)
- Spettel LANStart I haven't actually tried this, partly because it's all in German - Ich spreche kein deutsch! (Thank you Ralf Spettel for the proper German translation - who also has provided some English text on the site.) Thanks to Finn for the suggestion!
- AR Magic Packet Library An ActiveX control by Alvaro Redondo
- WOL app in C The name about says it all. C source code by Hiroaki Sengoku.
- WOL Client (Sourceforge) Open source client for Win32 & Unix/Linux by Thomas Krennwallner.
- SolarWinds Wake-On-LAN utility Not free, this utility is included with a larger network management suite.
- SMSWakeUp Not free, this utility interfaces with Microsoft SMS.
- UltraWOL ActiveX control, can be embedded into a webpage. Written by UltraJones.
- WOL Command-Line utility Small, simple command-line utility by Matcode.com
- Scyld Wake-up WOL for Linux written in C by Donald Becker @Scyld.com
- Gammadyne WOL Command-line tool, source code available.
- WakeOnLAN w/ SMS A free script to integrate WOL with Microsoft SMS. Written by Heine Jeppesen. Uses Katsuyuki Yumoto's MagicPacket utility (no longer available).
- WakeOnLan Utility Utilities for NetWare, Win32, OS/2, & MacOS X, as well as a Perl CGI for web use.
- Wakeonlan Perl script written by José Pedro Oliveira. Includes excellent mini-HOWTO with additional links & WOL reference information.
References
If you are interested in further Magic Packet research, here are some links that I found particularly useful:
- www.depicus.com/wake-on-lan This site has lots of great WOL info. Much thanks to Miha for the tip!
- www.spettel.de Suggested by Finn, this site is mostly in German. Ralf Spettel has recently added some more English content.
- Microsoft Waker/Dozer This page implies that there is a Microsoft utility called Dozer (and/or Waker), but I can't find the actual utility anywhere.
- Madge.com Remote PC Wake-up WOL overview, technical information, and troubleshooting information.
- IBM Wake up to Wake-on-LAN A lengthy IBM white-paper on WOL technology.
- Intel PRO/1000 NIC WOL Troubleshooting Information about WOL and how to make it work with Intel adapters.
- Microsoft Power Management for Network Devices Information on NDIS 5, Power Management, & the Wake-up Process
- Microsoft Support Article: How to enable WakeOnLAN only for "Magic" Packet Pattern (257277) How to enable WOL on Windows 2000 systems.
- AMD Magic Packet Technology Lots of in-depth information from the father of WOL.
- [url=http://www.amd.com/us-en/ConnectivitySolutions/TechnicalResources/0,,50_2334_2452_2456^3411,00.html]AMD Magic Packet Utility Documents[/url] User's Guide & Test Report to accompany the Magic Packet Utility (see above)
- José Pedro Oliveira's mini-HOWTO Lots of good reference information, tools, and links related to WOL.
没有评论:
发表评论