User avatar
dwywit
Posts: 21
Joined: Mon Aug 13, 2012 9:50 am

QoS/throttling

Mon Aug 13, 2012 10:38 am

Hi all - Had my Pi for ~2 weeks now, learning and trying something new most nights - I only get about an hour/day to play on my new toy :(

I'd like to try using it as a QoS device, i.e. actually throttling some internet loads to a specific percentage of maximum.

The devices in our house that need internet access are slowly but inexorably growing - so far there are 3 x desktops, 4 x laptops, an android phone, an iPad, and an Xbox 360 - plus whatever I might bring home for repairs.

I fix computers for a living so I end up with throw-aways that I repair and re-purpose, e.g. one of the laptops has a dud HDD so it boots Ubuntu from a USB stick and plays music for me (I can recommend subscribing to http://www.live365.com ;) ).

Anyway, between minecraft (wife, son, & Daughter) and xbox online (son) I think I need to throttle some loads. I've tried setting QoS on the broadband modem (Thomson Speedtouch 510) by uploading a modified config file, but it's not doing what I want - it prioritises the various loads but still tries to give everyone as much of the pipe as is available.

I think this is the way to do it - use the Pi as: 1. the default gateway and DHCP server for the local LAN (probably simple and I can re-configure all the local nodes quite easily), 2. a QoS server to determine the amount of bandwidth a particular node is allowed to have. We have a LAN with equipment of various speeds, so lets just say it's a mixed LAN/WLAN with 100Mbps and 54 Mbps. The ADSL broadband runs at about 5Mbps down and 384Kbps up. I'd like to limit each node to about 1.2Mbps down max. That's enough for streaming TV (http://www.abc.net.au/iview), and all other uses. I can throttle my radio-playing laptop down to 128Kbps (plus some overhead), because that's the highest quality service I use.

Any suggestions?

cheers

Bernie Dwyer

Wendo
Posts: 142
Joined: Sun Jun 10, 2012 8:27 pm

Re: QoS/throttling

Mon Aug 13, 2012 11:09 am

Well firstly, the pi only has one network port, so your first problem will be getting a second interface of some sort. After that, you'll need to get familiar with iptables and it's limiting options.

I would have though real QoS would have been a better option however. What if there is only one person using the internet, they would still be limited to that 1.2Mb

User avatar
dwywit
Posts: 21
Joined: Mon Aug 13, 2012 9:50 am

Re: QoS/throttling

Mon Aug 13, 2012 10:55 pm

Hi - thanks for your response. I've got a USB ethernet adapter in my "emergency" kit (to keep customers connected if their own adapter fails), so I can use that as the second interface.

The worst contention happens at predictable times, so perhaps I could use cron to load different iptables configurations at those times. I'm investigating this as a lower-cost option - putting in a managed switch with configurable QoS will cost me a lot more than the Pi did.

CCitizenTO
Posts: 83
Joined: Sun May 20, 2012 2:14 am

Re: QoS/throttling

Wed Aug 15, 2012 4:54 pm

First off you're probably better off using a customized firmware like OpenWRT or Tomato on your router to achieve these goals because your router is basically the gateway to the internet. Secondly I dont think you understand what QoS normally does.

The RPi comes with a single 100Mbps ethernet jack. Thus you would need a USB Wired Ethernet Dongle and probably a powered hub to run it (consider this is about $40 for the bundle). You would also need to plug it in inbetween your modem and router for it to work. As well other people trying to use it as a Firewall (similar idea in principle) have found it to be insufficient for their needs making everything run slowly.

QoS stands for Quality of Service. It does not under normal circumstances 'throttle' connections. What it does is normally it allows protocols and applications which are 'lag sensitive' to move to the front of the line. So if you're using VOIP, Video Chat or Internet Gaming those packets are moved to the front of the line. Think of it like a special lane for VIPs on a highway so they can get where they need to go without the trouble of dealing with traffic congestion. If there isnt traffic on the highway then it doesnt matter because everything will be moving quickly.

User avatar
dwywit
Posts: 21
Joined: Mon Aug 13, 2012 9:50 am

Re: QoS/throttling

Thu Aug 16, 2012 7:17 am

Hi - yes, I already have a USB ethernet dongle (as mentioned above), and I'm aware that "QoS" is more a method to prioritise selected traffic, rather than put a hard limit on it - perhaps I used the wrong term. I've got a WRT54G but it's the v7 version - no open source substitute available due to memory constraints (last time I looked). The main modem/router here is the Speedtouch 510 - yes, it's old, but it's also outlasted and out-performed a couple of newer alternatives.

Okay, let's put it this way - I'm the household ISP with approx 5Mbps available to my "customers". I'd like to guarantee the 2 main customers (myself and wife, 1 x desktop and 1 x laptop) a minimum bandwidth of 1.2Mbps each, and the kids (2 x desktops) at least 896Kbps each or thereabouts. The remaining customers (iPad, android phone, xbox, and 2 or 3 other laptops) can fend for themselves, or I'll manage their loads via QoS on the Speedtouch - I've already put my machine in the "expedited forwarding" queue (I don't do VOIP, gaming, or other "lag sensitive" stuff, but I don't want my work held up while others play games or watch streaming video).

I suppose I'm looking for a monitor program that guarantees a minimum bandwidth to selected clients, i.e. a set percentage of the total available, regardless of the total load. If that means the iPad or xbox only "sees" a pipe of 256Kbps, that's acceptable.

cheers

Arne.F
Posts: 3
Joined: Tue May 22, 2012 11:13 pm

Re: QoS/throttling

Thu Aug 16, 2012 3:02 pm

Have you already tried IPFire (http://www.ipfire.org) for this. IPFire support QoS via Portrules and also via Layer7 deep packet inspektion (not sure if the Raspberry Pi is fast enough).

Newest arm images (for kirkwoord, RPi and Pandaboard) can found here:
http://people.ipfire.org/~arne_f/testin ... el-update/

For RPi use the version without "-scon" (serial console)

User avatar
dwywit
Posts: 21
Joined: Mon Aug 13, 2012 9:50 am

Re: QoS/throttling

Fri Aug 17, 2012 2:33 am

Thanks - I'll check it out.

Return to “Networking and servers”