In article <XYCEb.85715$8y1.291377@attbi_s52>,
John Roland Elliott <JohnRolandElliott-no-(E-Mail Removed)> wrote:
:Ports are an artifact of TCP/IP. WOL doesn't run over TCP/IP but rather at a
:lower layer.
True in one sense, not in another.
:A WOL packet not only doesn't have a port, it doesn't have an
:IP address.
True in one sense, not in another.
:The packets that need to be passed won't go through an IP router
:and need to originate on the same LAN as the computer you want to wake up.
But both parts of that are outright false.
http://gsd.di.uminho.pt/jpo/software...o-2.html#ss2.2
2.2 How does it work?
WOL is based on the following principle:
When the PC shuts down, the NIC still gets power, and keeps
listening on the network for a 'magic' packet to arrive. This
packet must contain a certain byte-sequence, but can be
encapsulated in any kind of packet (IPX, IP, anything). [...]
Magic sequence
If the Ethernet address of a target computer is 01:02:03:04:05:06
(6 bytes), then the LAN controller of that machine should be
looking for the following sequence
FFFFFFFFFFFF01020304050601020304050601020304050601 0203040506
01020304050601020304050601020304050601020304050601 0203040506
01020304050601020304050601020304050601020304050601 0203040506
010203040506010203040506
inside the frame.
Or read the AMD White Paper at
http://www.amd.com/us-en/assets/cont...docs/20213.pdf
Magic Packet Frame Detection
Once the LAN controller has been put into the Magic Packet mode, it
scans all incoming frames addressed to the node for a specific data
sequence, which indicates to the controller that this is a Magic
Packet frame. A Magic Packet frame must also meet the basic
requirements for the LAN technology chosen, such as SOURCE ADDRESS,
DESTINATION ADDRESS (which may be the receiving station's IEEE
address or a MULTICAST address which includes the BROADCAST
address), and CRC. [...]
There -is- an issue in sending such a packet from a remote location.
If you simply address remote system by its IP address, then when the
packet gets to the closest router to the host, that router is going to
ARP for the remote IP's MAC address, but the remote host isn't going to
answer because the remote host is dormant and the ARP packet isn't one
that matches the WOL criteria. But this is an issue when you are
sending out the packets locally too -- if you are sending out a packet
locally by its IP address then again the ARP will fail. The advantage
you have when sending locally is that you can go underneath the usual
layers and -directly- create a packet with the required MAC destination
(which you already have to know to create the Magic Sequence anyhow)
and that will be carried on the local segment. You can't just put in
the right destination MAC when you are remote, because even if you
managed to get the packet as far as a router, the router would rewrite
the destination MAC.
This issue does not, however, mean that you are retstricted to local
creation of WOL packets. Look back at the AMD description and notice
the bit about the BROADCAST address, which in the layer 2 context is
ff:ff:ff:ff:ff:ff . Thus if you can remotely inject any packet onto the
LAN segment that ends up having ff:ff:ff:ff:ff:ff as its destination
MAC, then provided the packet contains the WOL Magic Sequence, the
destination will wake up. And it turns out that there -are- ways to
remotely inject such packets. All you have to do when you are creating
the packets remotely is to address them to the subnet directed
broadcast IP for any subnet that shares the same segment as the
destination system. For example, if the destination segment happens to
be shared by computers in 14.11.9.16/28 and 9.33.84.0/25 then sending
to -either- 14.11.9.31 or 9.33.84.127 would work -- because when the
remote router sees these destinations, it is going to know that they
are subnet broadcast IPs and the remote router itself is going to
create packets with MAC destination ff:ff:ff:ff:ff:ff. Those created
packets are going to have the destination IP the same as whatever was
sent to, but the WOL technology ignores the destination IP address so
it doesn't matter to WOL which of the subnet broadcast IPs you use --
any one that covers a segment that includes the target host will do.
Of course, there might have been security measures put in place to
disallow remote sending to the subnet directed broadcast IPs, but
that's a different situation than saying, as you did, that the packets
involved "won't go through an IP router and need to originate on the
same LAN as the computer you want to wake up." Security measures
are subject to negotiation: if you have the appropriate
authorization, you *can* do remote WOL.
--
"Mathematics? I speak it like a native." -- Spike Milligan