A little script to wake up all Mikrotik devices on your network that have a DHCP lease, using Wake On LAN.
It may be a good idea to set your DHCP lease expiry to something long like 7 days. A short expiry may mean dynamic leases have expired if the device has been switched off for some time.
It should also wake up any devices with static leases, so you could also set all your devices as static in your DHCP.
1 2 3 4 5 | /ip dhcp-server lease :foreach i in=[find] do={ :put ([get $i address].”,”.[get $i mac-address].”,”.[get $i server].”,”.[get $i host-name].”,”.[get $i expires-after]) :execute { /tool wol interface=bridge [get $i mac-address] } } |