Cron for WOL
-
If your "device without IP" (
serious ??see below ) is some windows device, try this :https://www.depicus.com/wake-on-lan/wake-on-lan-monitor
I had to indicate a port number like "40000" on both side so the command line works :
wol -i 192.168.1.2 00:4e:01:ac:ca:9c -p 4000 Waking up 00:4e:01:ac:ca:9c...
The tool on the device, my PC, that it received the special pachet (5 times the device MAC as the data payload)
See also the FreeBSD mn page for wol https://www.freebsd.org/cgi/man.cgi?query=wol&manpath=ports&sektion=1
edit : a device in lower power mode doesn't have - use an IP(v4 or v6).
It just listens to the incoming data stream, and knows how to detect if it's won MAC is present 5 times in a row. No processor power is needed.wol needs a IP or host just to so it can find out on what interface to use if it is "multi homed", like our pfSense. The actual IP shouldn't matter ......
But .....
I thinkthat our switches play an important role here. Switches are not hubs, so traffic isn't broadcasted any more.
When I use the broadcast IP of my LAN, like :wol -i 192.168.1.255 -p 4000 00:4e:01:ac:ca:9c
it worked, the Wake On Lan monitor on my PC showed the incoming magic packet.
-
@gertjan I want to use wol (not pattern match?) for this. I ended up using wol.exe on another Windows host together with windows tasksheduler to achieve what pfSense couldn't do for me.
-
@bob-dig I edited - see above.
-
@gertjan So this time I tried in putty:
/usr/local/bin/wol -v -i 192.168.1.255 d0:50:99:92:11:e7
And it did work. Then I tried cron, also does work!
So the key is to use .255 at the end.
I still wonder why the web-GUI-thingy works with the MAC only, but on the other hand, when I first added the host to the Wake-on-LAN Devices list, it had an IP-address, so it might have saved it there.
Thank you @Gertjan !!