On Saturday 26 October 2002 00:25, Axel Loewe wrote:
> hi,
>
> i want to decrease the upload-bandwith used by a user with the uid xyz
> (only one programm running under this user), so i mark the packets with
> iptables by adding the following rule:
> iptables -A OUTPUT -t mangle -m owner --uid-owner xxx -j MARK --set-mar=
k 1
> now my problem is what to do after this ;) catch all the packets in an
> extra table but what then? to me it doesn't matter wheter to use cbq or
> htb, but htb seems easier to me ;) how do i add a qdisc that only
> applies to the packets in this special table?
Add a qdisc, add 2 classes (one for the user and one for the rest), give =
the=20
first class less bandwdith, use the fw filter to catch the marked packets=
and=20
put them in the first class, use a second filter (or in case of htb, make=
the=20
second class the default class) to put all other packets in the second cl=
ass.
If you do that, you can control the traffic of the user like you want. Y=
ou=20
can even let it use all available bandwidth, but if someone else wants to=
do=20
it, he has to wait.
More info about shaping can be found on www.lartc.org and www.docum.org. =
You=20
need the fw fitler and cbq or htb to create the qdisc and classes.
Stef
--=20
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net