What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

WOL for clients on different VLANS

gpz1100

Regular Contributor
RT is configured with several vlans. Some ports have both tagged and untagged vlans.

The WOL function in the webui appears to broadcast the magic packet/wol request across all configured vlans.

How can I control this?

As an alternative, perhaps a script (that runs ether-wake) can be linked to a hidden webui entry.

Something like http://192.168.1.1/wol_aa_bb.asp

aa_bb are the last 4 characters of the mac in question.

Then that url calls the script which executes

ether-wake -i vlan25 aa:bb:cc:dd:ee:ff

Thoughts?
 
The WOL function in the webui appears to broadcast the magic packet/wol request across all configured vlans.

How can I control this?
Why do you need to control it? The target MAC address should be unique regardless of which VLAN it is on.
 
The idea of vlans was to segregate certain devices from one another. I suppose it doesn't matter that a certain mac is broadcast on other vlans. I imagine it would just be ignored.

I do wonder however if this is by design or just a limitation of the rt's vlan function. That is, do proper managed switches bleed wol broadcasts to all vlans or one has to be specified.

Still, i'd be interested in hearing if there's a way of limiting the scope of wol on the rt.
 
IIRC, we changed the built in WOL to broadcast a couple of years ago because some external switch configurations weren't passing the WOL packets correctly without broadcast. The only alternative right now would be to issue your own 'ether-wake' command via ssh without the broadcast switch.
 
@john9527 I'm ok with running my own command.

How do I add a /jffs script shortcut to the webui. I don't need a button, just a way of executing the script when a particular url is presented?
 
Ok problem solved... So that this may help others here's what I did.

Solution was to install lighttpd and php

1) You'll need to have entware installed

2) lighttpd/php install instructions - I stopped at step 11 as I have no need to allow wan access to this. VPN is used to access the local network first
https://hqt.ro/lighttpd-web-server-with-php-support-through-entware-ng/

3) Create the wake up script

/mnt/Entware/entware/bin/wol-00-0C-29-12-34-56.sh
Code:
#!/bin/sh

#one shot is probably enough, 3 to make sure
ether-wake -i vlan4 00:0C:12:12:34:56
ether-wake -i vlan4 00:0C:12:12:34:56
ether-wake -i vlan4 00:0C:12:12:34:56
Don't forget to make it executable (chmod +x {script name})

4) create weblink

/tmp/mnt/Entware/entware/share/www/win10-htpc.php
Code:
<?php
shell_exec("/mnt/Entware/entware/bin/wol-00-0C-29-12-34-56.sh");
?>

Then to execute, http://routerip:81/win10-htpc.php

Nothing is shown back on the screen but the machine is now awake. As an added bonus, no login is required. Going through the regular wol function in the webui, one has to log in first. This can even be saved as a book mark for even quicker response.

Edit: In retrospect, I suppose the same could of been accomplished with a single plink command from putty (using a public/private key authentication?). The above seems simpler to me as it requires just a vpn connection to the lan. If there's multiple pc's involved, don't have to remember to add ssh credentials to them. In addition, firewall is set up to block all port 80/443 access to the RT when connected through the vpn.
 
Last edited:

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top