virtwold icon indicating copy to clipboard operation
virtwold copied to clipboard

WoL from AVM fritzbox wont work

Open soonic6 opened this issue 1 year ago • 5 comments

Hi,

I tried to wake up my VMs from my AVM Fritzbox 7590 Router (https://en.avm.de/service/knowledge-base/dok/FRITZ-Box-7530/36_Starting-network-devices-over-the-internet-Wake-on-LAN/), but it didn't work.

I attempted the same thing from my Windows PC using some tools, and that worked well.

Here are the packets from the router and Windows tools: image As far as I understand, the smallest packets for WoL only need the MAC broadcast address and the destination MAC repeated 16 times. This is what the AVM Fritzbox does... the Windows tools also add IP and UDP information.

If you have any further questions or need additional assistance, feel free to ask!

soonic6 avatar Aug 14 '23 20:08 soonic6

Yeah, certainly something that doesn't match the filter I have setup here (which is to look only for UDP broadcast packets). Looks more like the example in https://wiki.wireshark.org/WakeOnLAN than what I see sent from Moonlight or NVIDIA Games.

In theory if you change var filter = "udp and broadcast and (len = 102 or len = 144 or len=234)" to just var filter = "broadcast" it'll work for you (albeit looking at way more packets than it needs to for now). Can you give that a try, before I go make some other changes to help reduce the false-positives?

ScottESanDiego avatar Aug 14 '23 21:08 ScottESanDiego

i think this https://wiki.wireshark.org/WakeOnLAN#protocol-dependencies is the most common problem with wol. maybe it isn't a good idea filtering every ethernet frame instead of contacting AVM for changing their WOL implementation.

In theory if you change var filter = "udp and broadcast and (len = 102 or len = 144 or len=234)" to just var filter = "broadcast"

i did a short test with var filter = "udp **or** broadcast and (len = 102 or len = 144 or len=234)" to just var filter = "broadcast" but it didn't work. but i can do another test today only filtering broadcast

soonic6 avatar Aug 15 '23 05:08 soonic6

@ScottESanDiego I have been using your code as a basis for one of may projects.

I have added code but not created a PR as yet.

virtwold.go.txt

SimonFair avatar Dec 10 '23 16:12 SimonFair

I was scratching my head over why on GNU/Linux, the ether-wake tool wasn't working to wake up my VMs, while the wakeonlan tool works. I guess https://wiki.wireshark.org/WakeOnLAN#protocol-dependencies explains it. Thanks for the link. IWBN if virtwold Just Worked, though.

palves avatar May 23 '24 10:05 palves

So is listening for ethernetPacket.EthernetType == 0x0842 what's needed to make AVM work? I'm not clear what is needed to make this work.

ScottESanDiego avatar May 23 '24 15:05 ScottESanDiego