Community discussions

MikroTik App
 
Hispeed2U
just joined
Topic Author
Posts: 5
Joined: Wed Jun 21, 2006 9:24 am

QoS / Bandwidth Shaping Problem

Fri Nov 16, 2012 1:01 am

v5.20 on a RB1100AHx2

Trying to implement simple QoS and bandwidth control to multiple users across our network using an access list, queue tree and packet-marking.

Below is some very simplified code that limits the download to users via an access list of IP addresses to 1536k and tries to prioritizes packets based on size and in this case pings (for testing).

Problem:
It does work, it shapes the bandwidth to 1536k, but instead of sharing the 1536k between all the data going to the client it seems to give 1536k to each queue type even though I have them under one main parent queue.

So if I have a web download going and start a large ping and then another download using small packets I can get 4608k through to the client.

What am I doing wrong with queue tree that makes the parent not control the overall maximum bandwidth?

This code is very sloppy, but is just some snippets to give the general idea of what is setup:
/queue type
add kind=pcq name=PCQ_down_1536K pcq-burst-rate=3M pcq-burst-threshold=1536k pcq-burst-time=5s pcq-classifier=dst-address pcq-dst-address-mask=32 pcq-dst-address6-mask=64 pcq-limit=30 pcq-rate=1536k pcq-src-address-mask=32 pcq-src-address6-mask=64 pcq-total-limit=1000

/queue tree
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=ether1-APs-BHs-1536K packet-mark=1536K-traffic parent=ether1-APs-BHs priority=8 queue=PCQ_down_1536K
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=1-ether1-APs-BHs-1536K packet-mark=small-1536K parent=ether1-APs-BHs-1536K priority=4 queue=PCQ_down_1536K
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=2-ether1-APs-BHs-1536K packet-mark=icmp-1536K parent=ether1-APs-BHs-1536K priority=2 queue=PCQ_down_1536K
add burst-limit=0 burst-threshold=0 burst-time=0s disabled=no limit-at=0 max-limit=0 name=3-ether1-APs-BHs-1536K packet-mark=large-1536K parent=ether1-APs-BHs-1536K priority=8 queue=PCQ_down_1536K

/ip firewall mangle
add action=mark-packet chain=postrouting comment="1536K - Mark 1536K packets" disabled=no dst-address-list=1536K new-packet-mark=1536K-traffic passthrough=yes
add action=mark-packet chain=postrouting comment="1536K - ICMP" disabled=no dst-address-list=1536K new-packet-mark=small-1536K passthrough=no protocol=icmp
add action=mark-packet chain=postrouting comment="1536K - Small packets" disabled=no dst-address-list=1536K new-packet-mark=small-1536K packet-size=0-499 passthrough=no
add action=mark-packet chain=postrouting comment="1536K - Large packets" disabled=no dst-address-list=1536K new-packet-mark=large-1536K packet-size=500-1500 passthrough=no
add action=mark-packet chain=postrouting comment="1536K - All Other - Mark LARGE" disabled=no dst-address-list=1536K new-packet-mark=large-1536K passthrough=no

Who is online

Users browsing this forum: Amazon [Bot], amt, cyrq, Erbit, jaclaz, lurker888, smirgo and 105 guests