Community discussions

MikroTik App
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

How Queues are processed?

Mon Aug 09, 2010 8:43 pm

Hey,

I am just wanting to know how ROS deals with queues, esp ons that overlap if you know what i mean.


So say you have a simple que limiting all traffic from the iprange 192.168.1.0/24 to 128kbps up& down.

then below you have a que that is giving VoIP traffic full access with a priority of 2.


Now how will voip data from a pc on the 192.168.0.1/24 network be limited?

Will it be limited to 128 or will it have unlimited access?

Also:
What is the default priority of data/traffic that has not been que'ed ?

Thanks.
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Mon Aug 09, 2010 10:07 pm

Mikrotik shows Queues rather oddly IMHO.

It goes against common sense to Queue some traffic to speed it up.

However, what isn't obvious is that ALL traffic is queued in Queue Prio 8 by default it seems.

So, if you add a stream of traffic to Queue Prio 1-7, then it will have priority over all the rest of the traffic.

I saw a thing that suggested that some stuff is already queued at higher priorities, so it might be that some traffic, such as RIP, OSPF etc has some priority by default.

The Best place to look is on google for Linux Advanced Routing and Traffic Control (LARTC).

It's heavy reading, but it's all there. You need to Translate it into Mikrotik-Speak though if you want to use it on MT. (Skip CBQ as HTB supercedes it)
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Mon Aug 09, 2010 10:24 pm

Oh ok,

I see. So its not just a simple little precedure.

Its silly that its defaulted to 8.

Cause then making a queue that makes p2p 8 wont make it any faster than any other traffic. It should be defaulted at 4 ????

cant you make a cue that sets every thing to 4. So like mark ever packet, then the cue picks it up and makes it 4. Then your p2p WILL be slower???

So what does Parent Queue mean? if you have a que under a parent cue, does that mean that both rules will apply to it?
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Tue Aug 10, 2010 12:03 am

there can be queues within queues within queues .... and so on.

E.g.

Let's say you want to have HTTP, DNS and POP go fast.

Just use the IP-Firewall-Forward tables, and make a Packet Mark (for example).

Create a new simple queue (Queue trees take more planning).

Add a new Queue, give it some guaranteed bandwidth, and select the Packet Mark you set.

All HTTP, DNS and POP will then have priority over all the other stuff - i.e. go faster (if ther's enough traffic to tell the difference).

To properly understand all this, i agree with fewi - you need training.
It is simply too complex to explain in simple messages like this.

I'm such a genius that i just sniffed the edge of the book and understood it all.
Queue Trees are much more powerful, but much more complex.
I had to actually open the book and lick the 1st page before i got it.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Thu Aug 12, 2010 3:21 pm

Oh ok,


No i see;

K one question, i was looking at the wiki aand i couldnt quete make it out.


Say i want to que voip, http and p2p on my internet connection:

cant i create a master simple que, where i limit the traffic to my internet speed (upload and downlaod)
and then make the voip,web,p2p ques its "child"

and then the 3 kids will sort them selvs out in terms or priorities?

or is what im talking about PCQ?


I want to control 3 protocols on a "tunnel" .
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Fri Aug 13, 2010 12:59 am

There are many many ways of doing this.

The simplest thing is make a 'Parent' queue, and then, as you guessed, make 'Child' queues under it - with each traffic type having a different Priority.

The Whole traffic will be subject to the Parent Queue, and, like you say, the Children wll fight for their share of what the Parent allows.

Traffic through the Child with higher Priority will have more speed (kind of), but a lower priority Child's traffic could have it all if the other two have no traffic thru them.

QoS is so mind-bogglingly complex, and there are so many possible 'solutions' that you really should go on a traffic management course.

At the very least, you would learn what the Options are.

You could also read the LARTC as well, which is what ROS draws on - the underlying Linux queing.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Fri Aug 13, 2010 1:15 am

Oh thanks,

Yea i agree, Queues are mind boggaling, you can do it so so many differnt ways and each one is better than the other.

It would be good to hear some oppiniouns and advice on each different setup. Cause the wiki dont really give you that.

:)
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Sat Aug 14, 2010 12:40 am

