[TriLUG] preferential traffic shaping

Alan Porter porter at trilug.org
Mon Oct 3 10:55:31 EDT 2005


I would like to run bittorrent "in the background", so that it
uses idle bandwidth, but so that it yields whenever anything
else is going on.

"tc" seems to be the tool to do this, but its notation is very
complex.  I have also played with "tcng", which has an easier
syntax (it generates tc commands).

I tried a few experiments, but they did not seem to have any
effect whatsoever.  My test went something like this:

 - start a "btlaunchmanycurses" session and let its upload
   speed get up to a maximum level
 - start an "scp" file transfer
 - I expected to see the bittorrent upload rate decrease
   while the scp ran at full speed

For the most part, I was trying to assign a lower priority to
any traffic that has a source port of 6881.  My experiments did
not work.

Has anyone else done this?  Is "tc" the right tool?  Is this
something that should be done with "iptables" instead?  Or
perhaps both together?


Alan





More information about the TriLUG mailing list