Quality of Service · Topic 4 of 4
Simple Queues and the Queue Tree
Learn RouterOS simple queues: target, max-limit upload and download, priority, burst, queue types, and how a simple queue interacts with a queue tree.
- 5 min
- A simple queue is created in
/queue simpleand is converted to HTB automatically. targetselects the traffic, andmax-limitis written as upload then download.- The
queuesetting also uses upload type then download type.
What it is
A simple queue limits the bandwidth of a host, a network or an interface with one rule.
Behind the scenes RouterOS turns each simple queue into HTB queues, so the same ideas apply. You do not need mangle rules or a manual tree. You say who the queue applies to, and set the limits.
Simple queues are in /queue simple. They are the quickest way to limit one customer or one subnet.
How it works
One simple queue covers both directions of traffic for its target.
Target and limits
The target says who the queue applies to. It can be an address, a network or an interface. The max-limit takes two values, upload first and download second.
/queue simple add name=client1 target=192.168.88.10/32 max-limit=2M/10M
/queue simple add name=lan-total target=192.168.88.0/24 max-limit=20M/50M
In the first rule the client may upload at up to 2M and download at up to 10M. Upload is traffic sent by the target, and download is traffic sent to it. Other settings use the same upload then download pairing, such as limit-at, burst-limit, burst-threshold and burst-time.
Other useful settings
| Setting | Purpose |
|---|---|
| limit-at | The guaranteed rate, as upload and download values |
| priority | A number from 1 to 8, with 1 the highest |
| burst-limit, burst-threshold, burst-time | Burst behaviour as on the previous page |
| queue | The queue types, upload type first and download type second |
| parent | Another simple queue that becomes this queue's parent |
| packet-marks | Match traffic with packet marks from mangle |
| dst | Limit traffic to a given destination |
The queue setting takes two queue types separated by a slash, for example pcq-up/pcq-down. This is how a single simple queue can use PCQ to share the rate between many hosts.
Hierarchy with parent
Simple queues can be nested. A child names a parent simple queue, and takes bandwidth from the parent under the same HTB rules.
/queue simple add name=office target=192.168.88.0/24 max-limit=20M/50M
/queue simple add name=boss target=192.168.88.5/32 parent=office limit-at=2M/5M max-limit=10M/20M priority=1
Order of the rules
Simple queues are read from top to bottom, like firewall rules. A packet is handled by the first simple queue it matches. A broad rule placed above a specific one hides the specific one, so place specific queues first.
Simple queue and queue tree together
Both can be used on the same router at the same time. A packet may then match a simple queue and a queue tree. Each is attached at its own point in the packet flow, so do not rely on a fixed order between them.
Both queues then limit the same packet, so the lower limit wins. If your simple queue allows 10M and your tree leaf allows 5M, the traffic is held to 5M.
| Feature | Simple queue | Queue tree |
|---|---|---|
| Needs mangle marks | No, it matches by target | Yes, it matches by packet mark |
| Direction | Both directions in one rule | One direction per queue |
| Control | Easy, less flexible | Detailed, more flexible |
| Structure | Optional parent simple queues | Full tree with an interface or global parent |
Because the limits stack, it is a good habit not to put the same traffic in both unless you have a clear reason. A common clean design uses simple queues for per customer limits and a queue tree for priority between traffic types.
If a connection is slower than you configured, look for a second queue that also matches it. The lowest limit along the path wins.
Fasttrack and marks
Fasttracked connections bypass simple queues, so a simple queue may show no traffic for them. Packet marks used in packet-marks must exist before the queue sees the packet, as for the queue tree.
What to remember for the exam
Eight facts cover most questions on this topic.
- A simple queue is created in
/queue simpleand is converted to HTB automatically. targetselects the traffic, andmax-limitis written as upload then download.- The
queuesetting also uses upload type then download type. - Simple queues are read in order, and the first match handles the packet.
- A child queue uses
parentto take bandwidth from another simple queue. - A packet can match both a simple queue and a queue tree.
- The two limits stack, so neither can be exceeded.
- The lower of the two limits decides the final speed.
To limit each user in a network equally, use one simple queue for the network with a PCQ type for upload and download.
Common mistakes
These four mistakes appear often.
Swapping upload and download. The first value is upload and the second is download.
Placing a general queue above a specific one. The specific queue never matches.
Counting the same traffic twice. A queue tree rule and a simple queue both limit it, and the lowest limit wins.
Forgetting fasttrack. Simple queues do not see fasttracked traffic.
Check yourself
Work through these three questions.
In
max-limit=2M/10M, which value is the download limit?The second value, 10M, because upload comes first and download second.
Why can a host be slower than its simple queue allows?
A queue tree leaf may also match its traffic, and the lower of the two limits wins.
What speed applies if a simple queue allows 10M and a queue tree leaf allows 5M?
The traffic is held to 5M, because the lower limit wins.
Topic 4 of 4 in Quality of Service
Test yourself on Quality of Service
The full MikroTik MTCTCE question bank has 479 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by MikroTik. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.