Zappa - you got to TRY stuff and LEARN.

Set yourself up behind a mikrotik and apply some queues to yourself.

If you don't want to spend 2 days or a Week on a course, you got to follow the Super-Nerds like me, and spend months fiddling with yourself.

(more correctly speaking, the queues etc that you have applied to yourself)
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Mon Aug 16, 2010 12:48 am

I do,

I fiddle loads, All the time, I spend many nights playing with the dam things for hours on end. I just like some forum assitance when i get stuck while playing. I allways play then look on wiki then as on forum.

And i do want to go on course, i just cant.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Wed Aug 25, 2010 12:29 am

May you explain to me the difference between

Queue Type: default / default-small


cause it is default-small as default setting but then it dont show statistics or any thing under the que,
but then if i change it to default it does.


Can some ones lease simple point out the difference between the 2 or give me a link explaining it?
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Sat Sep 11, 2010 11:30 pm

Queues are quite complicated.

default and default-small are just names MT give 'em.

Look under Queues->Queue Types to find out what they really are.

i think 'default' means pfifo, and 'default-small' means sfq by, er, default.

pfifo = first in-first-out, or no real queuing at all (by packet, hence the 'p')
As soon as the packets can go out they will go out, in the same order they came in.

sfq = stochastic fair queuing, which is more difficult to understand.
Basically it will try and send packets from each 'stream' out in a fair manner, by predicting the future.

You need to google LARTC and read what you find.

Queues are complicated. MT made them easier to get working.

If you really want to understand traffic conditioning etc, you have to read, re-read, and understand the LARTC.

There is no way i can adequately describe fifo, pfifo, sfq, htb, cbq, red
and the rest in a few forum posts.

Queuing is 'Where It Is At', and you will reap rewards on this earth and in Heaven by understanding how it's done.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Tue Sep 21, 2010 6:56 pm

I was bust playign with ques yesterday and i noticed some thing.

I am trying to mark packets under mangle in firewall.

I am marking them by src IP LISt.
but it only mangle the computer UPLOAD and not the download?

So i tried dst address list and that didnt mark anything?

What am i doing wrong?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: How Queues are processed?

Tue Sep 21, 2010 7:34 pm

Post the configuration you tried. Include all the mangle rules and all address lists, your NAT configuration, and your queues.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Tue Sep 21, 2010 9:52 pm

Sorry,

I forgot what i type in terminal to get the config for that?

