Some times we need to limit the traffic that uses some applications. In my case, when I download big files. So:
If we use wget, It is doted with –limit-rate option that permits set the limit of traffic.
Example:
# wget –limit-rate=50k http://lexo.lx-networks.net/testingfile.gz
This example limits wget to uses 50KBps maximum of download traffic.
But … ¿what’s up when we need use other application that it hasn’t the same option like this? Don’t worry, looking for it option I found a solution to do it.
trickle: is a portable lightweight userspace bandwidth shaper. It can run in collaborative mode (together with trickled) or in stand alone mode.
It works by taking advantage of the unix loader preloading. Essentially it provides, to the application, a new version of the functionality that is required to send and receive data through sockets. It then limits traffic based on delaying the sending and receiving of data over a socket. trickle runs entirely in userspace and does not require root privileges.
Example:
# trickle -s -d 120 -u 100 firefox
This example limits to firefox uses 120KBps for download and 100KBps for upload of traffic.
These are simple methods, because we can use traffic control at kernel level.

0 Responses to “Bandwidth limit”