Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

We regularly host a number of students for a LAMP workshop that goes for about six weeks. During class time, there usually aren't problems with network traffic. It has been the case, though, that they have left bit torrent software running in the background OR on breaks they want to watch streamed video. The problem is that other students want to continue working on projects and the students that are using bit torrent apps/streaming video make the LAMP development process unusable.

I've tried making announcements and encouraging people to be considerate of one another. The reason why this hasn't worked is because:

  1. They forget they are running a BT app in the background.
  2. During break time, they assume no one is doing work (which is sort of reasonable because it is called 'break time').
  3. They forget that watching video effects other people.

All of the students are compliant. Asking them not to watch or to check if a BT app is running in the background results in them stopping that behavior. But I don't want to keep nagging.

I would like to find a mechanism to throttle bandwidth based on the data usage rate. I don't want to blacklist MAC addresses. Rules like the following would make the most sense to me.

  1. Initially, all devices have uncapped/unthrottled access to any network resource.
  2. If a device goes over 50KB/s for three seconds, they are throttled down to 10KB/s for a minute.
  3. If a device continues to try to upload/download beyond the prescribed limit, the throttle period increases exponentially (i.e. doubles each time).

To me, it's worth paying the money for a device that does this out of the box. I waste more money (i.e. time) trying to load custom routing software onto routers and trying to get them to do what I want them to do. If there's a device within my budget, I'd rather use that (let's just say within $500). But if DD-WRT or Tomato are the only ways to do this, please feel free to communicate this; I'd appreciate some configuration advice too! Thanks!

share|improve this question

closed as not constructive by Nifle, Indrek, Diogo, 8088, KronoS Aug 30 '12 at 20:53

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Sure. Retail versions of DD-WRT allow you implement QOS or throttling. If I remember correctly you can do so on Cisco APs as well, but that may require a WLC, which would be overkill.

I personally dig the Buffalo DD-WRT wireless routers. More features than you can shake a stick at... pricepoint ~$100.00

In the WebGUI for the Buffalo you can classify the traffic by tcp/udp port number and assign priority (High, Middle, Low) which if you shape the BT traffic, you may not have to worry...

You can also set hard limits but I've only seen that done via the command line (from the DD-WRT wiki)

  tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit 

  tc class add dev $DEV parent 1: classid 1:1 cbq rate 512kbit \
  allot 1500 prio 5 bounded isolated 

  tc filter add dev $DEV parent 1: protocol ip prio 16 u32 \
  match ip dst flowid 1:1

The first line installs a class based queue on your interface, and tells the kernel that for calculations, it can be assumed to be a 10mbit interface.

The second line creates a 512kbit class.

The last line tells which traffic should go to the shaped class. Traffic not matched by this rule is NOT shaped. You can make more complicated matches (subnets, source ports, destination ports)

share|improve this answer
Checking, the Cisco E3200 and E4200 also support QoS. – WayneLKearns Aug 29 '12 at 5:02
I'll look more into the command line tools that you've suggested above. Out of the box QoS features aren't exactly what I'm looking for: they tend to be set based on IP/MAC addresses. I don't want to have to set up rules for each IP/MAC address. Thanks! – Avery Chan Aug 30 '12 at 5:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.