Soz :(
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: How Queues are processed?

Tue Sep 21, 2010 9:57 pm

/ip firewall mangle export
/ip firewall nat export
/ip firewall address-lists export
/queue export
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Tue Sep 21, 2010 10:06 pm

ip firewall mangle
add action=mark-packet chain=prerouting comment=Howard disabled=no \
new-packet-mark=Howard passthrough=yes port=80 protocol=tcp \
src-address-list=Howard
add action=mark-packet chain=prerouting comment=Hyslop disabled=no \
new-packet-mark=Hyslop passthrough=yes port=80 protocol=tcp \
src-address-list=Hyslop_Ips
add action=mark-packet chain=prerouting comment=Internet disabled=no \
new-packet-mark=Internet passthrough=yes port=80 protocol=tcp



/ip firewall nat
add action=masquerade chain=srcnat comment="default configuration" disabled=\
no

/ip firewall address-list
add address=192.168.1.5 comment="" disabled=no list=Hyslop_Ips
add address=192.168.1.64 comment="" disabled=no list=Hyslop_Ips
add address=192.168.1.68 comment="" disabled=no list=Hyslop_Ips
add address=192.168.1.63 comment="" disabled=no list=Hyslop_Ips
add address=192.168.1.69 comment="" disabled=no list=Howard
add address=192.168.1.26 comment="" disabled=no list=Howard
add address=192.168.1.25 comment="" disabled=no list=Howard


/ip firewall address-list
add address=192.168.1.5 comment="" disabled=no list=Hyslop_Ips
add address=192.168.1.64 comment="" disabled=no list=Hyslop_Ips
add address=192.168.1.68 comment="" disabled=no list=Hyslop_Ips
add address=192.168.1.63 comment="" disabled=no list=Hyslop_Ips
add address=192.168.1.69 comment="" disabled=no list=Howard
add address=192.168.1.26 comment="" disabled=no list=Howard
add address=192.168.1.25 comment="" disabled=no list=Howard



Its just that i have connected my friend "Howard" next door to me, to my internet connection and i want to make his internet usage less priority than mine?

So i made all internet 6 and then his 8 and mine (Hyslop) 4
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: How Queues are processed?

Tue Sep 21, 2010 10:14 pm

When you are marking based on dst-address-list you can't do so in prerouting if you're also performing NAT on the packets that will be marked.

http://wiki.mikrotik.com/wiki/Manual:Packet_Flow

Look at how early prerouting mangle is in the packet flow. The NAT you are performing won't have been undone yet, so the destination IP address of the packet is still the public IP address that the router translated the packet to when performing the masquerade. Shift the downstream marking to 'forward' or 'postrouting' and packets will get marked correctly. Upstream you can do in prerouting because you're marking based on src-address-list, and the source IP address is the real IP address (since the packet is coming directly from the real IP address of the client). Source NAT happens very late in the game so pretty much any chain is fine for upstream.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Tue Sep 21, 2010 10:24 pm

Oh i see.


So keep what i have for UPLOAD

and then create new ones for dst address with postrouting?


Thanks my man,

I thought it had some thing to do with NAT



and must passthrough be clicked?
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: How Queues are processed?

Tue Sep 21, 2010 10:31 pm

Yes.

Alternatively, mark the connection - tracking for that is done before prerouting mangle. You would basically mark the connection immediately and then could mark the packets based on the connection mark both ways in prerouting and decide what is upload and download based on in-interface (download has an in-interface facing the WAN, upload has an in-interface facing the LAN). Based on how your head works that might seem more or less complicated to you. There's always more than one way to do it.
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Sun Sep 26, 2010 11:02 pm

passthrough means 'process the rest of the steps or not'

if you tick it, then any rule below the one you're talking about has a chance to change stuff.

Un-tick it, and the rule you made is the Final Answer.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Mon Sep 27, 2010 7:07 am

Oh ok, i see.

Thanks :)
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Tue Sep 28, 2010 10:58 pm

You might have noticed that you can drag a rule up or down in the list.

That's so you can set the Order in which they get processed.

The Order can be very important.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Tue Sep 28, 2010 11:47 pm

LOL @ ur avatar.

are u talking with mangle or queues?
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Wed Sep 29, 2010 12:08 am

Filter, NAT and Mangle.

Queues are different.
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Wed Sep 29, 2010 12:09 am

LOL @ ur avatar.
What avatar ?

Mine's a Webcam and i just put my specs on.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Wed Sep 29, 2010 12:26 am

Its the dog with normises face
 
User avatar
normis
MikroTik Support
MikroTik Support
Posts: 26385
Joined: Fri May 28, 2004 11:04 am
Location: Riga, Latvia

Re: How Queues are processed?

Wed Sep 29, 2010 1:25 pm

Its the dog with normises face
what dog? i have seen him, it's his picture
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Wed Sep 29, 2010 3:43 pm

U had me fooled there for a moment, i 1st thought it was father xmas... haha
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Tue Oct 19, 2010 8:36 am

Hello again.

Ok so i have been playing around wiht packet marking and i still cannot get download to work.

Ok i used a simple one to test:


i am just trying to mark tcp traffic on port 80 ( all web traffic)

but in my cue it only has Upload and no download:

So i created 2 mangle rules:

1: preroute
tcp:
port: DST 80
mark packet: web passthrough


then for the 2nd one ( the one i want to mark downloading traffic)
I tried all of the: pre,postrouting,input,output and forward with both dst and src port set to 80>

and i never got any download in my que traffic?

Please help.
 
