ericpaulbishop / gargoyle

Gargoyle Router Management Utility
http://www.gargoyle-router.com
465 stars 222 forks source link

Wake on lan problem #950

Closed badziewiak123 closed 2 years ago

badziewiak123 commented 2 years ago

In the device list on the Configuration/wake on lan tab, some devices are often not displayed (now when I don't need it it is visible in the list). Sometimes the device list is empty. It partially fills up after switching tabs. In addition to solving this problem, please add the possibility to enter manually the MAC or IP address (if defined in the DHCP list). I would also ask for the possibility to send a magic packet from a device connected to the network via OpenVPN or wireguard. Device configuration: Linksys WRT3200ACM (bought 2016 Dec - if a hardware version is required, I will add it later) See screenshot for further information. Thank you for your help.

Zrzut ekranu 2022-05-09 145955 Zrzut ekranu 2022-05-09 150647

lantis1008 commented 2 years ago

I have pushed a change here (https://github.com/ericpaulbishop/gargoyle/commit/253bb0918e147c53590ec1be79c36bba194af6b9) to add the static DHCP leases as a source for the WOL list.

The functionality that has changed for 1.13 is that FAILED arp records are no longer shown in the GUI. These records are stale (the router has no idea if they exist on the network or not) and are low chance of succeeding. They also don't contain MAC addresses so we can't send to them anyway.

If you want to run WOL from OpenVPN/Wireguard, connect to the router and use the GUI plugin. Or SSH into a device on the local network and run WOL from there.

At this stage I have not added the ability to manually specify the IP or MAC address. If this solves your issue please mark it as closed.

badziewiak123 commented 2 years ago

Thank you for the improvement. I am not sure if I understand this correctly: If a device is connected to the network, its "fingerprint" is statically saved to the device list. This seems to require the device to be turned on after a software reinstallation, so that the router can read the device data. If that's the case and it's a one-time operation, then it's not a problem. I can always remotely invoke a script or command via ssh and the additional option of manually entering the MAC is not necessary. Thank you.

lantis1008 commented 2 years ago

No it happens all the time and is a process called ARP. It maps MAC addresses to IPs. when a device is online it can ask the device and get a reliable answer. If it goes offline, the device no longer replies so it marks the record as unreachable or stale. After a period of time (I think 15 minutes) it is considered failed and no longer valid. This is because another device may have connected and taken over that IP address (in a busy network with short dhcp leases). Obviously in a static lease case this isn’t true and so we can use the static list at least semi reliably.

badziewiak123 commented 2 years ago

Hello There seems to be a problem: WOL is not working. In the WOL list, the MAC is set different than in the DHCP settings. The MAC is outside the list stored in DHCP. The same incorrect MAC is repeated in multiple devices in the WOL list. Regards Zrzut ekranu 2022-05-16 130830

lantis1008 commented 2 years ago

https://github.com/ericpaulbishop/gargoyle/commit/253bb0918e147c53590ec1be79c36bba194af6b9#diff-cad2e2a8edce3e70073863b7e0ee710cf50425a0946bd3f13363bd98dacc3f84R69 Oops! Change "mac" to "ether" on that line as per https://github.com/ericpaulbishop/gargoyle/commit/d95d1967ef3e77496ef2390a66f6de479c2d40f9