Page 1 of 1

Subnet Burstable Bandwidth Howto

Posted: Sun Oct 31, 2004 7:03 pm
by arushalink
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.

Posted: Mon Nov 01, 2004 2:42 pm
by edzix
you're right, you have to use PCQ. Have you seen examples available in the documentation:
http://www.mikrotik.com/docs/ros/2.8/ro ... t#6.54.7.5
http://www.mikrotik.com/docs/ros/2.8/ho ... nt#12.2.13

Edgars

Posted: Tue Nov 02, 2004 9:50 am
by arushalink
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.

Posted: Tue Nov 02, 2004 11:36 am
by Roman
I have tried the examples and the result slowed down my clients even more. This is what I did.
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
try to remove burst-(limit|count|threshold) from queue tree

Posted: Tue Nov 02, 2004 12:29 pm
by arushalink
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.

Posted: Tue Nov 02, 2004 12:50 pm
by Roman
then you have to use max-limit and limit-at

Posted: Wed Nov 03, 2004 8:58 am
by arushalink
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.

Posted: Wed Nov 03, 2004 12:34 pm
by rz8168
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.

Posted: Wed Nov 03, 2004 1:20 pm
by Roman
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)

Posted: Sat Nov 06, 2004 12:51 am
by gianluca
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.