How to Limit VLAN Traffic Speed on a MikroTik router

This guide explains how to control or limit VLAN bandwidth on a MikroTik router using different methods.
Option 1: Use Simple Queues (Easiest)
The Simple Queue method is the most straightforward way to limit bandwidth per VLAN or subnet.
Steps:
- Go to Queues → Simple Queues → Add (+)
- In the Target field, enter the VLAN interface name (e.g.,
vlan10
) or subnet (e.g.,192.168.10.0/24
). - Set the following:
- Max Limit: Define upload/download speeds (e.g.,
10M/50M
for 10 Mbps upload and 50 Mbps download). - Burst options (optional): Allows temporary speed boosts.
- Max Limit: Define upload/download speeds (e.g.,
- Click OK to save.
Example (CLI):
/queue simple add name="limit-vlan10" target=vlan10 max-limit=50M/50M
Option 2: Use Queue Trees (Advanced)
For advanced control—such as managing shared bandwidth between VLANs or setting traffic priorities—you can use Queue Trees along with Mangle rules.
Step 1: Mark Traffic from the VLAN
/ip firewall mangle
add chain=forward in-interface=vlan10 action=mark-packet new-packet-mark=vlan10-down
add chain=forward out-interface=vlan10 action=mark-packet new-packet-mark=vlan10-up
Step 2: Create a Parent Queue (Typically on WAN)
/queue tree
add name="download" parent=ether1 max-limit=100M
add name="upload" parent=ether2 max-limit=100M
Step 3: Add Child Queues for the VLAN
/queue tree
add name="vlan10-down" parent=download packet-mark=vlan10-down max-limit=50M
add name="vlan10-up" parent=upload packet-mark=vlan10-up max-limit=10M
Option 3: Limit Directly on the VLAN Interface (RouterOS v7+)
If you're using RouterOS version 7 or later, you can directly apply speed limits on VLAN interfaces:
/interface vlan set vlan10 ingress-rate=10M egress-rate=50M
Tips and Recommendations
- Use Simple Queues for quick, per-VLAN speed limits.
- Use Queue Trees for shared bandwidth or hierarchical shaping.
- Always test with tools like
speedtest.net
oriperf3
to verify throughput. - Ensure limits are applied in the correct traffic direction (ingress or egress).
Example Use Case:
If you want to divide a 100 Mbps WAN connection evenly among VLANs 10, 20, and 30, you can use Queue Trees to allocate ~33 Mbps per VLAN.