// DevOps
How to stabilize streaming: traffic prioritization on MikroTik
Published on 2026-04-09
Every streamer has encountered “dropped frames”. Often the problem isn’t a weak PC, but that the home network doesn’t know which traffic is more important. If someone in the next room starts YouTube in 4K or begins a download, your stream can “drop”.
Today we’ll look at how to use RouterOS (MikroTik) to allocate a “dedicated lane” for the stream that nobody can take.
Step 1: Marking traffic (Mangle)
First we need to tell the router which packets belong to our stream. Suppose your computer has a static IP 192.168.0.100, and the internet comes through interface pppoe1.
In the terminal enter:
/ip firewall mangle
add chain=forward src-address=192.168.0.60 out-interface=pppoe1 \
action=mark-packet new-packet-mark=video_upload passthrough=yes
What did we do? We marked every packet leaving your IP toward the internet with the mark video_upload.
Step 2: Creating a queue tree (Queue Tree)
Now let’s create rules for distributing bandwidth. We’ll use Queue Tree as it’s the most flexible tool for managing priorities.
/queue tree
# Create a common "branch" for outgoing traffic
add name=TOTAL-UP parent=pppoe1 max-limit=40M
# Allocate a priority channel for the stream
add name=VIDEO-UP parent=TOTAL-UP packet-mark=video_upload \
limit-at=3M max-limit=50M priority=1
# Limit everything else
add name=OTHER-UP parent=TOTAL-UP \
packet-mark=no-mark max-limit=40M priority=8
Why does this work?
priority=1 — this is the highest priority. The router will process stream packets first, and only then everything else. Regular traffic (
OTHER-UP) has priority 8 (the lowest).limit-at=3M — this is the guaranteed speed. Even if the channel is saturated at 100%, the router will forcefully allocate 3 Mbps to your stream.
max-limit — we limit the total throughput slightly below the real speed of your plan (for example, 40M on a 50M plan). This is necessary so the queue is created by your router, not the provider’s equipment — only then will QoS work effectively.
Conclusion
After these settings your stream will get a “VIP pass”. Even if other devices start active downloads, the MikroTik will slow them down to ensure the smoothness of your broadcast.
Practical tip
Before configuring, be sure that the IP of your gaming PC is reserved:
IP → DHCP Server → Leases
This is necessary so the address doesn’t change after a reboot — otherwise the entire prioritization logic will break.
// Reviews
Related reviews
Huge thanks to Mikhail for the work — I'm very pleased with the result. Special thanks for his recommendations during setup: from my rather muddled brief (I know little about servers), Mikhail, through clarifying questions and suggestions, formed a clear understanding of what the final build would accomplish and how best to organize everything. I recommend him!
Many thanks to Mikhail for the work, I am very pleased with the result. I especially thank him for the recommendations during the setup process — from my rather muddled brief (and I know little about servers) Mikhail, …
MikroTik hAP router setup. I'll set up a MikroTik Wi‑Fi router for you.
2025-07-21 · ★ 5/5
An excellent specialist, a savvy expert, and a wonderful person. In an hour he fixed what we'd been racking our brains over for days! I'm sure this won't be the last time we rely on his boundless professionalism.
An excellent specialist, a savvy expert, and a wonderful person. In an hour he fixed for us what we had been scratching our heads over for days! I'm sure this won't be the first time we make use of his boundless …
MikroTik hAP router setup. I'll configure a MikroTik Wi-Fi router for you.
2025-05-28 · ★ 5/5
A professional approach to the job!
Professional approach to the job!
MikroTik hAP router setup. I'll set up a MikroTik Wi-Fi router for you.
2025-03-31 · ★ 5/5
Knows their stuff, gets things done. Everything was prompt and to the point; I was satisfied with the collaboration.
Knows, can, does. Everything was prompt and to the point; I was satisfied with the collaboration.
MikroTik hAP router setup. I'll set up a MikroTik Wi‑Fi router for you.
2025-03-14 · ★ 5/5
Thanks! We set up the router according to my technical specification, with a full explanation of what we're doing.
Thank you! The router was configured according to my technical specification, with a full explanation of what we are doing
MikroTik hAP router setup. I'll configure a MikroTik Wi‑Fi router for you.
2025-03-09 · ★ 5/5
Everything's great! Thanks! I recommend it.
Everything's great! Thank you! I recommend it
// Contact
Need help?
Get in touch with me and I'll help solve the problem
// Related