Community discussions

MikroTik App
 
firebat
Member
Member
Topic Author
Posts: 389
Joined: Mon Apr 11, 2005 8:38 am

Queue Tree QOS with Simple Queue Bandwidth limiting. Help?

Sun Dec 10, 2006 5:34 am

I need some help. I am trying to perform QOS using mangle+queue trees and Bandwidth limiting per user source address using Simple Queues. Below is a description and diagram of what I would like to achieve.



DESCRIPTION:
- I am planning to prioritize VoIP, HTTP, FTP, etc using mangling in prerouting. Then using Queue trees, I will create a main PCQ Queue with a 1M/1M upload/download limit (I need help in determining where to apply it).

- Next, I will create separate sub queues (Main PCQ is parent) for VoIP, HTTP, FTP, etc and assign specific bandwidth limits per category and set corresponding Priotities.

- I will then create a main a "Main Simple Q" of type PCQ and apply it to all interfaces.

- Next, I will create separate simple queues for each user with bandwidth limits with the parent being the "Main Simple Q"

DIAGRAM(underscore is spaces):
Local Interface ------Prioritize--------Limit---------------Shape-----------------Public interface

Pre Route Mangle __PCQ Tree____Simple Queues
VoIP------------- Priority 1|________10.0.0.10 --|
HTTP------------- Priority 2|--Main----10.0.0.11 --|
FTP -------------- Priority 3| PCQ ___10.0.0.12 --|--Main Simple Q -------
P2P ------------- Priority 4|________10.0.0.13 --| (public 1M/1M limit)
____________________________10.0.0.14 --| (Applied to All INTs)


Questions:

1. Will this work?
2. In the "Prioritize" phase, what should be the parent of the "Main PCQ"? Should it be the local Interface?
3. In the "Shape" phase, if I set the "Main Simple Q" type to PCQ,will it shape all traffic by users by IP? Meaning, will it split the bandwidth evenly amongst the active users if congestions is occuring?
4. Anything that I am doing incorrectly?
 
firebat
Member
Member
Topic Author
Posts: 389
Joined: Mon Apr 11, 2005 8:38 am

Wed Dec 13, 2006 5:07 am

:( Anyone?
 
User avatar
sidney
just joined
Posts: 24
Joined: Fri Sep 15, 2006 12:15 pm
Location: South africa - Pretoria East

Wed Dec 13, 2006 8:20 am

 
firebat
Member
Member
Topic Author
Posts: 389
Joined: Mon Apr 11, 2005 8:38 am

Wed Dec 13, 2006 10:19 am

Yeah, I have read that but that doesn't answer my implementation questions. Thus the pictures and specific questions I was hoping someone could help me with.
 
firebat
Member
Member
Topic Author
Posts: 389
Joined: Mon Apr 11, 2005 8:38 am

Thu Jan 11, 2007 8:20 am

?? :(
 
pedja
Long time Member
Long time Member
Posts: 684
Joined: Sat Feb 26, 2005 5:37 am

Mon Jan 15, 2007 8:58 am

Well, I folow this forum for several years and I never saw descent help regarding QoS. What you asked now, I saw asked several times before, with no proper help.
 
titius
Member
Member
Posts: 338
Joined: Mon Oct 17, 2005 11:43 am
Location: Titel Serbia

Mon Jan 15, 2007 7:06 pm

http://forum.mikrotik.com//viewtopic.ph ... 4&start=50

this is the best you can have last few posts is what you are asking at least it is the best solution for now.

Developers of MikroTik should try to help us a little bit ;) .
 
firebat
Member
Member
Topic Author
Posts: 389
Joined: Mon Apr 11, 2005 8:38 am

Fri Jan 19, 2007 7:54 am

Thank Titus. Yeah, that is an interesting thread as well. That would work well for load balancing all connections. On top of that, I want to prioritze connection types though. Everyone on the board indicates QOS is complicated. I don't think its that complicated. I just am having an issue in trying to build the configuration that will support the example I noted at the top of the thread. If we could get some complex QOS examples posted in the WIKI, it would be much easier to figure out the correct MT config. I get the feeling the only way to get the answer is to pay someone to build the config and then you can look at it. :?
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Fri Jan 19, 2007 10:23 am

if you understand networking, and why and what is happening, and if you understand clearly what is happening in MT ROS packet flow you should not problems.

but, as usual, many users what to jump in QoS train when it is leaving the station :)

