Re: shaping marked packets

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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-mark 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 
first class less bandwdith, use the fw filter to catch the marked packets and 
put them in the first class, use a second filter (or in case of htb, make the 
second class the default class) to put all other packets in the second class.
If you do that, you can control the traffic of the user like you want.  You 
can even let it use all available bandwidth, but if someone else wants to do 
it, he has to wait.

More info about shaping can be found on www.lartc.org and www.docum.org.  You 
need the fw fitler and cbq or htb to create the qdisc and classes.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux