Skip to content

Home Bandwidth Management

A home router running RouterOS can shape traffic so that a VoIP call does not break when someone starts a large upload, and online gaming stays responsive while a streaming TV pulls 4K video. This guide covers practical, low-maintenance configurations for consumer-grade internet connections (10–1000 Mbps).

Section titled “Before You Start: Measure Your Real Link Speed”

Set your queue limits a few percent below your actual measured throughput, not the ISP’s advertised rate. Shaping at or above the real line rate pushes packets into the ISP’s modem buffer instead of your router’s queue, defeating the QoS policy.

  1. Disconnect all devices except the test machine.
  2. Run a speed test several times (morning, evening) and note the lowest values.
  3. Set your queue max-limit values to ~92–95% of the measured minimum.
ISP planTypical setting
100/10 Mbpsmax-limit=94M/9M
300/30 Mbpsmax-limit=285M/28M
500/50 Mbpsmax-limit=470M/47M
1000/100 Mbpsmax-limit=940M/94M

A single Simple Queue rule caps the entire home subnet and distributes bandwidth using PCQ (equal sharing across all devices). This eliminates bufferbloat with minimal configuration.

Assumptions:

  • WAN interface: ether1
  • LAN subnet: 192.168.88.0/24
  • ISP: 300 Mbps down / 30 Mbps up
/queue type
add name=pcq-download kind=pcq pcq-classifier=dst-address
add name=pcq-upload kind=pcq pcq-classifier=src-address
/queue simple
add name=Home-Internet \
target=192.168.88.0/24 \
max-limit=285M/28M \
queue=pcq-upload/pcq-download \
comment="Home WAN shaping with PCQ fairness"

Every active device gets an equal share of the available bandwidth. If only one device is active, it uses the full link.

When this is enough: You have no VoIP or gaming that requires guaranteed priority. The PCQ fairness prevents any single device from monopolizing the link.


Option 2: Simple Queues with Priority Devices

Section titled “Option 2: Simple Queues with Priority Devices”

Add per-device rules above the subnet rule to give priority to specific hosts.

/queue type
add name=pcq-download kind=pcq pcq-classifier=dst-address
add name=pcq-upload kind=pcq pcq-classifier=src-address
/queue simple
# ATA or IP phone — highest priority, small cap
add name=VoIP-Phone \
target=192.168.88.2/32 \
max-limit=5M/5M \
priority=1/1 \
comment="VoIP ATA — top priority"
# Gaming PC
add name=Gaming-PC \
target=192.168.88.20/32 \
max-limit=120M/25M \
priority=2/2 \
comment="Gaming PC — high priority"
# Streaming TV — lower priority than gaming
add name=Living-Room-TV \
target=192.168.88.60/32 \
max-limit=80M/10M \
priority=6/6 \
comment="TV streaming"
# Network-attached storage / backup — lowest priority
add name=NAS-Backup \
target=192.168.88.30/32 \
max-limit=50M/10M \
priority=8/8 \
comment="NAS backup — bulk, lowest priority"
# Catch-all for remaining devices
add name=Everyone-Else \
target=192.168.88.0/24 \
max-limit=285M/28M \
queue=pcq-upload/pcq-download \
priority=5/5 \
comment="PCQ fairness for all other devices"

Rule order matters in Simple Queues. Rules are evaluated top to bottom; the first match wins. Per-device rules must appear above the subnet catch-all rule.


Option 3: Queue Tree with Traffic Class Priority

Section titled “Option 3: Queue Tree with Traffic Class Priority”

Queue Tree gives finer control: VoIP, gaming, streaming, and bulk each become separate traffic classes under a shared WAN cap, regardless of which device generates them.

/ip firewall mangle
# Mark upload direction (leaving the LAN toward WAN)
add chain=forward out-interface=ether1 \
action=mark-packet new-packet-mark=pm-up passthrough=yes \
comment="All upload"
# Mark download direction (arriving from WAN toward LAN)
add chain=forward in-interface=ether1 \
action=mark-packet new-packet-mark=pm-down passthrough=yes \
comment="All download"
# VoIP — SIP signalling and RTP audio
add chain=forward protocol=udp dst-port=5060,5061,10000-20000 \
action=mark-packet new-packet-mark=pm-voip passthrough=yes \
comment="VoIP SIP and RTP"
add chain=forward protocol=udp src-port=5060,5061,10000-20000 \
action=mark-packet new-packet-mark=pm-voip passthrough=yes \
comment="VoIP replies"
# Gaming — common UDP game ports (customize per platform)
add chain=forward protocol=udp dst-port=3074,3478-3480,27000-27200 \
action=mark-packet new-packet-mark=pm-game passthrough=yes \
comment="Gaming UDP"
# Bulk — torrents and peer-to-peer
add chain=forward protocol=tcp dst-port=6881-6999 \
action=mark-packet new-packet-mark=pm-bulk passthrough=yes \
comment="Torrent bulk"
add chain=forward protocol=tcp src-port=6881-6999 \
action=mark-packet new-packet-mark=pm-bulk passthrough=yes

FastTrack note. FastTracked connections bypass the mangle chain. If your router has a FastTrack rule, add an exception for VoIP and gaming traffic that you want to shape:

