Page 1 of 3

Throttle Bandwidth / Bandwidth Sharing

Posted: Sat Mar 26, 2011 6:29 pm
by Trailblazer
Hi Guys,

I have been using Gargoyle for a few weeks now. Just now really did a test with multiple users. The behavior is not as I hoped it would be using the quota function, but it makes sense that it's the way it is.

Have a wireless network that I want to force users to share bandwidth on all the time. It's a campground so people come and go, IP's get handed out and used for a while and then the leases get reset.

I set up a quota with the per user U/D max to 1MB and then throttled the connection like I wanted for One User. It throttles the whole connection to that amount, not per user.

How can I do this with my wonderful new friend, Mr. Gargoyle?

Thanks!

PS - I know if I use static IP's I can do this with the quota system...can I set up a quota for non-static IP's and then hand them out with quotas attached to them??? :ugeek:

Re: Throttle Bandwidth / Bandwidth Sharing

Posted: Mon Mar 28, 2011 7:15 am
by pbix
Not much to go on here. You need to post all the details on all the setting screens you are working with. I am not sure if you complaint refers to Quotas or QoS.

Re: Throttle Bandwidth / Bandwidth Sharing

Posted: Mon Mar 28, 2011 12:48 pm
by Trailblazer
Hi pbix,
Thanks for the response. You're right, so here is the screenshot of the quota window that I'm trying to do this with.

Image

I'm trying to use Gargoyle to limit bandwidth all the time on each dhcp client on a wireless network so that no one client may hog all the bandwidth by playing a netflix movie, for instance. Maybe this isn't the right way to do it.

I expected When Exceeded: Throttle Bandwidth to do so on each client individually since Applies to: is set to All Individual Hosts. The behavior I observed when using these settings is that the bandwidth of the whole WAN connection is throttled down to the rate you see set here. That makes sense when dealing with ISP quotas, but not when attempting bandwidth sharing with no quotas.

Thanks!

Re: Throttle Bandwidth / Bandwidth Sharing

Posted: Mon Mar 28, 2011 5:02 pm
by sda
Hi,
If you don't have too many "clients" you could insert individual IP's for each rule.
I have a DHCP pool of 15 clients, and have made 15 rules, as IP range gave me the problem you described.
You can block the rest so they can't log in using static IP's out of your pool (without rules)

Cheers

Re: Throttle Bandwidth / Bandwidth Sharing

Posted: Mon Mar 28, 2011 8:13 pm
by viperpiper
This goes back to a question I asked earlier. If in the future quotos can be managed by mac address as well.

Re: Throttle Bandwidth / Bandwidth Sharing

Posted: Mon Mar 28, 2011 8:35 pm
by pbix
I suspect that Quotas does not work as you think it does in that the limitation applies to "All hosts" in aggregate instead of individually but Eric would have to confirm it.

The only way to do this is with individual IP addresses and no direct way to do it with MAC addresses. You can however assign IPs to MAC so you can do this indirectly.

Another way to do this is with QoS and not quotas again my IP address setting a separate class for each.

Re: Throttle Bandwidth / Bandwidth Sharing

Posted: Tue Mar 29, 2011 12:18 am
by 1an
Trailblazer,

