Bandwidth limit

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

Moderator: Moderators

Post Reply
Abyss
Posts: 10
Joined: Fri Feb 11, 2011 4:59 am

Bandwidth limit

Post by Abyss »

Hi,

I have a pretty interesting issue (at least it is for me). I have a 10Mb/s download link from my ISP. I created three QoS classes:

Fast - 60%, max 2MB/s
Normal - 30%, max 2MB/s
Slow - 10%, max 2MB/s

I use Fast for 53, 80, 443 ports, Normal for 80, 443 con. bytes >1MB, slow for rest. I think this is the default Gargoyle setting, but I added the 2MB/s bandwidth limit.

One of the user however apparently found a way how to overcome the 2MB/s limit. He uses two ports 80 and another one - so he suddenly has 4MB/s speed.

I would like to limit each user 2MB/s, but also have the Fast/Normal/Slow classes. How to accomplish this? Does Gargoyle support this? Is it complicated to add this support.

Thanks for you help,
Abyss

robnitro
Posts: 84
Joined: Sat Feb 26, 2011 4:50 pm

Re: Bandwidth limit

Post by robnitro »

Put his IP into a quota with max 1 MB combined. After 1 MB all of his traffic will go into a class (example, bulk) with a limit set on it (DL/UL or both).

Abyss
Posts: 10
Joined: Fri Feb 11, 2011 4:59 am

Re: Bandwidth limit

Post by Abyss »

I can introduce another QoS class with 1MB/s limit and apply this class to his IP, but this means that the Fast/Normal/Slow QoS rules will not be applied. It means that if he will try to access WEB pages the connection will be probably slow, because no Fast QoS rule will be applied to WEB access.

If I understand correctly (correct me if I'm wrong), QoS searches the first table and if it finds a match applies the rule to that connection and exits. It would be nice if QoS could apply more than one rule to the connection. Something like QoS rule hierarchy. I would put a 1st level rule to all IPs with bandwith control 1MB/s, and put 2nd level rules for QoS - WEB, P2P, etc.

Maybe the wasted majority of issues could be resolved by 2 levels - or even hide the levels, just add bandwith control page, where we can setup a global DL/UP limit as well as limits for individual IPs/ports.

Maybe I'm wrong, just thinking loud. Correct me if I'm wrong and this can be solved by current implementation of QoS in Gargoyle.

Thanks, Abyss

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

Re: Bandwidth limit

Post by pbix »

Lets go back to the beginning on this.
I use Fast for 53, 80, 443 ports, Normal for 80, 443 con. bytes >1MB, slow for rest. I think this is the default Gargoyle setting, but I added the 2MB/s bandwidth limit.
Each class is limited as you specified and it does not matter how many connections or users there are. They all share the limit. So in your case each user can have some connections in each class so the the total is then 2+2+2=6Mbps maximum. If other users are online then his throughput will be slower since all must share the 6Mbps limit. Your goals seem not logical since your ISP provides 10Mbps and there is no way for the system to exceed 6Mbps so it seems you are wasting 4Mbps.

Lets think about your goals on this and then design some rules that will work. Why do you want to limit your users? From this answer we can make some good rules.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Abyss
Posts: 10
Joined: Fri Feb 11, 2011 4:59 am

Re: Bandwidth limit

Post by Abyss »

The numbers are just examples. I have a 10Mb/s DL from ISP with 200GB/month limit. After that they limit the speed to 2Mb/s. I have 20 users - 4 heavy P2P users, 5 sometimes use P2P or another heavy download, rest just WEB users.

One complain what I receive is that user have a P2P session and also browsing WEB. Thanks to Gargoyle and default QoS this solved this problem since the Fast QoS class prioritize the small WEB access requests and the download has lowever priority and percentual bandwidth.

Also using Gargoyle's quota system I can slow down P2P users. However I would like to keep the feeling for other users what sometimes downloads bigger files - if I have unused DL bandwidth, then they will not notice that the network is slower. Another (not negligible) think is that they "pay" for a specified bandwidth and not more.

I'm just guessing that my user started to download a file from a web page using 80 port and also started a P2P program which used another port for download. That is why he was able to download with 2+2 = 4Mb/s.

Thanks,
Abyss

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

Re: Bandwidth limit

Post by pbix »

I can see that you have some difficulties. You are trying to be an ISP for 20 users and this something that Gargoyle is not specifically designed for.

But Gargoyle has some features that should help you.

You can start with the QoS default classes which you have done. It should improve the situation.

After that you can use the quota's by user IP to limit how may GB they can use each month.

I suspect that perhaps this is not exactly what you want but is probably the best Gargoyle can do for you.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Abyss
Posts: 10
Joined: Fri Feb 11, 2011 4:59 am

Re: Bandwidth limit

Post by Abyss »

Yes, I expected that this is not possible to do this by Gargoyle's QoS. I have to say that Gargoyle is my favorit due to nice UI, graphs and easy usage. Maybe you could consider to add bandwith control DL/UP to Firewall section. That would be great. :-)

Thank you for your help,
Abyss

Post Reply