Subnet Burstable Bandwidth Howto

Hi!
I am limiting bandwidth for my users by adding a single rule in simple queue for each users ip. That is as follows:

1 name=“user1” target-address=172.168.0.3/32 dst-address=0.0.0.0/0
interface=all queue=default priority=8 limit-at=36000/36000
max-limit=36000/36000 burst-limit=128000/128000
burst-threshold=36000/36000 burst-time=100/100

This means if I have 200 users I will have 200 rules on simple queue. Now since Mikrotik has more than what I knw. Please give me alternative way to put just one rule that will serve the whole subnet 172.168.0.0/24 and give the same effect in terms of limiting and bursting as the above sample rule. I have heard of PCQ but have never been able to make it work on my application.

you’re right, you have to use PCQ. Have you seen examples available in the documentation:
http://www.mikrotik.com/docs/ros/2.8/root/queue.content#6.54.7.5
http://www.mikrotik.com/docs/ros/2.8/howto/howto.content#12.2.13

Edgars

I have tried the examples and the result slowed down my clients even more. This is what I did.

ip firewall mangle:

130 src-address=172.168.0.0/24 action=accept mark-flow=all

queue type:

6 name=“PCQ-Download” kind=pcq bfifo-limit=15000 pfifo-limit=50 red-limit=60
red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5
sfq-allot=1514 pcq-rate=36000 pcq-limit=50 pcq-classifier=dst-address

7 name=“PCQ-Upload” kind=pcq bfifo-limit=15000 pfifo-limit=50 red-limit=60
red-min-threshold=10 red-max-threshold=50 red-burst=20 sfq-perturb=5
sfq-allot=1514 pcq-rate=36000 pcq-limit=50 pcq-classifier=src-address

queue tree:

4 name=“queue2” parent=Local flow=all limit-at=0 queue=PCQ-Download
priority=8 max-limit=0 burst-limit=128000 burst-threshold=36000
burst-time=100

5 name=“queue4” parent=Public flow=all limit-at=0 queue=PCQ-Upload
priority=8 max-limit=0 burst-limit=128000 burst-threshold=36000
burst-time=100

Please advice if I am doing write or there is a mistake.

try to remove burst-(limit|count|threshold) from queue tree

Thanks but bursting is the main issue. Otherwise the simple queue for each user ip works ok with burst. I only need a simple rule that will apply for the whole subnet.

then you have to use max-limit and limit-at

I have added the max-limit but still the same problem. I have a feeling that there is some rules in hotspot setup and NAT which are preventing the mangle rule for pcq. Please assist if u have any idea.

Use PCQ which I’ve did to my clients. Don’t use MAX-Limit, because it will apply to whole flow instead of per client wise. Also, bursting won’t be supported as far as I concerned.

simply set max-limit and limit-at to the speed of your connection (or bandwidth you want to allow your users to use)

with PCQ there is no way to have burst. you have to use queue tree and make a rule per IP, then you can use the burst option on a deafult queue type.