/ip firewall filter
add chain=forward action=accept protocol=udp dst-port=5060,10000-20000 \
comment="VoIP — accept without FastTrack" place-before=0
/queue tree
# Upload parent — total upload ceiling
add name=UP parent=ether1 max-limit=28M \
comment="WAN upload total"
# Upload classes (priority 1=highest, 8=lowest)
add name=UP-VOIP parent=UP packet-mark=pm-voip limit-at=2M max-limit=5M priority=1
add name=UP-GAME parent=UP packet-mark=pm-game limit-at=2M max-limit=15M priority=2
add name=UP-DATA parent=UP packet-mark=pm-up limit-at=5M max-limit=25M priority=5
add name=UP-BULK parent=UP packet-mark=pm-bulk limit-at=512k max-limit=10M priority=8
# Download parent — total download ceiling
add name=DOWN parent=global-in max-limit=285M \
comment="WAN download total"
# Download classes
add name=DOWN-VOIP parent=DOWN packet-mark=pm-voip limit-at=5M max-limit=20M priority=1
add name=DOWN-GAME parent=DOWN packet-mark=pm-game limit-at=10M max-limit=80M priority=2
add name=DOWN-DATA parent=DOWN packet-mark=pm-down limit-at=20M max-limit=280M priority=5
add name=DOWN-BULK parent=DOWN packet-mark=pm-bulk limit-at=2M max-limit=100M priority=8

How this works under load:

  1. VoIP always gets its 2 Mbps upload / 5 Mbps download guarantee.
  2. Gaming is served next (priority 2) — low latency even when the link is saturated.
  3. General data (web, streaming) fills remaining capacity.
  4. Bulk downloads are squeezed last when the link is full.

Step 3: Add Burst for Web Browsing (Optional)

Section titled “Step 3: Add Burst for Web Browsing (Optional)”

Burst lets web traffic spike briefly above its steady-state rate for fast page loads.

/queue tree
set UP-DATA burst-limit=28M burst-threshold=15M burst-time=8s
set DOWN-DATA burst-limit=285M burst-threshold=150M burst-time=8s

Web traffic can burst to the full link rate while the 8-second average is below the threshold. Sustained streaming quickly consumes the burst allowance and drops back to max-limit.


Option 4: Eliminating Bufferbloat with FQ-CoDel

Section titled “Option 4: Eliminating Bufferbloat with FQ-CoDel”

If your primary complaint is high latency during downloads or uploads (bufferbloat), and you do not need class-based priority, FQ-CoDel is the simplest fix. It manages queue depth internally to reduce latency.

/queue type
add name=fqcodel kind=fq-codel
/queue simple
add name=Home-Internet \
target=192.168.88.0/24 \
max-limit=285M/28M \
queue=fqcodel/fqcodel \
comment="Bufferbloat fix with FQ-CoDel"

Test bufferbloat before and after with the Waveform Bufferbloat Test or by running a continuous ping during a large upload. A well-shaped link should show under 20 ms of added latency.

See CAKE and FQ-CoDel for a deeper discussion of active queue management algorithms.


Check queue rates and drops:

/queue simple print stats
/queue tree print stats

Watch in real time:

/queue simple print stats interval=1

Key indicators:

FieldHealthyInvestigate if…
rateNear max-limit during peak useFar below max-limit — queue may not be matching
droppedZero or near zeroNon-zero on priority queues — limit-at may be too low
queued-packets0 when link is not congestedConsistently non-zero — queue is always backed up

Reset counters for a fresh measurement:

/queue simple reset-counters-all
/queue tree reset-counters-all

  • The VoIP limit-at guarantee only works when VoIP packets carry the correct packet-mark. Verify the mangle rule is matching: /ip firewall mangle print stats — the VoIP rule byte count must be increasing during a call.
  • Check whether FastTrack is bypassing the mangle chain for the VoIP device. See the FastTrack note in Step 1.
  • A Simple Queue target must match the packet’s source or destination address. Confirm the subnet is correct with /ip route print and /ip address print.
  • A Queue Tree child with parent=global-in shapes download (traffic arriving from WAN). If you attached the parent to ether1, it only shapes upload. Switch the parent or add a mirrored tree.

Gaming latency is still high despite priority

Section titled “Gaming latency is still high despite priority”
  • Priority (1–8) only takes effect when the parent queue is congested. If your WAN cap is set above the actual line rate, the ISP modem queue is the bottleneck — lower your max-limit values until the router controls the queue.
  • Run a ping flood while transferring a large file (/tool flood-ping). If latency spikes only during transfers and drops immediately after, the shaping is working but the max-limit is too high.
  • Simple Queue rules are evaluated in list order. A subnet catch-all rule placed above a per-device rule will match first. Drag per-device rules to the top of the list.

SituationRecommended Option
Just stop bufferbloat, minimal configOption 4 — FQ-CoDel simple queue
Equal sharing across all devicesOption 1 — PCQ simple queue
Give specific devices priorityOption 2 — Simple Queues with per-device priority
VoIP/gaming must survive heavy bulk trafficOption 3 — Queue Tree with traffic class marks
ISP/multi-subscriber networkHTB ISP Tiered Bandwidth