I want to setup bandwidth limiting with working limit-ats, not wasting usable bandwidth etc, but it never works for me as expected. I have read the articles at the wiki, pcq, htb examples etc, but I just can’t get it working. I use mangle and queue trees to set bandwidth for ips or ranges, it works like a charm, but this setup is wasting a lot of unused bandwidth. I think the problem may be related to parent queues setting, or limiting only the outgoing interface etc.
The goal: lets have 200mb line on eth1-gateway, and I want to split it to 100mb for eth2 and 100mb for eth3. A can do that now, but when there is no traffic on eth2, eth3 is still limited to 100mb and 100mb of eth2 is wasted. I want eth3 do download 200mbit with eth2 off, but when eth2 gets on and wants do download as much as possible, it should get its 100mb. Or, if eth2 is downloading from a slow 30mbit server, eth3 should get 170mb, etc.
I tried to set limit-at for eth2 and eth3 to 100mb, set parent max-limit to 200mb, priorities etc, but I never got it working. Can anyone please post a real working example? I don’t really know what I’m doing wrong.
And to be even more tricky, lets say that eth2 is /24 production network, with a pc in meetingroom. For the meeting, I want to guarantee 60mb only for that one ip - but again, I don’t want to cut down the speed of the production network to 40mb forever, I want it this way only when the meetingroom pc is being used.
I know it should work this way, I tried it and even posted this config in my post, but it does not. The cuplrit may be the the forward chain in my mangle rules (instead of prerouting) - I don’t know how big influence can this have, in the packet flow diagram all chains are before HTB, so it should work nonetheless. But I’ll change the chain.
The way it works now is: without eth2, eth3 is downloading 200m. But when eth2 turns on and wants to download as fast as possible, it gets like 30mb, and eth3 keeps around 170mb (the number changes, but it is definitely a lot more than eth2, not 100/100). When I quit eth3 downloading, eth2 jumps to 200m.
THIS IS why I’d like someone to post all related settings of a working config (ros6) - mangle rules, QT queues and rules, including parents, and anything else related
ok, so I took four RB2011 and did some more bandwidth testing, it gets interesting.
I changed the chain to prerouting with no effect, speeds are still like 176/6, 150/40 - far from 100/100.
But the CPU usage was >90%, so I tested it with max-limit 50M and limit-at 25M - it seems working much better, most of the time something like 25.1/25, sometimes for a few seconds 29/21.
Is it possible that RB2011 cannot mangle & queue traffic for ~100M and up - with two hosts running btest, few fw rules, no other traffic?
eth1 is gw, Gb ports are switched with eth2 master port for eth3-5. And if so, are there any possible ways to optimize?
Unfortunately my CCR is used at different site so I can’t test it
My rb2011 is maxing cpu at around 50mbps download with pcc rules (dual wAn 2* 50mbps vdsl), pcq queues and capsman forwarding for 40 caps!
So propably cpu is your problem.
Please if you test with a better mikrotik router like hex rb750gr3 or ccr show us your results
Queues
Limits specified on parent Simple Queue are not working
In RouterOS if you have Simple Queues with child queues, then you have to remember that after a parent queue matches some kind of traffic the same traffic will be again checked by the child queues. It means that you have to cover an entire set of packets which are captured by the parent and there is an easy way to do it by using the copy of the parent as a child.
Example which shows how to correctly create a child Simple Queue (written on 6.34.3 RouterOS).
This is not correct because only packets with address 192.168.88.2 will be limited by queues:
When your queues don’t limit all the traffic, make sure you don’t have fasttrack enabled on this traffic, because it will cut around the queue processing.