Speed limits on MikroTik

A total limit, a fair share of the link and separate limits for chosen addresses.
A RouterOS 7 Simple Queues script with verification and rollback.

Speed limits on MikroTik

A total limit for the local network, a fair share of the link between devices (PCQ) and separate limits for chosen addresses — a RouterOS 7 Simple Queues script with checks and a rollback.

The network whose speed is limited, e.g. 192.168.88.0/24.
Empty — no cap, just an equal share.

Separate limits

For a server, a camera or a particular computer: an address or subnet from the local network. An empty speed field means no limit of its own, only within the total.

RouterOS script

   
Verification

   
Rollback

   

The script is built in your browser; addresses are not sent anywhere.

How queues work

When the link is saturated — someone is downloading updates or big files — calls and video stutter for everyone else. A MikroTik simple queue sets a total limit slightly below the plan so packets pile up on the router rather than at the ISP, and the PCQ queue type splits that limit equally between active devices. Particular addresses — a server, cameras — can have limits of their own, and the total limit still applies to them.

How to use it

  1. Enter the local network and the plan speed in both directions in megabits per second. Use the measured speed rather than the figure in the contract.
  2. Keep the 10% reserve and equal sharing. Set a per-device cap if one device must never take more than a certain speed, even when the link is free.
  3. Add addresses with their own limits.
  4. Paste the script into the terminal or upload the .rsc file and run /import, then test the speed from two devices at once.

What the script does

It creates the queue types pasw-down and pasw-up (PCQ by destination and source address) and the pasw-total queue for the whole network, plus child queues for the chosen addresses and pasw-others for everyone else. In max-limit the upload speed comes first, then download. So that FastTrack does not send traffic past the queues, accept rules for this network go above the fasttrack rule. Everything is tagged with the comment pasw-q, so running it again or rolling back touches only these objects. For guests there is guest Wi-Fi with its own limits.

Frequently asked questions

Why doesn't the limit work?

Usually because of FastTrack: fasttracked connections bypass simple queues. Check in /ip firewall filter print that the pasw-q rules are above fasttrack-connection. The second cause is another queue for the same addresses higher in /queue simple: the first match wins.

What is PCQ and why is it better than a queue per address?

PCQ splits traffic into streams by itself — one per address — and shares the speed equally between them. No need for a hundred queues for a hundred devices, and new devices are picked up automatically.

Why a 10% reserve?

A queue controls speed only when packets pile up on the router. If the limit equals the plan they pile up in the ISP's equipment, which knows nothing about your devices: ping rises and calls drop. A small reserve gives control back to the router.

How much will CPU load rise?

Without FastTrack every packet goes through the firewall and the queues. A hundred megabits is no problem for most models, but on a gigabit link entry-level hAP and hEX units can hit their CPU limit. Watch /system resource and /tool profile under full load.

More tools

MikroTik

MikroTik dual WAN
Backup link and load sharing with a link check
MikroTik configuration diff
What changed between two /export outputs
MikroTik backups
Backup and /export on a schedule to e-mail or SFTP
MikroTik configuration audit
Find holes in /export and get fix commands
MikroTik basic protection
Firewall, services and management access in one script
MikroTik brute-force protection
Block password guessing and scanners
MikroTik port forwarding
dst-nat, hairpin NAT and protection of forwarded ports
Firewall packet path
Which MikroTik rule passes or drops a packet