Properly throttle bandwidth per user

2

1

To be clear from the get-go: I did search before asking this question. I've found the following articles: How to throttle bandwidth on a Linux network interface? and Bandwidth Throttle for linux.

They all mention wondershaper, trickle, webHTB, pyshaper etc. None of which helped me so far. I tried doing some scripting with tc but i got lost.

Scenerio:

We are at a lan party sharing a 50 mbit internet connection. If somebody decideds their game needs updating they would hog the whole connection and all of the other connections will become unusable. To counter this we installed a windows box with netlimiter and limited the connection to 2mbit per person (which is a pain in the ass because we have to do it per-ip).

However, we want to make a more professional setup and move the throtteling to our router server (which runs ubuntu with bind and dhcpd). We just can't figure out how to properly throttle the internet connection on eth0 to 2 mbit per user. Tools like wondershaper all limit traffic on an interface. Which means the 10mbit throttle is shared by all users on that interface. We only want to limit users to use up to 2mbit on the eth1 interface.

If we could supply an ip range that would be incredibly helpful.

Does anybody have any idea how to achieve this? The only tool we did not try yet is pfsense.

Thanks!

thecodeassassin

Posted 2014-05-27T12:46:48.497

Reputation: 121

No answers