Hi everyone.
I want to implement QOS function in my router, but all solutions I found need to set a fixed speed in the script, is there any script to archiving QOS without a fixed bandwidth?
Thanks
If you set your parent queue to be use the hardware negotiated rate (100Mbps or 1Gbps) as the max-limit, you’re in essence doing exactly that.
But if your ISP is not actually able to give those speeds, you’re not going to get any good results. It’s not theoretically possible for bandwidth to be divided fairly if you don’t know how much you’re dividing.
Thank you, but my ISP’s speed is lower than my interface, and not stable, that’s one reason I don’t want fixed QOS. I don’t need to divide evenly, I just don’t want one or more “bad” client to eat up all bandwidth, is it possible for the router to detect there are no enough bandwidth for normal browsing if a client’s download reach the ISP limit? Or another method: I used a Netgear router before Mikrotik, that router have a auto-QOS which test the upload speed every certain period, and thus don’t need to manually set it.
Sam
I don’t need to divide evenly, I just don’t want one or more “bad” client to eat up all bandwidth
Right. That’s why I used the word “fairly” instead of “equally” ![]()
that router have a auto-QOS which test the upload speed every certain period, and thus don’t need to manually set it.
Well, you could do a similar thing with a scheduler script.
On every interval, set the queue limit to the hardware limit, then set a secondary scheduler script to run one second later, which would use “/tool fetch” to download a large file (one that would take at least 4-5 seconds even on 100Mbps, so around 60MB). In the meantime, monitor the rate on your WAN interface, and after the download is done (which the second script can signal, say, via a global variable), readjust the total based on the results.
Thank you, but will this be inaccurate if clients are downloading when the router is testing?
First and foremost you need to understand the difference between upload and download, as this seems to be
quite muddy in this discussion.
Normally you can do fixed-speed shaping only on upload, not on download. You can do some tricks to make
clients more fairly share download traffic, but it will not be really accurate. That part of the shaping should be
done on the other side.