WOL介紹

1.WOL

局域網喚醒(WOL)是一種以太網或令牌環計算機網絡標準,允許通過網絡消息打開或喚醒遠程設備。

該信息通常由在連接到相同局域網(例如智能電話)的設備上執行的程序發送到目標設備,還可以通過使用子網定向廣播或WOL網關服務從另一網絡發起消息。

如果被喚醒的設備正在通過Wi-Fi進行通信,則稱爲補充標準必須使用無線LAN喚醒(WoWLAN)

Wake-on-LAN (WoL) is an Ethernet or token ring computer networking standard that allows a computer to be turned on or awakened by a network message.
The message is usually sent to the target computer by a program executed on a device connected to the same local area network, such as a smartphone. It is also possible to initiate the message from another network by using subnet directed broadcasts or a WOL gateway service. Equivalent terms include wake on WAN, remote wake-up, power on by LAN, power up by LAN, resume by LAN, resume on LAN and wake up on LAN. If the computer being awakened is communicating via Wi-Fi, a supplementary standard called Wake on Wireless LAN (WoWLAN) must be employed.[1]

1.1 MagicPacket概述

A standard magic packet has the following basic limitations:

• Requires destination computer MAC address (also may require a SecureOn password)

• Does not provide a delivery confirmation

• May not work outside of the local network

• Requires hardware support of Wake-on-LAN on destination computer

• Most 802.11 wireless interfaces do not maintain a link in low power states and cannot receive a magic packet

The Wake-on-LAN implementation is designed to be very simple and to be quickly processed by the circuitry present on the network interface card with minimal power requirement. Because Wake-on-LAN operates below the IP protocol layer, IP addresses and DNS names are meaningless and so the MAC address is required.

1.2 MagicPacket格式

MagicPacket格式:FFFFFFFFFFFF(6個FF)+16個MAC地址(被喚醒的設備MAC) = 102byte

The magic packet is a broadcast frame containing anywhere within its payload 6 bytes of all 255 (FF FF FF FF FF FF in hexadecimal), followed by sixteen repetitions of the target computer's 48-bit MAC address, for a total of 102 bytes.

1.3 MagicPacket使用

MagicPacket在局域網內使用的是廣播包

The magic packet is sent on the data link layer (layer 2 in the OSI model) and when sent, is broadcast to all attached devices on a given network, using the network broadcast address; the IP-address (layer 3 in the OSI model) is not used.

MagicPacket通過傳輸層協議發送,通常被作爲一個UDP數據包(端口0.7.9)或直接在以太網上通過EtherType 0x0842

Since the magic packet is only scanned for the string above, and not actually parsed by a full protocol stack, it could be sent as any network- and transport-layer protocol, although it is typically sent as a UDP datagram to port 0,[6] 7 or 9, or directly over Ethernet as EtherType 0x0842.[7] A connection-oriented transport-layer protocol like TCP is less suited for this task as it requires establishing an active connection before sending user data.

Subnet directed broadcasts:子網定向廣播,SDB只是爲了解決廣播包不能出局域網的問題

Subnet directed broadcasts are treated like unicast network packets until processed by the final (local) router. This router then broadcasts the packet using layer 2 broadcast. This technique allows a broadcast to be initiated on a remote network but requires all intervening routers to forward the SDB.[10][11] When preparing a network to forward SDB packets, care must be taken to filter packets so that only desired (e.g. WoL) SDB packets are permitted — otherwise the network may become a participant in DDoS attacks such as the Smurf Attack.

Internet的情況,需要NAT配置轉發規則

When sending over the Internet, and in particular where a NAT (Network Address Translator) router, as typically deployed in most homes, is involved, special settings often need to be set. For example, in the router, the computer to be controlled needs to have a dedicated IP address assigned (aka a DHCP reservation). Also, since the controlled computer will be "sleeping" except for some electricity on to part of its LAN card, typically it will not be registered at the router as having an active IP lease.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章