Community discussions

MikroTik App
 
mindaugasr
newbie
Topic Author
Posts: 49
Joined: Wed Oct 07, 2009 9:08 pm

Queues PCQ with priorities problem

Wed Aug 25, 2010 6:38 pm

Hello,
We try to build PCQ type queues for our network, we for example 192.168.2.0/24 network and need for each user to give 6mbps download traffic and prioritize for example to port 80 (max 6mbit traffic) and 81 (max 5mbit traffic), 80 port with 1 priority, 81 port with 8 priority. We make almost all setup but, priorities does not work. Can Anyone tell me where is problem?
My config:
Mangle:
admin@MikroTik] > /ip firewall mangle
[admin@MikroTik] /ip firewall mangle> print
Flags: X - disabled, I - invalid, D - dynamic
0 chain=forward action=mark-connection new-connection-mark=lan_con
passthrough=yes dst-address-list=corp

1 chain=forward action=mark-packet new-packet-mark=lan_pack passthrough=no
dst-address-list=corp connection-mark=lan_con

2 chain=prerouting action=mark-connection new-connection-mark=80_con
passthrough=yes protocol=tcp src-port=80

3 chain=prerouting action=mark-packet new-packet-mark=80_pack passthrough=no
connection-mark=80_con

4 chain=prerouting action=mark-connection new-connection-mark=81_con
passthrough=yes protocol=tcp src-port=81

5 chain=prerouting action=mark-packet new-packet-mark=81_pack passthrough=no
connection-mark=81_con
[admin@MikroTik] /ip firewall mangle>


Address list:
Flags: X - disabled, D - dynamic
# LIST ADDRESS
0 Lan 192.168.2.2
1 corp 192.168.2.2
2 corp 192.168.3.2


Queue types:
0 name="default" kind=pfifo pfifo-limit=50

1 name="ethernet-default" kind=pfifo pfifo-limit=50

2 name="wireless-default" kind=sfq sfq-perturb=5 sfq-allot=1514

3 name="synchronous-default" kind=red red-limit=60 red-min-threshold=10 red-max-threshold=50 red-burst=20
red-avg-packet=1000

4 name="hotspot-default" kind=sfq sfq-perturb=5 sfq-allot=1514

5 name="down_web" kind=pcq pcq-rate=6000000 pcq-limit=40 pcq-classifier=dst-address pcq-total-limit=3000

6 name="down_other" kind=pcq pcq-rate=5000000 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000

7 name="total_down" kind=pcq pcq-rate=6000000 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit=2000

8 name="default-small" kind=pfifo pfifo-limit=10

Queue tree:
Flags: X - disabled, I - invalid
0 name="queue1" parent=global-out limit-at=0 priority=8 max-limit=100M burst-limit=0 burst-threshold=0
burst-time=0s

1 name="queue4" parent=queue1 packet-mark=lan_pack limit-at=0 queue=total_down priority=8 max-limit=100M
burst-limit=0 burst-threshold=0 burst-time=0s

2 name="queue5" parent=global-in limit-at=0 priority=8 max-limit=100M burst-limit=0 burst-threshold=0 burst-time=0s

3 name="queue6" parent=queue5 packet-mark=80_pack limit-at=0 queue=down_web priority=1 max-limit=100M burst-limit=0
burst-threshold=0 burst-time=0s

4 name="queue7" parent=queue5 packet-mark=81_pack limit-at=0 queue=down_other priority=8 max-limit=100M
burst-limit=0 burst-threshold=0 burst-time=0s

Also interesting things happen if we manually for queue5 set max-limit to 6mbps then queues priority begin to work, problem is we need queue5 work like PCQ style with priorities. For example if User hit 5 mbps traffic via 81 port, web surfing must take advantages in all condition -> 81 port traffic must decrease to minimum. We try setup by Qos Megis presentation http://mum.mikrotik.com/presentations/C ... _Megis.pdf in last page of presentation Megis declared PCQ queues should work with priorities. We try 4.11 5beta6 but no luck. Maybe this is mikrotik routerOS problem? Thanks for any help!
Best regards to all mikrotik peoples
You do not have the required permissions to view the files attached to this post.
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Queues PCQ with priorities problem

