Skip to main content
Home Forums 68kMLA WakeonLan (wol) on Classic MacOS — #5
Post #5 by Gorgonops
Source Forum68kMLA
CategoryNetworking
Post DateSun, 28 Oct 2012 - 18:56
Original URLhttps://68kmla.org/bb/threads/wakeonlan-wol-on-classic-macos.26447/
Post
"It's common to use UDP port 9 because this is the "Discard" port from the early days of IP. Using this means WOL won't interfere with anything else you might have running. However, using some other port might be handy if it's already opened to allow another service to run. TCP port 80 would be a good example - anyone who runs a Web server would be able to use WOL on 80 without any further configuration."
So here's the deal: WOL *is* a very dumb protocol. It basically leaves the MAC transceiver on the Ethernet card stuck on in promiscuous mode looking for a packet which contains the correct sequence of bytes. If you were running with an Ethernet hub, not a switch (any Ethernet "hub" made after 2004 or so will almost certainly actually be a switch), then in principle you could wake a sleeping machine by, for instance, transferring a .BMP image file that has the correct byte sequence imbedded in it (as a pattern of colored lines) from one other machine to another over any protocol that doesn't encrypt or otherwise modify the packet payload. The key here is, however, is you'd have to be using a *HUB* instead of a switch because otherwise the ARP tracking hardware in the switch will channel the data payload between *just* the machines involved in the transfer so the sleeping machine will never see it.

When set for WOL the card is *not* running a TCP/IP stack and does not answer ARP requests so unless you are running on a completely dumb hub the only reliable way to generate a packet which will be seen by the sleeping machine is to send one to the broadcast address of the network. Setting the broadcast flag on the packet will instruct the ethernet switch to repeat said packet to every port and the only (commonly used) protocols which support broadcast are ICMP and UDP. Therefore there is no straightforward way to send a WOL packet with, say, a Telnet program since TCP by definition isn't a broadcast protocol.

Since a WOL packet is indeed so very simple it's fairly trivial to write a program to generate one but you probably *will* need a program unless you have access to some classic Mac program that lets you do some fairly obscure things, like generate ICMP ping packets with custom payloads.

mp.ls