How to limit a network?

Asked by tashi

Hello,

I'd like to limit my network use, for instance telling to my Ubuntu to use maximum 5 or 10 K/s. How to limit a connection usage that way? I'm sure there must be an official command to do this, to limit the network usage on a precise interface, but I still don't know yet what to type!

And I think it must be moreover possible to limit the network usage per PID, could someone tell me the way to do it?
I'd like to know also how to study the network consumption per PID, could someone tell me the trick?

For your information, I use Ubuntu 10.4 since today, and I dislike it a bit so far...

Thank you all for you tricks, please!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-nettool Edit question
Assignee:
No assignee Edit question
Solved by:
tashi
Solved:
Last query:
Last reply:
Revision history for this message
Thomas Krüger (thkrueger) said :
#1

There are some tool that can do traffic shaping. They can be installed via synaptic. Use the one that fit you best:

- wondershaper
- shaperd
- trickle

Revision history for this message
tashi (pierre-mirmont) said :
#2

Thanks a lot!

I've searched on Google about all these (shaperd "network limit") for everyone, and are you sure it's not shapered? ;)

Anyway, I already installed trickle, but I'd like some tricks on it to know how it works please.
I've tried typing (as root of course) trickle -f -u 1, 1 Ko/s would have been good test for a basic test, but it did not work at all..

If ever you have some tricks about the command to launch with witch-ever program you want, please tell me what to type to manage it!

Thanks a million for telling me the names of these programs, and yes trickle seems to be able to work quite well for instance.

Thanks to tell me more about how to use one of these programs later, and good bye!

Revision history for this message
tashi (pierre-mirmont) said :
#3

Arfff, not easy actually!

I've tried with pidgin and it did work quite well, with even just 10k/s reception/emission :), but with thunderbird I couldn't set any limit! Could you please tell me, maybe by another way, how to set a limit? (maybe general, as root this time...)
Probably I should have a look at the other programs you told me about, but don't know yet...

And it does even not look like thunderbird just needs MUCH MORE network, I've tried with "-u 999999999" and "-d 999999999", but it does not even create a simple window... However the process exists, just nothing efficient is created!

But do you also know a program to monitor the network usage per process, please?

Revision history for this message
Dawning (dawning) said :
#4

If you need a more intense solution, I believe "iptables" is still at your disposal... I'm unsure as I haven't used iptables for a LONG time now.

That said, I don't think iptables has ever supported traffic controls with pid being a factor.. But I'm far from an expect on the subject.

Revision history for this message
tashi (pierre-mirmont) said :
#5

...

Ok, but could you please help me to find some docs on iptables?
Probably enough on the manpage, or even on google "iptables", but not yet tried... Will try to do it tonight.

Anyway, go advice, I think I may need to use "iptables" for this, thanks again!

Revision history for this message
Launchpad Janitor (janitor) said :
#6

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
tashi (pierre-mirmont) said :
#7

Not any-more answer?

Revision history for this message
tashi (pierre-mirmont) said :
#8

OK, so let's describe the problem as solved, because I don't actually want to limit my own network usage...

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#9