Throttle Bandwidth / Bandwidth Sharing

General discussion about Gargoyle, OpenWrt or anything else even remotely related to the project

Moderator: Moderators

Trailblazer
Posts: 113
Joined: Wed Mar 09, 2011 3:12 am

Throttle Bandwidth / Bandwidth Sharing

Post 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:
Netgear WNDR3700V2 Gargoyle 1.10.0
TP-LINK Archer C7 v4 Gargoyle 1.12

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Throttle Bandwidth / Bandwidth Sharing

Post 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.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Trailblazer
Posts: 113
Joined: Wed Mar 09, 2011 3:12 am

Re: Throttle Bandwidth / Bandwidth Sharing

Post 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!
Netgear WNDR3700V2 Gargoyle 1.10.0
TP-LINK Archer C7 v4 Gargoyle 1.12

sda
Posts: 9
Joined: Fri Mar 25, 2011 11:20 am
Location: Lesvos Greece

Re: Throttle Bandwidth / Bandwidth Sharing

Post 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

viperpiper
Posts: 4
Joined: Tue Mar 08, 2011 8:29 pm

Re: Throttle Bandwidth / Bandwidth Sharing

Post by viperpiper »

This goes back to a question I asked earlier. If in the future quotos can be managed by mac address as well.

pbix
Developer
Posts: 1373
Joined: Fri Aug 21, 2009 5:09 pm

Re: Throttle Bandwidth / Bandwidth Sharing

Post 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.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

1an
Posts: 41
Joined: Wed Aug 11, 2010 7:18 am
Location: Australia

Re: Throttle Bandwidth / Bandwidth Sharing

Post 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
Buffalo WZR-HP-G300NH = Gargoyle 1.5.3
Linksys WRT54GL v1.2 = Gargoyle 1.3.13
SMC Barricade SMC2804WBRP-G = SMC firmware v2.08

Trailblazer
Posts: 113
Joined: Wed Mar 09, 2011 3:12 am

Re: Throttle Bandwidth / Bandwidth Sharing

Post 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.
Netgear WNDR3700V2 Gargoyle 1.10.0
TP-LINK Archer C7 v4 Gargoyle 1.12

Trailblazer
Posts: 113
Joined: Wed Mar 09, 2011 3:12 am

Re: Throttle Bandwidth / Bandwidth Sharing

Post 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!
Netgear WNDR3700V2 Gargoyle 1.10.0
TP-LINK Archer C7 v4 Gargoyle 1.12

Trailblazer
Posts: 113
Joined: Wed Mar 09, 2011 3:12 am

Re: Throttle Bandwidth / Bandwidth Sharing

Post 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!
Netgear WNDR3700V2 Gargoyle 1.10.0
TP-LINK Archer C7 v4 Gargoyle 1.12

Post Reply