Here's one for the more experienced okes on here. I have a dual WAN situation, but I also dynamically change queues depending on the status of said WAN connections. Because they are assymetric, I think I would need to include some logic into the script itself. I am not very good with scripting, I might add.
How would I go about making a script that can run every 10 seconds with the scheduler, and dynamically adjust the queue limits based on which WAN connections are up? I'd like something sort of similar to this:
If WAN1+WAN2=up, set queue to 100mbps
If WAN1=up and WAN2=down, set queue to 15mbps
If WAN2=down and WAN2=up, set queue to 50mbps
If both WANs down, revert to 100mbps
I can then just use the scheduler to run on startup and every ten seconds after that, which is easy enough. At the moment I am using Netwatch to achieve the above, but it's janky as when both go down and one WAN comes back, it installs the wrong queue limits and causes a bit of havoc with downloads etc.
EDIT: I was thinking that I might need to assign some variables to help me out. Was thinking of something like assigning a '1' to WAN1 and a 2' to WAN2 (I can do this by watching which routes are available since Netwatch does this for me), so that if the variable is '3', then set queues to 100mbps, but if it's '1', then set it to 15mbps, and if '2', set to 50mbps.