OpenWrt Forum Archive

Topic: Simple way to limit one (guest wifi) interface to a maximum bandwidth

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

I have setup my wireless to have to SSIDs, one is for me, encrypted and is unlimited, the other is open and limited. But I am struggling how to limit the bandwidth simply. I am not interested in shaping and such, so http://wiki.openwrt.org/doc/uci/qos is not an option for me. I just want to give those passing by an 512/128kbit link and then they can do with it as they please.

The simplest solution was to install wshaper and put the limits to /etc/config/wshaper as follows:

config 'wshaper' 'settings'
    option 'network' 'wl0.1'
    option 'downlink' '512'
    option 'uplink' '128'

And it somehow works, but it shapes the traffic anyway and downloads are around 130kbits at maximum, which is lower then I would like it to be. Is not there a simple command that would limit an interface to certain speed? I have seen this question asked a lot but never succesfully answered.

No there is no simple signle command to do that.

if this is still an issue, checkout http://robin.forumup.it/about2647-0.html... i think you have to reverse your thinking about what downlink and uplink mean... i'm guessing there are some cases where downlink=download speed and uplink=upload speed but given that your download speed is suspiciously close to to your uplink limit, i think for you uplink=download speed and downlink=upload speed

so what you want is

config 'wshaper' 'settings'
    option 'network' 'wl0.1'
    option 'downlink' '128'
    option 'uplink' '512'

i don't know how wshaper works, but   on my home router i use  the "teaman" build of Tomato  (http://code.google.com/p/tomato-sdhc-vlan/ ) to do something like that.   In the GUI it's the "bandwidth limiting"  not the "QoS" settings though under the hood it uses the same QoS functionality  ( "tc" stuff).   

I was amusingly reminded that i had set this up just last week when i finally upgraded from DSL to cable modem.    Plugged in through the modem... speed test was 20+ mbps.     do it through the router:  2900 kbps  every time.    Took me a good 10 minutes to realize what was going on.

rmanna wrote:

if this is still an issue, checkout http://robin.forumup.it/about2647-0.html... i think you have to reverse your thinking about what downlink and uplink mean... i'm guessing there are some cases where downlink=download speed and uplink=upload speed but given that your download speed is suspiciously close to to your uplink limit, i think for you uplink=download speed and downlink=upload speed

so what you want is

config 'wshaper' 'settings'
    option 'network' 'wl0.1'
    option 'downlink' '128'
    option 'uplink' '512'

Oh, I see. Stupid me. Thanks a lot!

The discussion might have continued from here.