in manual, you can get the basics. if that is not enough for succesful congiration i would suggest you to attend training in QoS
 
firebat
Member
Member
Topic Author
Posts: 389
Joined: Mon Apr 11, 2005 8:38 am

Fri Jan 19, 2007 10:41 am

Hi Janisk. There really isn't enough info to understand the packetflow with regard to the MT OS implementation. That's why there are so many questions. The very basic examples in the manual are not enough. Folks have been asking for more info on QOS for a long time. It would be nice if we could get some. :wink:

I have clearly asked some simple questions at the top of this thread. No answers. :(
 
User avatar
janisk
MikroTik Support
MikroTik Support
Posts: 6263
Joined: Tue Feb 14, 2006 9:46 am
Location: Riga, Latvia

Fri Jan 19, 2007 12:13 pm

if you want to use queue tree you have to mangle traffic, if you can distinguish witch packets is what protocol you mark these packets - that is very basic.

you can implement as many packet marks you like to. as result you can have different queue tree elements to limit each traffic and prioritize it . as simple as that.

in titius post that link uses two packet marks and you can clearly see what have to be done.

just add different (what you need) markings and off you go :) also, you have to read about what queue type you need to get results you want to.

toughest part is to mark everything as you imagined not as you got it :)

scenario:
1) mark all the traffic add queue tree a rule that limits that traffic to size you want to
2) mark http traffic and give it priority you need and limitations. take in account all http downloads are downloads, you are browsing net - you download, you use filezilla to download from http - it is same type of download, just bigger is size. add corresponding queue tree branches
3) continue with marking packets so all traffic mark has less and less packets. in mangle when marking set to passthrough= no. you set mangle rules in manner that rule that marks all traffic stays last. and all the other rules are in front of it.
4) when you add any rle check if that is working as you wish.


EDIT:

in my interest is that you find your answers yourself, so you will have deeper knowledge what is happening in your router, your network, if i give solution, you will copy paste, and never know, what exactly you just copied over.

if you want complete solution, contact consultants
 
firebat
Member
Member
Topic Author
Posts: 389
Joined: Mon Apr 11, 2005 8:38 am

Sat Jan 20, 2007 6:30 am

Thanks Janisk. Most of my question are specifically regardint the implmentation I noted in my first post above (see the picture with different phases). I was hoping to get the answers to the questions I posed :)
 
User avatar
sidney
just joined
Posts: 24
Joined: Fri Sep 15, 2006 12:15 pm
Location: South africa - Pretoria East

Sat Jan 20, 2007 11:06 am

Hi to All
Being following on everyone different ideas and using sum samples then changing to suit our needs as i was always using simple queues by ip address but using the total limits as sample
interface=all parent="Master Queue" direction=both priority=4 \
queue=PCQ_Upload/PCQ_Download limit-at=256000/512000 \
max-limit=512000/767000 total-queue="PCQ Total" total-limit-at=384000 \
total-max-limit=512000 total-burst-limit=767000 \
total-burst-threshold=448000 total-burst-time=4s disabled=no
add name="Josef" target-addresses=10.0.50.1/32 dst-address=0.0.0.0/0 \
interface=all parent="Master Queue" direction=both priority=4 \
queue=PCQ_Upload/PCQ_Download limit-at=256000/512000 \
max-limit=512000/767000 total-queue="PCQ Total" total-limit-at=384000 \
total-max-limit=512000 total-burst-limit=767000 \
total-burst-threshold=448000 total-burst-time=4s disabled=no
add name="Prof Makinde" target-addresses=10.0.50.2/32 dst-address=0.0.0.0/0 \
interface=all parent="Master Queue" direction=both priority=4 \
queue=PCQ_Upload/PCQ_Download limit-at=256000/512000 \
max-limit=512000/767000 total-queue="PCQ Total" total-limit-at=384000 \
total-max-limit=512000 total-burst-limit=767000 \
total-burst-threshold=448000 total-burst-time=4s disabled=no
also using the PCQ as queue type as
add name="PCQ_Upload" kind=pcq pcq-rate=0 pcq-limit=50 \
pcq-classifier=src-address pcq-total-limit=2000
add name="PCQ_Download" kind=pcq pcq-rate=0 pcq-limit=50 \
pcq-classifier=dst-address pcq-total-limit=2000
add name="PCQ Total" kind=pcq pcq-rate=0 pcq-limit=50 \
pcq-classifier=src-address,dst-address pcq-total-limit=2000
add name="default-small" kind=pfifo pfifo-limit=10
i was told before this can't work but for me it is working fine as a client is busy downloading it would go in red to limit them at +- 450kpps = 55kBps witch is fine for us now i have testing mangle as Janisk's sample marking the packets as new and old


