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: https://oldwiki.archive.openwrt.org/doc/uci/qos).

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?

Thanks,
Anand

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:

upload:

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.