Community discussions

MikroTik App
 
arushalink
just joined
Topic Author
Posts: 21
Joined: Wed Jun 30, 2004 9:15 am

Subnet Burstable Bandwidth Howto

Sun Oct 31, 2004 7:03 pm

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.
 
edzix
Member
Member
Posts: 333
Joined: Thu Jul 01, 2004 3:01 pm
Location: Latvia

Mon Nov 01, 2004 2:42 pm

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
 
arushalink
just joined
Topic Author
Posts: 21
Joined: Wed Jun 30, 2004 9:15 am

Tue Nov 02, 2004 9:50 am

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.
 
User avatar
Roman
Frequent Visitor
Frequent Visitor
Posts: 81
Joined: Wed Oct 06, 2004 11:24 am

Tue Nov 02, 2004 11:36 am

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
 
arushalink
just joined
Topic Author
Posts: 21
Joined: Wed Jun 30, 2004 9:15 am

Tue Nov 02, 2004 12:29 pm

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.
 
User avatar
Roman
Frequent Visitor
Frequent Visitor
Posts: 81
Joined: Wed Oct 06, 2004 11:24 am

Tue Nov 02, 2004 12:50 pm

then you have to use max-limit and limit-at
 
arushalink
just joined
Topic Author
Posts: 21
Joined: Wed Jun 30, 2004 9:15 am

Wed Nov 03, 2004 8:58 am

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.
 
rz8168
newbie
Posts: 43
Joined: Tue Jun 01, 2004 2:10 pm

Wed Nov 03, 2004 12:34 pm

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.
 
User avatar
Roman
Frequent Visitor
Frequent Visitor
Posts: 81
Joined: Wed Oct 06, 2004 11:24 am

Wed Nov 03, 2004 1:20 pm

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)
 
gianluca
Member Candidate
Member Candidate
Posts: 258
Joined: Sun Aug 08, 2004 11:00 pm
Location: Italy - Spain - USA

Sat Nov 06, 2004 12:51 am

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.