/ip firewall mangle add chain=forward protocol=tcp action=mark-connection new-connection-mark=new_conn passthrough=yes comment="mark all new connections" disabled=no
/ip firewall mangle add chain=forward protocol=tcp connection-mark=new_conn connection-bytes=0-2000000 action=mark-packet new-packet-mark=new_packet passthrough=no comment="mark packets" disabled=no
/ip firewall mangle add chain=forward protocol=tcp connection-mark=new_conn action=mark-packet new-packet-mark=old_packets passthrough=no comment="marking old packets" disabled=no
hen the queue trees
queue tree
add name="Main_Upload" parent=ether2 packet-mark="" limit-at=0 queue=default \
priority=8 max-limit=4000000 burst-limit=0 burst-threshold=0 burst-time=0s \
disabled=no
add name="Up First 2Mbit" parent=Main_Upload packet-mark=new_packet \
limit-at=2000000 queue=PCQ_Upload priority=5 max-limit=4000000 \
burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="Up Rest Mbits" parent=Main_Upload packet-mark=old_packets \
limit-at=1000000 queue=PCQ_Upload priority=8 max-limit=4000000 \
burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="Main_Download" parent=global-out packet-mark="" limit-at=0 \
queue=default priority=8 max-limit=4000000 burst-limit=0 burst-threshold=0 \
burst-time=0s disabled=no
add name="Down First 2Mbit" parent=Main_Download packet-mark=new_packet \
limit-at=2000000 queue=PCQ_Download priority=5 max-limit=4000000 \
burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
add name="Down Rest Mbits" parent=Main_Download packet-mark=old_packets \
limit-at=1000000 queue=PCQ_Download priority=8 max-limit=4000000 \
burst-limit=0 burst-threshold=0 burst-time=0s disabled=no
Now it is working fine as I'm being monitoring the clients i see in the queue tree the bandwidth is great and then in the simple queues as i left them as is it still locks the clients bandwidth as i had before

Now this is the only way we learn to use QOS by trial and error
I know is not what you want but try with setting up all your simple queues with per user source address and then setup your mangle with the queue trees as you need them because this is the only way to learn and i know every-ones setup is different so if swapping ideas it might help and please correct me if I'm wrong would always like to improve my self and just waiting for a mikrotik course to attend as soon as it near us

Sidney 8)
 
User avatar
samsoft08
Long time Member
Long time Member
Posts: 613
Joined: Sat Nov 26, 2005 10:52 pm

Sun Jan 21, 2007 5:06 pm

let's assume the following :

--packets----> sat modem ----> MT -----> user

---stage1----> sat modem ----> MT --stage2---> user

if we made a perfect QoS rules , very perfect lets say , this QoS will effect stage 2 of course .. but would it effect stage 1 ??

lets say , a user is downloading a big file , and another user begins a browsing , the MT will give the new packets of the browser the highest priority , of course that will be in stage 2 , but what about the stage 1 ??
does the browser user packets will get the highest priority also in stage 1 ?

Who is online

Users browsing this forum: Bing [Bot], Fi011 and 200 guests