I'm trying to broadcast on the LAN a Wake On Lan "magic packet" to wake up 10.1.1.10 (router is 10.1.1.1).
The UDP packet is sent from Internet (basically to wake-up my Linux workstation).
All operations are done via ssh (luci is not installed).
Added to `firewall`
config 'redirect'
option 'name' 'wakeup'
option 'src' 'wan'
option 'proto' 'tcpudp'
option 'src_dport' '9'
option 'dest_ip' '10.1.1.10'
option 'dest_port' '9'
option 'target' 'DNAT'
option 'dest' 'lan2'
This works when 10.1.1.10 is switched ON, tcpdump shows the packet reaching destination.
But of course, when 10.1.1.10 is down, the usual ARP query "who is 10.1.1.10" to get its MAC address will not get an answer. And the WoL doesn't work.
So here is my problem:
- tried to add a static IP is `/etc/ethers` (and `option readethers '1'` in `config dnsmasq`) => doesn't work
then added to `dhcp` the Linux host IP and MAC
config host
option ip '10.1.1.10'
option mac 'a5:31:ac:91:10:01'
option name 'linux'
- doesn't work either
By "doesn't work", I mean after a router reboot, `arp` shows
10.1.1.10 0x0 ... 00:00:00:00:00:00
the MAC address is still all-zeroes, and the WoL packet doesn't reach the linux PC.
[I must say that 10.1.1.10 is not part of the DHCP allocated range of IPs (.100 ~ .200)]
Questions
- Is there another way to route a WoL Packet (or broadcast it)?
- How to get a static IP + MAC stored and used?
----
Notes:
- using CHAOS CALMER (15.05.1)
- WoL works from the LAN (send the packet from another PC on the same LAN works)
(Last edited by *++p on 9 Feb 2018, 17:07)