akosenko
newbie
Posts: 48
Joined: Fri Aug 21, 2009 8:56 am
Location: Lipetsk, Russia

Re: How Queues are processed?

Tue Oct 19, 2010 9:51 am

Zapnologica

please, try this example, must help:

1)Mark Upload traffic. If u are use NAT on your router u can mark your upload traffic in mangle prerouting OR mangle forward, OR mangle postrouting (see packet-flow diagram):

1.1) Mangle prerouting:

chain=prerouting action=mark-packet new-packet-mark=my_upload passthrough=no src-address-list=inet_users in-interface=lan


1.2) Mangle forward:

chain=forward action=mark-packet new-packet-mark=my_upload passthrough=no src-address-list=inet_users out-interface=wan1


1.3) Mangle postrouting:

chain=postrouting action=mark-packet new-packet-mark=my_upload passthrough=no src-address-list=inet_users out-interface=wan1

2) Mark Download traffic. If u are use NAT on your router u can mark your download traffic in mangle forward OR mangle postrouting (see packet-flow diagram):


2.1) Mangle forward:

chain=forward action=mark-packet new-packet-mark=my_download passthrough=no dst-address-list=inet_users in-interface=wan1


2.2) Mangle postrouting:

chain=postrouting action=mark-packet new-packet-mark=my_download passthrough=no dst-address-list=inet_users out-interface=lan


Queue Tree.

If you are use marks from mangle prerouting then u must make queues in global-in interface, if u use marks from mangle forward or mangle postrouting - then u must make queues in global-out interface OR outgoing interface. If u want use PCQ queue type for NATed upload traffic, the you must use ONLY global-out interface (not outgoing interface) for queues, otherwise PCQ don't work properly, because PCQ queues don't know src-address of LAN clients if u use it after NAT (see packet-flow diagram).

I advise you to read: http://wiki.mikrotik.com/wiki/NetworkPr ... of_Service , http://wiki.mikrotik.com/wiki/Manual:Packet_Flow

P.S. Sorry for my Broken English, I hope my information will help you.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Tue Oct 19, 2010 7:02 pm

Thank you very much:

That one post of yours has given me such a better understanding of the whole marking process:

Thank u so much.

Ur english was perfect, better than me and im english haha
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Tue Oct 19, 2010 10:37 pm

what dog? i have seen him, it's his picture
Cheers Normis. I get fed up explaining about my Ancestors in the Ruski Sputnik dog-breeding programme.

Just cos i'm a dog dunt mean i can't do technology.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Thu Oct 28, 2010 3:34 pm

i have been playing around,

and the "forward mangles donot seem to work" ?

why would this be?

I tried create the ques on lan and that worked, but the prioriry does not work.

So i am trying to create the que on the wan interface?

Do u use forward for that?
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Thu Oct 28, 2010 10:05 pm

> and the "forward mangles donot seem to work" ?

Depends on whether the packet's you're expecting are being Forwarded.

E.g. : a packet destined for the Router you're on will not hit the Forward rule - it will hit the Input rule.

Queue Priority does work, but it is unclear (to me) if MT implement a true Prio queue above the HTBs or not.

Even if you set Priorities, remember that all of this works on a packet-by-packet basis, and the router can process packets very quickly, so do not expect something to stop just because there is a higher Prio bit of data passing by.

Another thing you got to know is that the Queue acts on packets *leaving* an interface.
(IMQ confuses all that, so ignore global-in.out etc for now).
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Thu Oct 28, 2010 10:27 pm

Ok when i say it ont work, i mean:

i set SIP as priority 1 and RDP as 2 and web as 4:

now as far as i belive, if i am on web, and i make a VOIP call, it should allow all VOIP packets thoough before the WEB therfore no laag?

but when i phone on VOIP and was on remote desktop, the voip call lagged like hell and the rdp was slow?

I just did a simple que.

marked the up and download traffic like u said and then used simple queues with a master parent.


So what must my mangle rule be to mark downloading traffic so that i can put the queue on the wan interface?


