Bandwidth management

Share Bandwidth Equally on MikroTik with PCQ

Divide your internet speed fairly between all users on a MikroTik router with PCQ queue types and one simple queue, with an optional per-user cap.

Commands in this article follow RouterOS v7 documentation but have not yet been marked as lab-tested on this site. Always test changes in a lab or maintenance window and keep a backup.

Problem

One user downloading a big file or streaming makes the internet slow for everyone else. You want the available bandwidth shared equally between all active users.

Symptoms

  • Speed is fine at night but very slow during busy hours.
  • One or two devices use most of the bandwidth.

Likely causes

Without queues, TCP connections compete freely and heavy users take most of the link. PCQ (Per Connection Queue) creates a sub-queue per user automatically, so every active user gets an equal share.

Prerequisites

  • Your real ISP speed, for example 100 Mbps download and 50 Mbps upload. Set the limit slightly below it (about 90-95%).
  • LAN subnet, for example 192.168.88.0/24.

Solution (WinBox / CLI)

1. Create two PCQ queue types, one per direction:

RouterOS CLI
/queue type add name=pcq-download kind=pcq pcq-classifier=dst-address pcq-rate=0
/queue type add name=pcq-upload kind=pcq pcq-classifier=src-address pcq-rate=0

pcq-rate=0 means no fixed limit per user: active users share the total equally.

2. Add one simple queue for the whole LAN. In simple queues, values are written as upload/download:

RouterOS CLI
/queue simple add name=lan-share target=192.168.88.0/24 max-limit=45M/90M queue=pcq-upload/pcq-download

3. Optional: cap each user. For example, nobody above 10 Mbps download and 5 Mbps upload even when the line is free:

RouterOS CLI
/queue type set pcq-download pcq-rate=10M
/queue type set pcq-upload pcq-rate=5M

Note: Traffic handled by FastTrack skips queues. If your firewall has a FastTrack rule, disable it or the queue will not limit anything.

Verification

  • In WinBox, open Queues and watch the lan-share queue: the rate should never go above the max-limit.
  • Start two downloads on two PCs. Each should get roughly half of the speed.

Common errors

  • Upload and download swapped: in simple queues the order is upload/download.
  • Max-limit set to the full ISP speed: the queue never fills, so PCQ has no effect. Use 90-95%.
  • Other simple queues above lan-share catch the traffic first. Simple queues are checked from top to bottom.

Rollback

RouterOS CLI
/queue simple remove [find name=lan-share]
/queue type remove [find name~"pcq-"]
Go deeper in class

This topic is covered hands-on in MTCTCE — MikroTik Certified Traffic Control Engineer.

View MTCTCE
WhatsApp