I can see why you thought that the quota you set (from your screenshot) would limit each user individually to the quota you set, but this particular option sets a single combined quota for all users without explicit quotas defined. If you set the quota as shown, then look at the quota_usage page, it is listed as "all others combined". Many (most?) people are using gargoyle in a different setting to you, where there is a small pool of known MAC addresses, rather that a large and dynamic pool of unknown MAC addresses (ie: that are not known in advance) connecting to their router. In this usual setting it makes sense to have each known MAC address assigned a fixed ip address, each user's different devices (identified by MAC address) assigned to a continuous range of ip addresses, and quota's set per range. Guest users can still be accommodated with a separate small pool of dynamically assigned ip addresses, with a (smaller?) combined total. This setup makes for fair sharing of available upload/download quota per billing period, between normal users, with minimal intervention (other than telling them the router's PSK) to allow access to any temporary guests.

It looks like what you want is a captive portal/hotspot. As far as I know, as yet no easy way exists to implement this using Gargoyle. (see a couple of older threads which explain the issue(s), one from Sept 2010, and one from April 2010)

A little digging around on the internet suggests that none of the possible addons (nocatsplash, nodogsplash, CoovaChilli, WifiDog) have been upgraded to work with the current (Backfire) version of OpenWRT, and are not trivial to install in any case/ or may not do more than provide a splash screen without actually limiting quota/bandwidth (nocatsplash, nodogsplash). WifiDog looks closest to doing what you want, but looks like it might be a pain to get running, and require other resources than just an OpenWRT router (eg Gargoyle) to implement.

The posts referred to above suggest that a captive portal is on Eric's todo list for Gargoyle, but implementing wireless N, upgrading to 2.6 kernel and tracking down subtle bugs have been higher priority for a while now. I have no knowledge of what timeframe is involved in implementing such a feature for Gargoyle.

In the meantime, you could setting individual quotas for each ip_address in your DHCP range, with suitable throttling once the quota is reached. You would need a big enough DHCP range to allow 1 ip_address each for your usual number of campers, + some spare capacity to allow for people leaving and others arriving on the same day. If you set DHCP lease time for 24 hours, and the quotas to reset daily (as you indicated with your screenshot), each user would keep their ip_address and quota, unless they do something active (of course tech-savvy users can change their MAC or ip addresses, and therefore get a new quota).

As pbix suggested, the other way to get close to what you want is to use QoS to ensure that everyone has a fair share of the current bandwidth, but I have no experience using this feature of Gargoyle.

Ian

Re: Throttle Bandwidth / Bandwidth Sharing

Posted: Tue Mar 29, 2011 1:06 am
by Trailblazer
sda wrote:Hi,
If you don't have too many "clients" you could insert individual IP's for each rule.
I have a DHCP pool of 15 clients, and have made 15 rules, as IP range gave me the problem you described.
You can block the rest so they can't log in using static IP's out of your pool (without rules)
Thanks, sda. Yeah, I think I'm going to have to do like 50-60 rules. I'm testing it now with just a few rules.

At least I've got a solution now. I was definitely hoping that Eric could weigh in and let me know if this is possible or if it's on the radar.

Re: Throttle Bandwidth / Bandwidth Sharing

Posted: Tue Mar 29, 2011 1:27 am
by Trailblazer
1an wrote:Trailblazer,

I can see why you thought that the quota you set (from your screenshot) would limit each user individually to the quota you set, but this particular option sets a single combined quota for all users without explicit quotas defined. If you set the quota as shown, then look at the quota_usage page, it is listed as "all others combined". Many (most?) people are using gargoyle in a different setting to you, where there is a small pool of known MAC addresses, rather that a large and dynamic pool of unknown MAC addresses (ie: that are not known in advance) connecting to their router....
1an,
Thanks very much for the comprehensive post. Yes, I have been getting the feeling that you guys in Australia have been using this firmware 'down under' where your quotas are strictly enforced? I initially got really excited about this firmware because I thought it would easily solve my problem. It's definitely amazing firmware, especially the monitoring/graphing/status module, however it isn't made to do what I want to do with it.

How do the DDWRT guys do it on their 'Special' version, then? They have per user bandwidth throttling and it works. I don't like other stuff about the firmware, but that part is nice.

Yeah, I know Eric and pbix already had a long list before I came along. I like the firmware a lot and really appreciate you guys' efforts. I have it running on WZR-HP-G300NH and it's doing fine...I'm going to experiment with creating individual rules for the DHCP pool but as pbix pointed out, I may be able to use QOS to handle some of what I want to do. QOS is the way things are going...I need to learn more about it so this is a good opportunity.

Thanks again!

Re: Throttle Bandwidth / Bandwidth Sharing

Posted: Tue Mar 29, 2011 1:41 am
by Trailblazer
pbix wrote:Another way to do this is with QoS and not quotas again my IP address setting a separate class for each.
pbix,
How would I do this? Would I setup a Classification Rule for each IP address in the DHCP pool using connection bytes (as a type of quota) to force them to a lower service class???

I somewhat understand the theory of QOS...any recommended reading, like QOS for Dummies? :roll:

If what I'm trying to do is handled better by QOS...well, I've been known to go down the wrong road before simply because I was hard-headed about something.

Here's my thoughts on network management:
1) Limit ports - old thinking, too much admin
2) Limit content - old thinking, pain when people can't get somewhere they really need to go.
3) Limit bandwidth - better! little admin! They can go anywhere!
4) QOS to the rescue????

Thanks!