OpenWrt Forum Archive

Topic: Bandwidth control of WiFi users

The content of this topic has been archived on 4 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello, I have OpenWrt Chaos Clamer and I would like to make internet stable for WiFi users.

my scenario: router is in my small cafe, and I would like to make it stable. So, if someone will start to downloading something, internet must not be slow for another users. I would like something like auto-Bandwidth controlling... I don't want to set up exact speed on exact IP. My goal is just stability of WiFi's users.

I have found https://wiki.openwrt.org/doc/howto/sqm this tutorial. Is this what I need?

Just tell me how is this possible and which tools I need. I will not ask dumb questions.
Thanks

Openwrt from the box uses fq_codel. Although its not enough for prioritizing kinds of traffic  its enough to make everything responsive for all

So there is no way to "make stable" internet for all users on wifi ?

Don't do this myself. From here, this setup:

## load balanced sqm by ip
 
config queue
    option debug_logging '0'
    option verbosity '5'
    option squash_ingress '1'
    option ingress_ecn 'ECN'
    option enabled '1'
    option interface 'eth0'
    option download '38000'
    option upload '9200'
    option qdisc 'cake'
    option script 'layer_cake.qos'
    option qdisc_advanced '1'
    option squash_dscp '0'
    option egress_ecn 'ECN'
    option qdisc_really_really_advanced '1'
    option iqdisc_opts 'dual-dsthost nat'
    option eqdisc_opts 'dual-srchost nat'
    option linklayer 'ethernet'
    option overhead '12'
    option linklayer_advanced '1'
    option tcMTU '2047'
    option tcTSIZE '128'
    option tcMPU '0'
    option linklayer_adaptation_mechanism 'cake'

supposedly does as the comment states.

Thank you very much. Will try it out.

@midler I think you would be pleased by how well the SQM-QoS works at making all your cafe users happy. It automatically shares the bandwidth between people, so everyone gets their "fair share". Plus everyone gets good latency all the time.

And it's easy to set up - you already found the SQM Howto tutorial. Try it. It'll take you 10 minutes to set up. If you're happy with the result, then you're done and you can go back to running the cafe. If it doesn't do the trick, you'll have more information about the traffic, and can use more complicated setting like the one proposed by Villeneuve.

Please report back - we'd love to hear how it functions for you.

Thanks for your responses, friends. Villeneuve's configuration does not works as latest kernel version is not supported for cake's dependency (kmod-sched-fq_pie). I had compiler problems while trying to integrate cake into my firmware...

richbhanover, the default settings are working just fine. I have tested 5 devices so far. 2 Devices were downloading big game same time with max speed (downloader) and other wifi clients were watching Youtube videos at same time. No lag, no freezes, no buffering stucks. Everything works just fine. My current (default) sqm conf file contains -
config queue
    option debug_logging '0'
    option verbosity '5'
    option download '30000'
    option upload '10000'
    option qdisc_advanced '0'
    option linklayer 'none'
    option enabled '1'
    option qdisc 'fq_codel'
    option interface 'wlan0'
    option script 'piece_of_cake.qos'


Thanks to all, for your responses, again

(Last edited by midler on 27 Nov 2016, 00:26)

midler wrote:

richbhanover, the default settings [for SQM] are working just fine. I have tested 5 devices so far. 2 Devices were downloading big game same time with max speed (downloader) and other wifi clients were watching Youtube videos at same time. No lag, no freezes, no buffering stucks. Everything works just fine.

This is so cool. The theory says, it should work fine.

But it's so rewarding to hear people say that SQM (and fq_codel) "just works". Thanks.

richbhanover wrote:
midler wrote:

richbhanover, the default settings [for SQM] are working just fine. I have tested 5 devices so far. 2 Devices were downloading big game same time with max speed (downloader) and other wifi clients were watching Youtube videos at same time. No lag, no freezes, no buffering stucks. Everything works just fine.

This is so cool. The theory says, it should work fine.

But it's so rewarding to hear people say that SQM (and fq_codel) "just works". Thanks.

I feel inspired to try SQM again, despite not understanding the details on how it works. wink

I have an honest 100mbit/s fiberoptic connection and almost all of my traffic goes out via VPN, which my router can handle up to 30mbit/s.

Do I still set sqm for the WAN interface or just OpenVPN interface?
What should I set my download/upload rates to?
For Link Layer Adaptation I'm only presented with two options in luci: Ethernet with overhead/ATM. Which one do I choose and what is the recommended per packet overhead value?

SQM works great but you should fine tune download and upload speeds. These adjustmens are very sensitive. If set too high, no SQM effect. If set too low, your overall internet speed gets limited.

The discussion might have continued from here.