Capping the bandwidth used by a WiFi network

I am sure that this has been discussed someone, but for the life of me, I - nor Google - appear to be able to find it.

The goal:

  • two WiFi networks
  • the ‘guest’ network is limited to using 1Mb/s of bandwidth

From reading online, the way that this is implemented in Linux is via traffic control (tc) and then by associating queuing disciplines (qdisc) to an interface. All very complex stuff to be honest.

Not impossible to work out, just time-consuming.

There are some (at least) three installable packages which can set these things up but the guides all say to not install another package if one is already installed.

The packages are:

  • luci-app-qos
  • luci-app-sqm
  • luci-app-wshaper

And one of the guides says NOT to install multiple packages (see: Quality of Service (qos-scripts) configuration [Old OpenWrt Wiki]).

It is kind of a shame that this feature (specifying a bandwidth limit for a WiFi network) isn’t already part of the web interface; does anyone have an up-to-date pointers on how they did this?


If you had upgraded to our v3.x firmware, it supports Qos, but it only can limit the bandwidth for device, not for interface.

If you want to limit the bandwidth for interface, you should reset it to factory setting, and ssh to the router, commands looks like:


tc qdisc add dev WAN_INTERFACE handle 1: root htb default 11

tc class add dev WAN_INTERFACE parent 1: classid 1:1 htb rate 1000Mbps

tc class add dev WAN_INTERFACE parent 1:1 classid 1:11 htb rate 1Mbit


tc qdisc add dev br-guest handle 1: root htb default 11

tc class add dev br-guest parent 1: classid 1:1 htb rate 1000Mbps

tc class add dev br-guest parent 1:1 classid 1:11 htb rate 1Mbit

Not sure which model are you using, please change the WAN_INTERFACE to its wan interface.

1 Like

Does this control both upload and download speeds?

And if so, which is which? Is the 1000Mbps the upload? or download?

And same for the 1Mbit?

Thanks for clarifying!


I assume this lasts only until a reboot. Can you explain how to make this permanent after a reboot?

Thanks again!

It only limited download speed.

You can write the script in /etc/rc.local so that it works each reboot.

Thank you.

The script shows one line with 1000Mbps and one with 1Mbit. Is that correct to cap download at 1Mbs?


You need to modify the number to satisfy your own needs.

Im trying to throttle/limit bandwidth.
Ive installed SQM as many say its better.

My WAN is my tethered phone.
Using it is rinsing data really fast, so want to limit my connection to it.
On my device, in Interfaces, my Tether is named ETH1

BASIC SETTINGS > eth1 and limited UL/DL by 50% from preliminary tests.
QUE DISCIPLINE > cake+piece of cake
LINK LAYER > I’ve tried all three DEFAULT, ADSL & ETH

Ive also done all BASIC SETTING using LAN aswell as ETH1

But everytime my bandwdith UL/DL doesn’t change.

In this thread you talk about it being SPECIFC to devices.
But if that’s the case, then where do I nominate/designate the device?
Or is it QOS that is device specific?

Im stumped on this.
i paid someone techy who knows Open WRT and they said its a firmware glitch.
Im running 18.06 on GLI 3.105.
All the helps files (yours included) say it should work fine.

Really confused.
Any help or nudges from anyone greatly appreciated.


Let’s wait a few days to upgrade to openwrt 1907 and try again