Is there a way to limit bandwidth in Linux?

5

1

I've setup a network which will have 3 users, two of them use a Windows based operating system and the other uses a Linux based one. It is a 12 MB ADSL2 connection and the idea is to distribute the bandwidth among the users (there is no server, just a Wi-Fi router).

For the Windows users there are several programs like NetLimiter to set a maximum amount, but what about Linux? How could that be done?

John

Posted 2009-10-25T13:01:15.547

Reputation:

Oh god! If only I could remember! There is an article out there on how to limit the bandwidth and the amount of packets dropped and all sorts of other settings, but I cannot seem to find it. I know it was used for web development or something... – Josh Hunt – 2009-10-25T14:41:40.303

This would leave each user having 4MB connection (probably higher, but not the full 12MB) even if the other two aren't using the connection all the time. You should have a look at QoS. This helps you giving all the users the full bandwidth while still ensuring fast connections. BTW, this is something the router should regulate, not the individual computers. – Georg Schölly – 2009-11-15T11:13:07.510

Answers

6

tc is a command line tool to shape/limit/schedule traffic

http://linux.die.net/man/8/tc

MDMarra

Posted 2009-10-25T13:01:15.547

Reputation: 19 580

2

Please be aware that tc is the gateway into the entirety of Linux QoS features and is very complex, but worth the effort if you are interested in this aspect of networking. This would be required reading beforehand: http://lartc.org/

– LawrenceC – 2012-03-25T03:51:35.253

2

Take a look at trickle.

John T

Posted 2009-10-25T13:01:15.547

Reputation: 149 037

1

Depending on your router it may support QoS. Which would make it so you did not have to install software on the client side.

Unfundednut

Posted 2009-10-25T13:01:15.547

Reputation: 6 650

0

It seems that wondershaper is exactly the right tool if you want to do it on per-pc basis. But I also agree with Georg, that some QoS directly in router might be a better approach - but you might happen to have router without QoS support, or you just prefer this solution anyway.

j_kubik

Posted 2009-10-25T13:01:15.547

Reputation: 363

0

I suggest seeing if your router supports dd-wrt. It is a Linux replacement for the stock firmware. It has facilities to do exactly what you need.

Patrick

Posted 2009-10-25T13:01:15.547

Reputation: 148