Community discussions

MikroTik App
 
WiFiStudent
just joined
Topic Author
Posts: 7
Joined: Wed Jun 02, 2004 2:30 pm

QOS: Shaping traffic with priorities and variable ADSL bandw

Sat Jun 26, 2004 7:15 pm

The setup below is working fine, but I have a 2-8mbps ADSL line and my bandwith is variabel between 2mbps and 8mbps.

The setup below works like a great, but only when Max-Limit of Queue ALL-DL < Current ADSL speed.

I could set Max-Limit to a low value that's always true, but offcourse I would like to bennefit from my highspeeds when possible.

I the ADSL speed drops below the specified Max-Limit of All-DL then MT doesn't shape as it is supposed to do. It just tries to distributes the traffic evenly.

Any suggestions ?


Queue HighPriority has Priority set to 1
Queue LowPriority has Priority set to 8
Image[/img]
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Fri Jul 02, 2004 1:54 pm

You need to specify limit-at value as the lowest possible ADSL line speed.
 
WiFiStudent
just joined
Topic Author
Posts: 7
Joined: Wed Jun 02, 2004 2:30 pm

Fri Jul 02, 2004 6:45 pm

Thanks for your reply !

I tried your suggestion but it didn't have the result I was hoping for. I set Limit at 1mbits. I started a download job in the Low Priority Queue, this job is taking 100% of the bandwith. Then I started a Second download job in the High Priority Queue. The result can be seen with the included image. If MT is shaping correct, then the low priority queue wil drop to Limit At (100kbps). But it doesn't. It still tries to distribute the traffic evenly between the Low and High queue. Again when I specify Max Limit of All-Dl below my current max bandwith, then it's shape just as it should. The speed of LowPriority Queue then drops to 100kbps.

Any other suggestions ?

Thanks in advance !

Image[/img]
 
wjw
Frequent Visitor
Frequent Visitor
Posts: 91
Joined: Thu Jun 10, 2004 12:59 am
Location: New Zealand
Contact:

Sat Jul 03, 2004 5:58 am

What priority is each queue set to?
 
WiFiStudent
just joined
Topic Author
Posts: 7
Joined: Wed Jun 02, 2004 2:30 pm

Sat Jul 03, 2004 1:53 pm

High P is set to 1
Low P is set to 8
The rest is set to default 8
 
wjw
Frequent Visitor
Frequent Visitor
Posts: 91
Joined: Thu Jun 10, 2004 12:59 am
Location: New Zealand
Contact:

Sat Jul 03, 2004 2:23 pm

hmm well maybe you could set the secondary high queues to 7, that may help.... the other option is that it could be something to do with the firewall mangle rules.. I had issues with trying to get a set of IP's running at 5mbps when accessed locally and 1mbps when remote.... fidled with accept/passthrough and that fixed it....
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Sun Jul 04, 2004 3:59 pm

can you connect to your router with telnet and post printouts from
/ip firewall mangle export
and
/queue export
commands?
 
WiFiStudent
just joined
Topic Author
Posts: 7
Joined: Wed Jun 02, 2004 2:30 pm

Mon Jul 05, 2004 12:25 am

I tried to set inner queue's to priority 7, but this did not have any effect.

Again thanks for all your efforts uptil now!

Here are the exports from my mangle queue setup:

/ ip firewall mangle
add src-address=:119 in-interface=Internet protocol=tcp action=accept \
mark-flow=DL-NNTP comment="" disabled=no
add in-interface=Internet p2p=all-p2p action=accept mark-flow=DL-P2P \
comment="" disabled=no
add src-address=:80 in-interface=Internet protocol=tcp action=accept \
mark-flow=DL-HTTP comment="" disabled=no
add src-address=130.89.1.223/32 in-interface=Internet flow=!P2P \
action=accept mark-flow=UT-VPN comment="" disabled=no
add in-interface=Internet action=accept mark-flow=DL-AllOther comment="" \
disabled=no

================================

/ queue type
set default name="default" kind=pfifo 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=0 pcq-limit=50 \
pcq-classifier=""
set ethernet-default name="ethernet-default" kind=pfifo 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=0 pcq-limit=50 \
pcq-classifier=""
set wireless-default name="wireless-default" kind=sfq 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=0 pcq-limit=50 \
pcq-classifier=""
set synchronous-default name="synchronous-default" kind=red \
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=0 pcq-limit=50 pcq-classifier=""
/ queue tree
add name="All-DL" parent=global-out flow="" limit-at=1000000 \
queue=ethernet-default priority=8 max-limit=8000000 burst-limit=0 \
burst-threshold=0 burst-time=0 disabled=no
add name="LowPriority" parent=All-DL flow="" limit-at=100000 \
queue=ethernet-default priority=8 max-limit=8000000 burst-limit=0 \
burst-threshold=0 burst-time=0 disabled=no
add name="News" parent=LowPriority flow=DL-NNTP limit-at=0 \
queue=wireless-default priority=8 max-limit=0 burst-limit=0 \
burst-threshold=0 burst-time=0 disabled=no
add name="P2P" parent=LowPriority flow=DL-P2P limit-at=0 \
queue=wireless-default priority=8 max-limit=0 burst-limit=0 \
burst-threshold=0 burst-time=0 disabled=no
add name="HighPriority" parent=All-DL flow="" limit-at=8288608 \
queue=ethernet-default priority=1 max-limit=8288608 burst-limit=0 \
burst-threshold=0 burst-time=0 disabled=no
add name="HTTP" parent=HighPriority flow=DL-HTTP limit-at=0 queue=default \
priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0 \
disabled=no
add name="UT" parent=LowPriority flow=UT-VPN limit-at=0 \
queue=wireless-default priority=8 max-limit=0 burst-limit=0 \
burst-threshold=0 burst-time=0 disabled=no
add name="Rest" parent=HighPriority flow=DL-AllOther limit-at=0 \
queue=default priority=8 max-limit=0 burst-limit=0 burst-threshold=0 \
burst-time=0 disabled=no
 
User avatar
Eugene
Forum Veteran
Forum Veteran
Posts: 993
Joined: Mon May 31, 2004 5:06 pm
Location: Cranfield, UK

Mon Jul 05, 2004 10:53 pm

First of all, non-leaf queues do not contain priority information.
Consequently, you need to change your flowmarks to get 1 flowmark for HighPriority queue and 1 flowmark for LowPriority queue.
You should also note, that the router is trying to satisfy limit-at for child queues first.

Applying all forementioned information to your case we need to configure the following queues:

/ queue tree
add name="All-DL" parent=global-out flow="" limit-at=1000000 \
queue=ethernet-default priority=8 max-limit=8000000 burst-limit=0 \
burst-threshold=0 burst-time=0 disabled=no

add name="LowPriority" parent=All-DL flow="LowPriorityFlow" limit-at=500000 \
queue=ethernet-default priority=8 max-limit=4000000 burst-limit=0 \
burst-threshold=0 burst-time=0 disabled=no

add name="HighPriority" parent=All-DL flow="HighPriorityFlow" limit-at=300000 \
queue=ethernet-default priority=1 max-limit=4000000 burst-limit=0 \
burst-threshold=0 burst-time=0 disabled=no


The (approximate!!!) order of satisfying various limits will be as follows:
1) limit-at for HP
2) limit-at for LP
3) limit-at for AD
4) 1000000 (AD limit-at) - 300000 (HP limit-at) - 500000 (LP limit-at) = 200000 -> max-limit of one of child chains
5) max-limit for AD
6) max-limits of child chains (not more, than AD max-limit)

Who is online

Users browsing this forum: Google [Bot], paweld, sunshuvo and 183 guests