Wed Aug 25, 2010 6:55 pm

It looks like you're trying to do the prioritizing within PCQ queues. That will not work. You can only GLOBALLY prioritize one protocol over another, and then later strictly rate limit the user.

If you have the situation that overall your router has plenty of bandwidth available but one user is torrenting and trying to browse the web at the same time, you cannot ensure that his web browsing is served first if you're using PCQ. You can, however, make sure that if your router overall is running out of bandwidth it will deal with HTTP first, and with other things with a lower priority. That ensures that users generally speaking will be able to, for example, browse the web even when your uplink or backbone is saturated.

The basic idea of priority + PCQ is to:
- mark packets very early (in prerouting) by protocol - this has nothing to do with per user
- have a very early queue that polices all traffic going through the router and, if the queue is getting full (a queue for all traffic, from all users together), prioritizes some protocols over others
- remark packets based on what user they are coming from or are going to
- strictly rate limit per user - this has nothing to do with protocols
 
mindaugasr
newbie
Topic Author
Posts: 49
Joined: Wed Oct 07, 2009 9:08 pm

Re: Queues PCQ with priorities problem

Wed Aug 25, 2010 7:17 pm

Thanks for reply,
But why priorities start work if we queue5 set max-limit to 6mbps, for one user this situation is what we need, but second user have limited queue5 to 6 mbps, then 80,81 port traffic queue is full and all users share 6mbps not 100mbps.
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8709
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: Queues PCQ with priorities problem

Mon Sep 06, 2010 9:52 pm

try to set limit-at=100M for queue6

anyway, there's no 'strict' priorities in HTB
 
ganniii
just joined
Posts: 18
Joined: Thu Oct 21, 2010 4:04 pm

Re: Queues PCQ with priorities problem

Thu Oct 21, 2010 4:31 pm

It looks like you're trying to do the prioritizing within PCQ queues. That will not work. You can only GLOBALLY prioritize one protocol over another, and then later strictly rate limit the user.

If you have the situation that overall your router has plenty of bandwidth available but one user is torrenting and trying to browse the web at the same time, you cannot ensure that his web browsing is served first if you're using PCQ. You can, however, make sure that if your router overall is running out of bandwidth it will deal with HTTP first, and with other things with a lower priority. That ensures that users generally speaking will be able to, for example, browse the web even when your uplink or backbone is saturated.[/b]

The basic idea of priority + PCQ is to:
- mark packets very early (in prerouting) by protocol - this has nothing to do with per user
- have a very early queue that polices all traffic going through the router and, if the queue is getting full (a queue for all traffic, from all users together), prioritizes some protocols over others
- remark packets based on what user they are coming from or are going to
- strictly rate limit per user - this has nothing to do with protocols
Hi, new user here. neem messing around with an RB750G for a few months now setting up simple stuff. I'm currently working on implementing something like this (part in bold) but cannot get anywhere. My setup is as follows:

Image

What I'm planning on doing, is prioritize HTTP over any other traffic. FOr example, I have a 15 MBit DSL connection, and its maxed out. When browsing I need to lower the speed of all other traffic to 4Mbit (or any other number such as to allow fast browsing and downloads over http).

For downloads, at the moment I'm setting the Max Limits at 15MBit for parent, 15Mbit for HTTP and 15Mbit for Other. When other traffic is running, HTTP traffic is not getting the priority, but rather take the little bandwidth that left. When both are being used, I want http to max out, and all other bandwidth gets lowered immediately.

Any idea what I'm doing wrong here?

Cheers

Who is online

Users browsing this forum: bertus and 97 guests