Theoretically WOL could be on a BMC with an IP address ...
A sniffer trace of what WOL packet gets generated with your tool when using IP might be useful. @mkx points out there are quite a few flavors in WOL... I was thinking it's just the "inner" UDP have a specific dst-address, but that may not might right.With NirSoft's WakeMeOnLAN tool, I can successfully wake-on-lan an MSI Cubi2 system on my LAN.
0000 4c cc 6a d6 39 c7 d8 9e f3 42 de b4 08 00 45 00 L.j.9....B....E.
0010 00 82 b9 e7 00 00 80 11 00 e2 c0 a8 ff 25 c0 a8 .............%..
0020 ff 2a e6 c6 9c 40 00 6e e5 c9 ff ff ff ff ff ff .*...@.n........
0030 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 L.j.9.L.j.9.L.j.
0040 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 9.L.j.9.L.j.9.L.
0050 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 j.9.L.j.9.L.j.9.
0060 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 L.j.9.L.j.9.L.j.
0070 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 9.L.j.9.L.j.9.L.
0080 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 j.9.L.j.9.L.j.9.
Frame 5: 144 bytes on wire (1152 bits), 144 bytes captured (1152 bits) on interface \Device\NPF_{32469523-BD20-4A8A-9A64-AFEF34EAA3F1}, id 0
Section number: 1
Encapsulation type: Ethernet (1)
Frame Number: 5
Frame Length: 144 bytes (1152 bits)
Capture Length: 144 bytes (1152 bits)
[Protocols in frame: eth:ethertype:ip:udp:wol]
Ethernet II, Src: Dell_42:de:b4 (d8:9e:f3:42:de:b4), Dst: Micro-St_d6:39:c7 (4c:cc:6a:d6:39:c7)
Destination: Micro-St_d6:39:c7 (4c:cc:6a:d6:39:c7)
Source: Dell_42:de:b4 (d8:9e:f3:42:de:b4)
Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.168.255.37, Dst: 192.168.255.42
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 130
Identification: 0xb9e7 (47591)
000. .... = Flags: 0x0
...0 0000 0000 0000 = Fragment Offset: 0
Time to Live: 128
Protocol: UDP (17)
Header Checksum: 0x00e2 [validation disabled]
Source Address: 192.168.255.37
Destination Address: 192.168.255.42
User Datagram Protocol, Src Port: 59078, Dst Port: 40000
Source Port: 59078
Destination Port: 40000
Length: 110
Checksum: 0xe5c9 [unverified]
UDP payload (102 bytes)
Wake On LAN, MAC: Micro-St_d6:39:c7 (4c:cc:6a:d6:39:c7)
Sync stream: ffffffffffff
MAC: Micro-St_d6:39:c7 (4c:cc:6a:d6:39:c7)
0000 4c cc 6a d6 39 c7 d8 9e f3 42 de b4 08 00 45 00 L.j.9....B....E.
0010 00 82 b9 5e 00 00 80 11 01 6b c0 a8 ff 25 c0 a8 ...^.....k...%..
0020 ff 2a f0 c1 9c 40 00 6e db ce ff ff ff ff ff ff .*...@.n........
0030 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 L.j.9.L.j.9.L.j.
0040 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 9.L.j.9.L.j.9.L.
0050 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 j.9.L.j.9.L.j.9.
0060 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 L.j.9.L.j.9.L.j.
0070 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 9.L.j.9.L.j.9.L.
0080 6a d6 39 c7 4c cc 6a d6 39 c7 4c cc 6a d6 39 c7 j.9.L.j.9.L.j.9.
Frame 69: 144 bytes on wire (1152 bits), 144 bytes captured (1152 bits) on interface \Device\NPF_{9F0D01C4-3179-4B28-9AA5-6DA0D69468CF}, id 0
Section number: 1
Encapsulation type: Ethernet (1)
Frame Number: 69
Frame Length: 144 bytes (1152 bits)
Capture Length: 144 bytes (1152 bits)
[Protocols in frame: eth:ethertype:ip:udp:wol]
Ethernet II, Src: Dell_42:de:b4 (d8:9e:f3:42:de:b4), Dst: Micro-St_d6:39:c7 (4c:cc:6a:d6:39:c7)
Destination: Micro-St_d6:39:c7 (4c:cc:6a:d6:39:c7)
Source: Dell_42:de:b4 (d8:9e:f3:42:de:b4)
Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.168.255.37, Dst: 192.168.255.42
0100 .... = Version: 4
.... 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00.. = Differentiated Services Codepoint: Default (0)
.... ..00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 130
Identification: 0xb95e (47454)
000. .... = Flags: 0x0
...0 0000 0000 0000 = Fragment Offset: 0
Time to Live: 128
Protocol: UDP (17)
Header Checksum: 0x016b [validation disabled]
Source Address: 192.168.255.37
Destination Address: 192.168.255.42
User Datagram Protocol, Src Port: 61633, Dst Port: 40000
Source Port: 61633
Destination Port: 40000
Length: 110
Checksum: 0xdbce [unverified]
UDP payload (102 bytes)
Wake On LAN, MAC: Micro-St_d6:39:c7 (4c:cc:6a:d6:39:c7)
Sync stream: ffffffffffff
MAC: Micro-St_d6:39:c7 (4c:cc:6a:d6:39:c7)
ether dst FF:FF:FF:FF:FF:FF and ether proto 0x0842
Not sure how wide-spread the problem, but given @fragtion is also interested. You should file as a feature request at help.mikrotik.com.It would still be nice to see a user-friendly addition to the existing RouterOS WOL tool to specify that the magic packet must be unicast.
##
## Send unicast WOL packet to host AVClientXB1's Ethernet interface MAC address 4C-CC-6A-D6-39-C7
##
########## Set variables
## Notification e-mail
:local email "inserthere@your.org"
## Interface out through which to send it - we use our group master LAN port
## This may vary on your RouterOS device
:local outintf "ether2-master-local"
## Destination MAC address - NOT BEING CONFIGURABLE LIKE THIS, YET
##:global dstmac "4CCC6AD639C7"
## The actual whole magic packet for that specific MAC
:local magicpkt "4ccc6ad639c7d89ef342deb4080045000082b9e70000801100e2c0a8ff25c0a8ff2ae6c69c40006ee5c9ffffffffffff4ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c7"
########## Construct the WOL magic packet
## Well, maybe later. For now, it's all in the static blob above, which is a single packet capture by Wireshark, taken on the sender
########## Do it
:log info ("WOL-AVClientXB1: Sending magic packet")
/tool traffic-generator inject $outintf data=$magicpkt
ffffffffffff
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
4ccc6ad639c7
d89ef342deb4080045000082b9e70000801100e2c0a8ff25c0a8ff2ae6c69c40006ee5c9
d8:9e:f3:42:-de:b4
08:00
45000082b9e70000801100e2c0a8ff25c0a8ff2a
e6c69c40006ee5c9
/tool wol interface={whatever} dst-mac=AA:BB:CC:DD:EE:FF dst-ip=192.168.255.42
... route-via={intermediate-router's-IP-address}
To return to initial request: adding possibility to send WoL packet to certain IP address is aide to user who then doesn't need to know device's MAC address. But then device offering such service would have to collect MAC/IP mappings in a pseudo-permanent manner. Which ROS currently doesn't do as it doesn't have any other use case for such table (yet).
The source/destination ports seem not to be plainly encoded?
e6c69c40
should mean:
e6c6 -> 59078
9c40 -> 40000
the second is fine, the first ?
or at least it is seemingly parsed correctly on:4ccc6ad639c7d89ef342deb40842ffffffffffff4ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c7
In theory, all this stuff Is not needed (the encapsulation of the 0x0800 ethertype and the UDP packet), this much simpler 0x0842 packet should have the same effect:or at least it is seemingly parsed correctly on:4ccc6ad639c7d89ef342deb40842ffffffffffff4ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c74ccc6ad639c7
https://hpd.gasmi.net/
I am not even convinced that the encapsulated UDP packet may work ...
... at a minimum just please implement the (already submitted) feature request to do unicast instead of only broadcast.
... at a minimum just please implement the (already submitted) feature request to do unicast instead of only broadcast.
Please elaborate on the following two questions: What would be the benefit of using unicast ethernet frames instead of broadcasts? What would be benefit of using unicast IP address instead of broadcast? I'm truly interested.
/tool wol interface={whatever} dst-mac=AA:BB:CC:DD:EE:FF dst-ip=192.168.255.42
/tool wol interface={whatever} dst-mac=AA:BB:CC:DD:EE:FF dst-subnet=192.168.255.0/24
wol p|u|m|b|a|g|s|f|d...
Sets Wake-on-LAN options. Not all devices support
this. The argument to this option is a string of
characters specifying which options to enable.
p Wake on PHY activity
u Wake on unicast messages
m Wake on multicast messages
b Wake on broadcast messages
a Wake on ARP
g Wake on MagicPacket™
s Enable SecureOn™ password for MagicPacket™
f Wake on filter(s)
d Disable (wake on nothing). This option
clears all previous options.
For what is worth, a (rigorously half-@§§ed and not fully tested) WOL generator in a spreadsheet.
Should be enough to play a little bit with various values.