Advanced Bandwidth Shaping & QoS on MikroTik: Hierarchical Queue Trees and PCQ
Eliminating bufferbloat, prioritizing executive Zoom calls, and enforcing fair bandwidth quotas across 200+ office users.

Telecommunications Engineer
Senior Network Solutions Architect, Natelad Agency
Executive & Architectural Key Takeaways
- ✓Simple queues process rules sequentially, introducing high CPU latency on high-throughput connections; hierarchical queue trees utilize HTB scheduling for multi-gigabit routing.
- ✓Bufferbloat causes latency spikes from 20ms to 800ms+ during file downloads; applying CAKE or FQ-CoDel algorithms keeps pings flat.
- ✓Per-Connection Queuing (PCQ) dynamically divides available bandwidth equally among active users, preventing a single downloader from choking the office.
- ✓Mangle rules must mark connections first, then mark packets to reduce firewall CPU load by over 80%.
- 01.Why High-Speed Internet Still Feels Slow: Bufferbloat Explained
- 02.RouterOS v7 PCQ & Queue Tree Implementation Pattern
Why High-Speed Internet Still Feels Slow: Bufferbloat Explained
Many offices upgrade from 50Mbps to 200Mbps only to find that Zoom video calls still stutter and freeze whenever someone uploads a large file. The culprit is rarely total bandwidth, but bufferbloat: network buffers filling up and queuing real-time audio packets behind bulk file transfers.
By implementing smart queue trees with traffic shaping in MikroTik RouterOS, latency-sensitive packets jump to the front of the queue immediately, ensuring crystal-clear voice communication regardless of network saturation.
RouterOS v7 PCQ & Queue Tree Implementation Pattern
The following script demonstrates setting up dynamic equal-share bandwidth allocation:
# Define PCQ Queue Types
/queue type
add name="PCQ-Download" kind=pcq pcq-rate=0 pcq-limit=50KiB pcq-total-limit=2000KiB pcq-classifier=dst-address
add name="PCQ-Upload" kind=pcq pcq-rate=0 pcq-limit=50KiB pcq-total-limit=2000KiB pcq-classifier=src-address
# Create Master Hierarchical Queue Tree
/queue tree
add name="Total-Download" parent=bridge-local max-limit=100M queue=default
add name="Staff-Download" parent="Total-Download" packet-mark=STAFF-PKT queue="PCQ-Download" priority=4
add name="VoIP-Download" parent="Total-Download" packet-mark=VOIP-PKT queue=default priority=1 limit-at=10M max-limit=20M
Telecommunications Engineer
Senior Network Solutions Architect at Natelad Agency. Architecting mission-critical digital systems, resilient infrastructure, and security frameworks for enterprises worldwide.
Related Production Blueprints
View All Blueprints →Engineering Resilient Multi-WAN Networks: Combining Starlink Satellites with Dedicated Fibre
How we design mission-critical telecommunication grids for remote mining, banking, and industrial facilities by pairing high-throughput terrestrial fibre with low-earth-orbit (LEO) satellite redundancy.
Starlink Bypass Mode & MikroTik Integration: The Definitive Commercial Setup Guide
Step-by-step technical guide to putting Starlink Gen 2 and Gen 3 dishes into bypass mode, eliminating double-NAT issues, and configuring enterprise MikroTik routers for commercial offices.
Implement this architecture with Natelad’s dedicated engineering pods.
Book a technical discovery session with our lead architects to evaluate your infrastructure, review security posture, or scope a new platform sprint.