I am busy reading up on queue trees and PCQ ( sounds terrible confusing) my goal in life ( well in my mikrotik life) is to set up a crazy shaping and network priority router, where it works perfectly, and the mangles use packes sizes and all those crazy things under advanced :)
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: How Queues are processed?

Fri Oct 29, 2010 1:26 am

Ok when i say it ont work, i mean:

i set SIP as priority 1 and RDP as 2 and web as 4:

now as far as i belive, if i am on web, and i make a VOIP call, it should allow all VOIP packets thoough before the WEB therfore no laag?

but when i phone on VOIP and was on remote desktop, the voip call lagged like hell and the rdp was slow?

I just did a simple que.

marked the up and download traffic like u said and then used simple queues with a master parent.


So what must my mangle rule be to mark downloading traffic so that i can put the queue on the wan interface?


I am busy reading up on queue trees and PCQ ( sounds terrible confusing) my goal in life ( well in my mikrotik life) is to set up a crazy shaping and network priority router, where it works perfectly, and the mangles use packes sizes and all those crazy things under advanced :)
Then you're going to want to move from simple queues over to queue trees sooner rather than later. The queue trees give you a lot more options and a setup you can deal with.

As adrianatkins said, the interface you place the queue on is just for traffic leaving that interface, the router cannot control the traffic it has received on an interface, it can only control what it is sending out of the interface. So something like this will get you started on a queue tree. You can make sub branches as you classify things more in your mangle and make more packet marks. You basically need a tree for each LAN interface and each WAN interface, if you bridge all of your LAN interfaces together then you just need one on the bridge.
/queue tree
add name="Download LAN1" parent="LAN1" max-limit=10M priority=8
add name="High Download LAN1" parent="Download LAN1" limit-at=8M max-limit=10M priority=1 packet-mark="high priority"
add name="Low Download LAN1" parent="Download LAN1" limit-at=2M max-limit=10M priority=8 packet-mark="low priority"
add name="Upload WAN1" parent="WAN1" max-limit=10M priority=8
add name="High Upload LAN1" parent="Upload LAN1" limit-at=8M max-limit=10M priority=1 packet-mark="high priority"
add name="Low Upload LAN1" parent="Upload LAN1" limit-at=2M max-limit=10M priority=8 packet-mark="low priority"
The basic rules say that LAN and WAN can only ever send out 10M of traffic. Of that 10M 8M is a guaranteed rate for high priority, but it can take up to 10M if low priority isn't using it's guaranteed 2M, and vice versa.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Fri Oct 29, 2010 1:58 am

Oh ok i see:

That seems much better than simple queues. Thats act what i was trying to do in simple queue,

I have constructed a nice queue tree now: lets see how it works.

I wil do some testing?

I have use PCQ in my tree?
what does this do?

is this normaly to make sure that one user does not hog the network?
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: How Queues are processed?

Fri Oct 29, 2010 2:30 am

I don't have much experience with the various sub queue options. Queue types basically determine how the packets are ordered and what packets will get dropped when the queue is full, PCQ is a way of further dividing up queues automatically that will split each connection so no one connection can take everything if that is what you want. I just leave them at the default packet first in first out myself.

We are also running hotspots, so to insure that no one user takes up all of the bandwidth I have Radius assign each user a bandwidth profile that automatically sets up a simple queue just for that user. This way I am prioritizing all of the traffic I want, DNS, HTTP, etc, and each end user has a rate limit they cannot exceed. It's harder for me to say how well this works since guests only say something when they have a problem and not when it works.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Fri Oct 29, 2010 10:49 am

Yea, i was thinking about that,

Cause currently i also set the speed limit in raduis, and that seems to work well.

But from my understanding of using queue trees with pcq is that say there is only 2 users on line they get more than what they usualy would get???


So PCQ is a good thing if u can get it set up correctly:

i followed some pdf file QoS_Megis.pdf and it was really nice, its just that i dont get the whole:
Rate:
Limit:
Total Limit:

thing? some how u need to divide total limit by limit to see how many users it will work with, so u have to adjust it appropriatly.
But i donot understand it enough to change them and see what it does? U by any chance know?
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: How Queues are processed?

