Queues
CLI reference:/queue/interface
This section covers RouterOS queueing and bandwidth management. Use it to configure HTB, PCQ, burst behavior, queue sizes, and queue types for traffic shaping.
Simple queue
A simple queue in RouterOS limits the upload and download rate of a target: an address, a network or an interface. This page shows how to limit a device or a network, order queues, guarantee a rate, limit by time of day and by destination.
Queue tree
A queue tree in RouterOS limits traffic in one direction, selected by packet mark, on an interface or globally. This page shows how to limit an Internet connection without mangle rules, give priority to voice traffic and limit marked traffic.
HTB (Hierarchical Token Bucket)
HTB (Hierarchical Token Bucket) is a queuing discipline in RouterOS for rate limiting and burst handling, using a token bucket algorithm to manage data rates with configurable capacity and limits.
PCQ example
Per Connection Queue (PCQ) is a RouterOS queuing method for equalizing bandwidth among users, with examples showing how to set download/upload limits using Queue Tree and Simple Queues.
Queue Burst
Queue Burst feature allows temporary bandwidth bursts beyond configured limits when average traffic stays below a threshold, using burst-limit and burst-time parameters to control the burst duration and size.
Queue size
This page explains how to configure queue size limits in MikroTik RouterOS, detailing the impact of setting maximum packet counts on traffic shaping and scheduling. It includes examples comparing 100% shapers, schedulers, and default queue types to illustrate packet drop rates and delays.
Queue types
6 items
Overview
A queue is a collection of data packets that wait to be transmitted by a network device, in a pre-defined order. Queuing works almost like the queue at a bank or a supermarket, where customers are served in the order of their arrival.
Queues are used to:
- Limit data rate for certain IP addresses, subnets, protocols, ports, etc.
- Packet prioritization.
- Configure traffic bursts for traffic acceleration.
- Apply different time-based limits.
- Share available traffic among users equally, or depending on the load of the channel.
The queue implementation in RouterOS is based on the Hierarchical Token Bucket (HTB). HTB allows the creation of a hierarchical queue structure and determines relations between queues. These hierarchical structures can be attached at two different places, in the input and in the postrouting stage of the packet flow.
There are two different ways to configure queues in RouterOS:
- Simple queue (
/queue/simple) - limits the upload and download of an address, a network or an interface with one entry. - Queue tree (
/queue/tree) - limits traffic in one direction by packet mark, on an interface or globally. Packet marks come from/ip/firewall/mangle.
Queues can be configured in 8 levels. The first level is an interface queue from the /queue/interface menu, and the other 7 are lower-level queues that can be created in simple queues and queue trees.
Rate limitation principles
Rate limiting is used to control the rate of traffic flow sent or received on a network interface. Traffic with a rate that is less than or equal to the specified rate is sent, whereas traffic that exceeds the rate is dropped or delayed.
Rate limiting can be performed in two ways:
- Discard all packets that exceed the rate limit – rate-limiting (dropper or shaper).
- Delay packets that exceed the specific rate limit in the queue and transmit them when it is possible – rate equalizing (scheduler).
The next figure explains the difference between rate limiting and rate equalizing:

In the first case, all traffic that exceeds a specific rate is dropped. In the other case, traffic that exceeds a specific rate is delayed in the queue and transmitted later when it is possible. A packet can be delayed only while the queue is not full. If there is no more space in the queue buffer, packets are dropped. Queue size shows the effect of the buffer size.
For each queue we can define two rate limits:
- CIR (Committed Information Rate) – (limit-at in RouterOS) In a worst-case scenario, the flow will get this amount of traffic rate regardless of other traffic flows. At any given time, the bandwidth should not fall below this committed rate.
- MIR (Maximum Information Rate) – (max-limit in RouterOS) In a best-case scenario, the maximum available data rate for the flow, if there is any free part of the bandwidth.
Simple Queue
A simple queue limits the upload and download rate of a target: an address, a network or an interface. It needs no packet marks.
See Simple queue for the examples: a limit for a device or a network, the order of queues, a guaranteed rate, limits by time and by destination.
A CAKE queue type can buffer more traffic in a simple queue than in an equivalent queue tree. Set cake-memlimit on the CAKE queue type to bound its memory use.
Queue Tree
A queue tree limits traffic in one direction, selected by packet mark, on an interface or globally. A queue tree with an interface as the parent also limits FastTracked traffic.
See Queue tree for the examples: a limit for an Internet connection without mangle rules, priority for voice traffic and limits for marked traffic.
Queue Types
A queue type is a named set of settings for a queuing algorithm, such as FIFO, PCQ, FQ-CoDel or CAKE. Queue types are in /queue/type, and simple queues, queue trees and interface queues use them.
See Queue types for the kinds, the default queue types and examples for each kind.
Interface Queue
Before sending data over an interface, it is processed by the queue. An Interface Queue is a transmit (egress) queue; it does not process packets received by that interface.
For forwarded client traffic, the WAN-facing Interface Queue processes uploads, and the LAN-facing Interface Queue processes downloads. Each direction uses a separate queue instance. If traffic can leave through several LAN interfaces, configure every required transmit path or use a Simple Queue or Queue Tree that matches the traffic at a common point.
The /queue/interface menu lists the interfaces of the router and allows changing the queue type of an interface. The list is generated automatically:
[admin@MikroTik] > /queue/interface/print
Columns: INTERFACE, QUEUE, ACTIVE-QUEUE
# INTERFACE QUEUE ACTIVE-QUEUE
0 ether1 only-hardware- only-hardware-
1 ether2 only-hardware- only-hardware-
2 ether3 only-hardware- only-hardware-
3 eoip1 no- no-
4 lo no- no-
In this output, the Ethernet interfaces have the only-hardware-queue type and the virtual interfaces have no-queue. To change the queue type of an interface, set its queue property. See CAKE for an example that shapes upload with an interface queue.
Queue load visualization in GUI
In WinBox and WebFig, a green, yellow, or red icon shows the usage of each simple queue and queue tree entry, based on max-limit:
Less than 50% of
max-limitis used.50% or more, but less than 75% of
max-limitis used.75% or more of
max-limitis used.