Community discussions

MikroTik App
 
di9383
just joined
Topic Author
Posts: 23
Joined: Thu Oct 15, 2009 11:29 am

Queueing with dst-address priority

Tue Dec 01, 2009 10:39 am

Hello. I'm using this scheme in my network. But I upgraded it a little for my needs. I have 2 groups of internal IP addresses. I need to set a priority for each group AND to give equal bandwith IN each group. As I understood, I can do it, using PCQ. So, I've got something lile this:
ip firewall mangle pr
1   ;;; UP TRAFFIC
    chain=prerouting in-interface=lan 
    src-address=192.168.0.0/24 action=mark-packet 
    new-packet-mark=test-up passthrough=no 

2   ;;; CONN-MARK
    chain=forward src-address=192.168.0.0/24 
    action=mark-connection 
    new-connection-mark=test-conn passthrough=yes 

3   ;;; DOWN-DIRECT priority
    chain=forward dst-address-list=priority
    action=mark-packet 
    new-packet-mark=down priority passthrough=no
    in-interface=public connection-mark=test-conn

4   ;;; DOWN-DIRECT other
    chain=forward dst-address-list=other
    action=mark-packet 
    new-packet-mark=down other passthrough=no
    in-interface=public connection-mark=test-conn

5   ;;; DOWN-VIA PROXY priority
    chain=output out-interface=lan 
    dst-address-list=priority action=mark-packet 
    new-packet-mark=down priority passthrough=no

6   ;;; DOWN-VIA PROXY other
    chain=output out-interface=lan 
    dst-address-list=other action=mark-packet 
    new-packet-mark=down other passthrough=no


So, as I can see, packets are being marked. After this I add two PCQ WITHOUT setting pcq rate - I DON'T need to limit downloading if there is enough bandwith. But I DO want to give more speed to users that are in priority group:
queue type pr
0 name="all-down" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=dst-address pcq-total-limit-2000
1 name="all-up" kind=pcq pcq-rate=0 pcq-limit=50 pcq-classifier=src-address pcq-total-limit-2000

queue tree pr

0  name="downstream priority" parent=lan packet-mark=down priority 
    limit-at=0 queue=all-down priority=1 
    max-limit=256000 burst-limit=0 
    burst-threshold=0 burst-time=0s

1  name="downstream other" parent=lan packet-mark=down other 
    limit-at=0 queue=all-down priority=8 
    max-limit=256000 burst-limit=0 
    burst-threshold=0 burst-time=0s

2  name="upstream" parent=global-in packet-mark=test-up 
    limit-at=0 queue=all-up priority=8 
    max-limit=128000 burst-limit=0 
    burst-threshold=0 burst-time=0s
For upstream I don't use priority I just split it equal for everyone, using PCQ.
So, as I understood, all my users can use all download bandwith (by setting up max-limit). But will my priorities be working in that case? Or I should set limit-at? Or, may be, I have a mistake, and I have to do it in another way? Any help will be appreciated.
Asking about this, because as I can see packets are being marked, but priorities are not working.