Fri Oct 29, 2010 2:36 pm

Actually your normal simple queues are going to fire still going to fire and apply their rate limits to each user. By placing the queues trees directly on the interface they are being processed after everything else has been done to them on the router. I believe if you place them on the Global-in and Global-out "interfaces" it then will override the simple queues and not process them.
http://wiki.mikrotik.com/wiki/Manual:Packet_Flow

The Wiki has a few examples explaining PCQ:
http://wiki.mikrotik.com/wiki/Manual:Queues_-_PCQ
http://wiki.mikrotik.com/wiki/Manual:Qu ... Q_Examples
http://wiki.mikrotik.com/wiki/Manual:Queue

Basically if you set up PCQ you are telling the router to divide up queues it has on that interface into sub queues dynamically to make sure no one connection is taking up all of the bandwidth. If you just use PCQ and nothing else, there is an option that allows you to set up the maximum amount that it will give any one person.

There was a presentation by Fewi at this last MUM that went over using PCQ for hotspots instead of the default simple queues that you may find useful in understanding PCQ a bit more, it just doesn't appear to be up on the ticktube yet.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Fri Oct 29, 2010 3:24 pm

thanks for those.

I will have a read.


Oh was it a recent one that its not up yet? if you come accross it pls hook me up with the link. I would live to watch it.
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: How Queues are processed?

Fri Oct 29, 2010 5:20 pm

Here's his presentation pdf at least.
http://mum.mikrotik.com/presentations/U ... xWindt.pdf

The presentations before and after his are up there, so I'm not sure where it took off to. Maybe if you ask really nice he'll cough up some extra info :lol:
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: How Queues are processed?

Fri Oct 29, 2010 5:31 pm

Huh. Don't know why the video isn't up. I think a colleague of mine had a separate link to the site it was originally streaming from so it might be hosted elsewhere.

The presentation doesn't really contain anything new as such, though. Queue trees attached to global-in and global-out fire before simple queues do - simple queues in the background install queues at global-in, global-out, global-total or any combination thereof depending on the simple queue parameters. Once a packet has gone through queues at a particular spot in the packet flow it won't fire again, so you can effectively override simple queues with queue trees if you need to. Because PCQ is cheaper to do than simple queues this can be used to scale Hotspots to more users.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Fri Oct 29, 2010 5:38 pm

Oh ok,

thats what i have done:

can u verify my setup:
add name="Global_In" parent=global-in limit-at=0 priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="pop3-rx" parent=Global_In packet-mark=pop3-rx limit-at=0 queue=default priority=4 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="imap-rx" parent=Global_In packet-mark=imap-rx limit-at=0 queue=default priority=4 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="Globall_Out" parent=global-out packet-mark=smtp-tx limit-at=0 priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="Global_Total" parent=global-total limit-at=0 priority=8 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="voip-rtp-total" parent=Global_Total packet-mark=voip-rtp-total limit-at=0 queue=default priority=1 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="icmp-total" parent=Global_Total packet-mark=icmp-total limit-at=0 queue=default priority=4 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="http-total" parent=Global_Total packet-mark=http-total limit-at=0 queue=default priority=3 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="https-total" parent=Global_Total packet-mark=https-total limit-at=0 queue=default priority=3 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="voip_sip_total" parent=Global_Total packet-mark=voip-sip-total limit-at=0 queue=default priority=1 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="smtp_tx" parent=Globall_Out packet-mark=smtp-tx limit-at=0 queue=default priority=7 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="p2p_total" parent=Global_Total packet-mark=p2p_total limit-at=0 queue=default priority=7 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="dns_total" parent=Global_Total packet-mark=dns_total limit-at=0 queue=default priority=2 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="ftp_total" parent=Global_Total packet-mark=ftp_total limit-at=0 queue=default priority=5 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="rdp_total" parent=Global_Total packet-mark=rdp_total limit-at=0 queue=default priority=2 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s 
add name="ssh_total" parent=Global_Total packet-mark=ssh_total limit-at=0 queue=default priority=2 max-limit=0 burst-limit=0 burst-threshold=0 burst-time=0s

