This question has come up a few times on the forums but I have yet to see any solutions posted.
Suppose I have a wireless link on which the speed varies between 7 Mbps and 10 Mbps depending on the weather.
At the end of the link I have a routerboard with two computers (on different vlans, or ethernet ports or different IPs, whatever).
Can I set it up so that Computer A gets 100% of the capacity when Computer B is not in use but only 80% of the capacity when Computer B is trying to use the network?
I can’t just cap Computer A at 8 Mbps because sometimes that would leave 0 Mbps for Computer B.
I can’t cap them both at 7 Mbps because that’s 3 Mbps wasted.
Is there a way to specify priority/queues in % instead of bits?
This is a difficult task. The way to do this, would be to set limit-at values. This is something that I address directly in my training on QOS (coming up this week - http:///www.butchevans.com/ for details). You could do queue trees something like:
I’m not sure that would address all of your issue, but that’s the approach I’d take. It will guarantee speeds of 5M for A and 2M for B (when the link capacity is only 7M), and allow for the higher speed capability
Once you got your latency (about 80 pings over 50ms (assuming your link is able to support a good latency (1-2 ms average))) you can decide to lower the max-limit of your queues accordingly until the latency drops to your desired limit.
:local currentmax [/queue tree get GlobalOutQueue max-limit];
:if ($latency < 80) do={/queue tree set GlobalOutQueue max-limit=($currentmax - 1000000);};
I’m not sure this code is correct and i don’t know if this will fit your needs, but maybe you got my idea to solve your problem
While I agree that the latency test may be a usable approach, it is not, by itself, a good test. This test would fail, for example, if the link was at full 10M capacity and utilization was at that rate as well.
The problem with doing a speed test is that it would give incorrect results because the link is already in use.
Of course, I can’t turn off the users before every test.
The ping solution is decent.
Is that as good as it gets or someone knows something better?
Not many choices here. The queue structure I showed is really the best approach and it will work for what you want. I only presented the option of the speedtest since we were playing with scripting.
I tried “limit-at” in 3.30 but it seems to do nothing at all. Any ideas if it works in older or newer versions?
As for the “max-limit” settings in your queue, what is the point? Am I not going to get the same result if I set max-limit to 30M or nothing at all (if limit-at worked)?
I already did all the packet marks on my own. Thanks tho.
I think “limit-at” is broken, but, before we address that, a question remains, is “max-limit” needed here at all?
Needed - maybe not. At least the parent needs to know the total available bandwidth. I just did a test on 3.30 with this exact configuration and it works just right. I don’t know what part is not working in your config, or which version you are using, but I do not experience a “broken” limit-at value.
In my haste, I made the child queues use the interface as parent instead of the “Total” queue, which is what it is supposed to be. Sorry about that. With THIS config it will work as advertised.
That’s one of the combinations I tried yesterday, but it still didn’t work.
What is “downstream”? Is that supposed to be the ethernet interface both computers are on?
Yes, downstream would be the name of an interface. If you have 10M download capability, then downstream would be the side facing the computers. If this is a bridge interface, then we have to adjust the rules and mangles.
Just tried it again. 100% fail.
If I run a speed test with 20 threads on one computer, and 1 thread on the other, the one with 20 threads gets 90% + of the link.
If I flip the test locations, again the computer with more threads gets almost all the link.