Traffic shaping - Bandwidth shaper / management (For Linux)
Follow @ggarron1. The problem
You have limited bandwidth, which you need to share with some others or just between different services on you PC. So you need a tool that can shape, control and manage the bandwidth so everybody can make a responsible use of it.
2. The solution
Here is where trickle comes to help us. trickle - a lightweight userspace bandwidth shaper, that will help use control the use of our bandwidth.
- Installing it.
For Centos and Fedora
yum install trickle
For Debian and Ubuntu
apt-get install trickle
This will actually install two binaries: trickle which is the stand alone version trickled which is the daemon version
How to use it
Stand alone
The syntax is: trickle [-h] [-v] [-V] [-s] [-d rate] [-u rate] [-w length] [-t time] [-l length] [-n path] command man trickle for more details The example is:
trickle -d 20 wget http://url.of.the.site/file.to.download
+ Daemon The use of the daemon version is more useful specially because you will not need to enter the parameters each time you use trickle just enter. i.e. trickle ssh -l user ip.of.the.server And the daemon will look on its config file to follow that policies. All the configuration should be done in the file: /etc/trickled.conf Here is an example of that file:
[ssh] Priority = 1 Time-Smoothing = 0.1 Length-Smoothing = 2 [ftp] Priority = 8 Time-Smoothing = 5 Length-Smoothing = 20