that is just the priority part. I dont think my 3 speed groups with pcq is working.
 
Feklar
Forum Guru
Forum Guru
Posts: 1724
Joined: Tue Dec 01, 2009 11:46 pm

Re: How Queues are processed?

Fri Oct 29, 2010 7:46 pm

I think it will be easier for you if instead of placing the queues on the Global-x interfaces to place them on the actual interfaces, ether1, ether2, etc. I find the Global-x interfaces a bit confusing and hard to keep track of what one does what. In my opinion, you also gain a few advantages by placing them on the interfaces rather than the Globals. You are able to define how much traffic any one interface is able to send out, so it gives you more control over what the interface is doing. You would also be able to set up different priorities and rules for each interface.

Also remember that by placing them on the Global-x interface, I believe your simple queues will not be processed if you have a rate limit per user. Like I said, I also leave the queue just at pfifo, try that for now and once you get that working, swap it over to PCQ and get that portion working.
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Sun Oct 31, 2010 10:28 pm

Looks like you're getting there Zappa !

It just occurred to me that you might see the Mikrotik Queues working fine, only to find that VoIP still doesn't work brilliantly under heavy traffic load.

First off, SIP is just to set the call up - RTP carries the actual Voice data, so give 'em equal (highest) priority.

Secondly, if you have a bog standard ADSL modem or similar, then all your hard work might get un-done by the cheapo ADSL router, or worse, by the Queuing system on the ISP's end.

E.g. if you have 1 line, say 500kbit Upload max, it would help you to actually throttle the bandwidth Leaving your Mikrotik and into the ADSL router to a value of say 400~450kb/s - i.e. LESS than the Max, and do your Prioritisation in that Queue/Tree.

That way your Mikrotik will never push more data up the adsl than the ADSL Router or ISP queues detect as 'over limits' and therefore avoid their Queuing systems altogether.

If you stuff the Upload pipe full of data, both the ADSL router and the ISP systems will queue your data anyway, no matter what priorities you set on your side.

If you get that wrong on ADSL with VoIP, the result is Perfect Prio for Queues etc in your Mikrotik, but the other end can't hear you very well/echo/delay/bits missing etc, but you can hear them fine.
 
Zapnologica
Long time Member
Long time Member
Topic Author
Posts: 594
Joined: Fri Sep 25, 2009 8:15 pm
Location: South frica

Re: How Queues are processed?

Sun Oct 31, 2010 11:17 pm

Thanks man.

And i see what you saying about the crappy adsl companies.

That act makes allot of sense. Cause in SA they do throtttle you,

AND to me VoIP is of utmost important. So i think im gona try that idea of yours.

with the rtp thing, that never gets marked? like under mangle when talking on the VoIP the sip packet mark goes up and the rtp does not?
 
adrianatkins
Long time Member
Long time Member
Posts: 556
Joined: Wed Sep 05, 2007 10:34 am
Location: Spain
Contact:

Re: How Queues are processed?

Mon Nov 01, 2010 9:19 pm

i think im gona try that idea of yours
Not my idea - it's all there in the LARTC examples.

RTP is the voice stream, so that's the one that will make most difference to your calls.

If you're using one or two VoIP providers, it mght be easier for you to just mark packets going to their SIP server IP addresses instead of finding harder ways to mark the traffic.

That way will catch SIP, RTP - everything to do with your VoIP in 1 easy step.
 
edmidor
Member Candidate
Member Candidate
Posts: 126
Joined: Fri Mar 05, 2010 12:06 am
Location: Canada
Contact:

Re: How Queues are processed?

Tue Nov 09, 2010 4:04 pm

I have to confirm - it works when you do it as above. Since I moved to 450G I forgot about voip problems.
On the other hand throttling presumes you know your max. The problem is that it always fluctuates, and if you set it to 450 (thinking you've got all 500), when it drops to 400 temporarily you got a problem

Who is online

Users browsing this forum: JmJ17, rplant and 96 guests