QOS just for p2p downloads/streaming?

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

Moderator: Moderators

Zman
Posts: 29
Joined: Thu Sep 02, 2010 9:29 pm

QOS just for p2p downloads/streaming?

Post by Zman »

Hi guys.

Just got the WDNR3700 v2 today and flashed to 1.5.1

I live in a shared house situation where i pay for the internet and other people use it for free. Some people have been abusing this free service so i want to see if there is anyway to say only allow 10% of the connection speed to be used for the p2p downloaders and the p2p streaming apps like ppstream?

I have setup all my devices as a static ip and below the starting point of the DHCP. So all users within a given range gets caught into this p2p net. Right now i just used the quote of 1mb and once that is used it will automatically make them share max download and upload speeds.

Would appreciate any help with this

Cheers.

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

Re: QOS just for p2p downloads/streaming?

Post by pbix »

Zman wrote:Some people have been abusing this free service /quote]
Define abusing. Yes I know they are using p2p but how are you being hurt by this? It affects how you will design a response.
Zman wrote: Right now i just used the quote of 1mb
What does this mean? Are you using Quotas or QoS? Quotas are used to limit total downloaded bytes. QoS is used to provide fair sharing of available bandwidth. You did mention any type of download limit from your ISP so normally I would say that you should be using QoS.

Do you really want to limit a p2p user to 10% of the service even if no one else is using the service?
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Zman
Posts: 29
Joined: Thu Sep 02, 2010 9:29 pm

Re: QOS just for p2p downloads/streaming?

Post by Zman »

Hi sorry i should be more clear.

I have an unlimited quota from my ISP :D .They are using p2p streaming/downloading which in itself is not a problem but they are saturating the whole connection to a point where my modem was freezing up and crashing. I know the modem works fine and has for the last year and a half so that is the reason why i got the new router.

At the moment (setup the netgear yesterday) i have it set up with quota's. I set it so when this group of ips use 1mb they will be limited to 30kb/s upload and 400kb/s download which is about 30% and 40% of total bandwidth. I have set it up so during the night this limit will not apply.

I would love for there to be a way to give a group of hosts say 50% of download and 50% of the upload bandwidth and for them to have QOS applied to only this group. This will limit all p2p within the group to say max of 50% of its bandwidth allocation (25% of total bandwidth) and only have this QOS applied for the hours i set ;)

On another note when you go to add people to quota's is there any way to add a pop up of with a list of all available hosts and you can tick them and click add for the rules to apply to them? That would actually be a good feature :D

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

Re: QOS just for p2p downloads/streaming?

Post by pbix »

When it comes to policing such a system its best to start out simple and then expand as you learn. In the first place since your ISP does not enforce quotas then I do not think you should be either. I recommend that you disable Quotas and start by using QoS only.

Neither QoS or Quotas can tell which traffic is P2P and which is not so you have to change your thinking a little to think more about bandwidth regardless of what it is used for.

Starting with the default QoS setup what I would do is assign static IPs to all the devices you care about and then use a rule to direct them all to the "Fast' class. Next use the connection bytes feature to direct connections from other IPs that exceed say 1MB to the 'Slow' class. Finally all connections from other IPs under 1MB go to the default Normal class.

This will insure that you get bandwidth when you want it but still allow others to use all the bandwidth when it is not being used by you.

You did not mention why you need a time of day in what you are doing but it sounds like a complexity that you should deal with after you get the above working.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Zman
Posts: 29
Joined: Thu Sep 02, 2010 9:29 pm

Re: QOS just for p2p downloads/streaming?

Post by Zman »

Thanks for that pbix!

Say if i change it so FAST is 60%, Slow 10% Normal 30%

If im on the fast QOS profile, does that mean my max is 60% of the bandwidth or am i not understanding that properly :oops:

Also if i put everyone on slow which is 10%, what if 1 person is using p2p would the others be slowed down because of him because they are still on the same profile?

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

Re: QOS just for p2p downloads/streaming?

Post by pbix »

Its explained pretty well on the web page. Select the "More Info" item under the classes to get all the gory details. If you still have questions after that post them here.
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Zman
Posts: 29
Joined: Thu Sep 02, 2010 9:29 pm

Re: QOS just for p2p downloads/streaming?

Post by Zman »

:arrow: :arrow: :arrow: :arrow: :arrow:
Last edited by Zman on Wed Dec 07, 2011 12:19 am, edited 1 time in total.

Zman
Posts: 29
Joined: Thu Sep 02, 2010 9:29 pm

Re: QOS just for p2p downloads/streaming?

Post by Zman »

Upload - Main (60%) Slow (35%) VOIP (5%)

I have set that up in the QOS section.

Then i went into the bandwidth quota and and set it up so the range of ips i have for the other people im using i have set them to be throttled once the go over 1mb to go to the slow profile.

Can i ask if i dont put any rules for my ips will it sit outside of the QOS, effectively i will be able to use up minimum 60% of my bandwidth? Even if i add my ips in with say a limit of 5 TB which i will never go over, would that mean my ips are guaranteed a minimum of 60% of the bandwidth and going up all the way to 100 if no one else is using the other bandwidth?

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

Re: QOS just for p2p downloads/streaming?

Post by pbix »

We are using QoS at the moment and not Quotas and starting with default setup. This means you restore the default settings using System->Backup/Restore which will remove all the Quotas you have on the "Bandwidth Quotas" page.

All the setting you will change will be on the "QoS Upload" or "Qos Download" pages. Go to the "Qos Upload" page enable it and set the upload bandwidth to 90% of your measured upload bandwidth. Leave all the other settings unchanged for now. Then save changes on that page.

Now on the Qos Download page start your work. First enter your 75% of your measured download speed in the download bandwidth field. The classes at the bottom you are going to leave as the default. Lets concentrate on the rules at the top of this page. Given where you are just enable by saving changes and watch how the default rules work. Checkout the 'Status->Connection Lists' screen to see that all the traffic is going to the expected classes.

Now try to add a rule at the top of the list to for example direct all traffic bound for your personal computer to the fast class. You will use the destination IP address here for that which means your computer has a static IP address.

Once QoS is enabled nothing escapes it. If a rule does not classify a packet it falls into the default class. Remember we are doing something simple first so you can learn. Later you can make changes and add more options if needed.

You have asked about the 'percent bandwidth' class parameter. From the help on that page we have.
Percent bandwidth at capacity is the percentage of the total available bandwidth that should be allocated to this class when all available bandwidth is being used. If unused bandwidth is available, more can (and will) be allocated.
What part of this is confusing you?
Linksys WRT1900ACv2
Netgear WNDR3700v2
TP Link 1043ND v3
TP-Link TL-WDR3600 v1
Buffalo WZR-HP-G300NH2
WRT54G-TM

Zman
Posts: 29
Joined: Thu Sep 02, 2010 9:29 pm

Re: QOS just for p2p downloads/streaming?

Post by Zman »

Hi pbix, sorry im just that thick sometimes :lol:

OK so i have set it up as you have described.

I will add my computers to the fast profile and all others i dont add will be stuck on the slow profile by default.

I will see tonight when i play MW3 see if the QOS has made any difference. :(

Thanks again pbix!

Post Reply