Explanation Queue Tree & PCQ in Mikrotik

Setting and management in Mikrotik Bandwidth cannot be separated from the Queue feature. There are two types of the queue which can be used in Mikrotik, namely Simple Queue and Queue Tree. For an explanation of Simple Queue I’ve discussed here:

How to Limit (Limit) Bandwidth Mikrotik with Simple Queue

Well, this time we will discuss the Company Queue Tree & PCQ (Per Connection Queue) as well as application in the Mikrotik.

Queue Tree

Queue Tree serves to implement more complex functions in a bandwidth limit on the proxy where the use of packet marks its functions better . Used to limit one direction only connection either download or upload. Queue Tree In general, this does not look different from Simple Queue.
The difference that we can see directly that is only in terms of how to wear or use only. Simple Queue Where specifically is designed for ease of configuration while Queue Tree is designed to carry out the task queue is more complex and needs a good understanding of the flow of traffic.

Some Differences Simple Queue and Queue Tree:

1. Simple Queue

  • Has very strict rules of order, the queue is processed from the top to the bottom.
  • Set the packet flow is bidirectional (two-way).
  • Being able to restrict traffic based on IP addresses.
  • One capable of restricting traffic queues two directions at once (upload/download).
  • If using the Simple Queue and Queue Tree together, Simple Queue will be processed earlier than Queue Tree.
  • Supporting the use PCQ so as to divide the bandwidth fairly and equitably.
  • Can apply through packet queues marked in / firewall mangle.
  • Being able to divide the bandwidth is fixed.
  • As the name implies, the settings are simple and tend to be static, ideal for admins who do not want complicated with traffic control on / firewall mangle.


Explanation Queue Tree & PCQ in Mikrotik
Explanation Queue Tree & PCQ in Mikrotik


2. Queue Tree

  • Does not have a sequence, each queue will be processed together.
  • Set the packet flow is directional (one way)
  • Requires setting/firewall mangle to limit traffic per IP.
  • Requires setting/firewall mangle prior to differentiate download and upload traffic.
  • Dinomorduakan after Simple Queue.
  • Supporting the use PCQ so as to divide the bandwidth fairly and equitably.
  • Pure queue management through a package marked in / firewall mangle.
  • Being able to divide the bandwidth is fixed.
  • More flexible and need a good understanding in / firewall mangle particularly about traffic control.


Explanation of some arguments in Queue Tree:

1. Parent: useful for determining whether the queue who has served as a child queue
There are several default options in the parent queue trees normally used for holding queue:
Global in :
Representing all input interfaces in general. The point here interface that receives input data/traffic before filtering such as traffic upload
 – Global-out :
Representing all output interfaces in general. The point here interface to output data/traffic filtered as traffic download
Global-total :
Representing all input and output interfaces simultaneously, in other words, represents the union of the global and global-in-out.
 – <Interface name> : ex: Lan or WAN:
Representing one exit interface. The point here is only the traffic that comes out of this interface will queue.
2. Packet Mark: Used to mark the package that has been marked in / IP firewall mangle.
3. Priority (1 s / d 8): Used to prioritize child queue of another child. Priority does not work on the parent queue. Child Queue that has priority one (1) will reach the limit-at first than on the child queue priority (2).

4. Queue Type: Used to select the type of queue that can be made to a special queue types


– Limit At: Bandwidth minimum obtained by the target / IP dequeue
– Max Limit: the maximum bandwidth that can be achieved by the target / IP dequeue.
– Burst limit: the maximum bandwidth that can be achieved by the target / IP dequeue when the burst is active
– Burst time: The time period in seconds, where the data rate average is calculated.

PCQ (Per Connection Queuing)

Used to recognize the current direction and is used because it can Manage bandwidth in a fair, equitable and massive. PCQ on Mikrotik used in conjunction with Queue, either Simple Queue, and Queue Tree.

To make it easier to understand the concept of PCQ, please refer to the following analogy:
I have 10 PC which I will share a maximum bandwidth of 1 Mb and a minimum bandwidth of 256 kb each PC. If only one of my PC is online then he will be able to BW max 1 Mb, but if there are two PC online BW divided by 2, and so on up to 10 with the distribution of bandwidth evenly.

Well, to make a configuration like this, I have to make one rule 10 rule parent and child Queue Queue for each client. For current conditions are only 10 PC it’s ok, do not matter. But imagine if his existing PC 100? 200? What if I manage is a WiFi Hotspot network with clients who ga course his number? What yes I have to make hundreds rule for each client? Tired dongg.

Therefore, I can use this feature to perform management PCQ massively bandwidth to all clients on a large scale. By using this PCQ, although not necessarily the number of clients and very much, we just need to make one or two configurations Queue.


Explanation Queue Tree & PCQ in Mikrotik
Explanation Queue Tree & PCQ in Mikrotik

Explanation of Some Arguments in PCQ:

PCQ Classifier function classifies the direction of the connection, for example, if the classifier used is src-address on the Local interface, then the flow will be pcq upload connections. So also with dst-address will be pcq download.

PCQ rate serves to limit the maximum bandwidth that can be obtained. By entering numbers on this rate (default: 0), the maximum download that will be earned per IP will be limited Eg. k (64kbps).
Explanation Queue Tree & PCQ in Mikrotik
Explanation Queue Tree & PCQ in Mikrotik
Limit function to restrict the number of parallel connections permitted for each IP. meaning that if we put a value of 50, then only 50 simultaneous connections that can be obtained by one IP address (either the source/destination).
Total Limit is the total parallel connection is allowed for the entire IP Addresses (either the source or destination).

Examples of the application of PCQ and Queue Tree in Mikrotik :

Combining Layer7 features and packet marking uses mangle to mark files that are normally downloaded and then limited download bandwidth using Queue Tree + PCQ. So that each client will get a limited download connection and unlimited browsing.


Download after limit
Download after limit

Please see below for a more detailed Queue application:

Queues Configuration Details