* [LARTC] shaping marked packets
@ 2002-10-25 22:25 Axel Loewe
2002-10-26 8:19 ` Stef Coene
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Axel Loewe @ 2002-10-25 22:25 UTC (permalink / raw)
To: lartc
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?
greets axel
p.s. sorry for my poor english
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] shaping marked packets
2002-10-25 22:25 [LARTC] shaping marked packets Axel Loewe
@ 2002-10-26 8:19 ` Stef Coene
2004-07-28 0:07 ` nix4me
2004-07-28 3:15 ` George Alexandru Dragoi
2 siblings, 0 replies; 4+ messages in thread
From: Stef Coene @ 2002-10-26 8:19 UTC (permalink / raw)
To: lartc
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* [LARTC] shaping marked packets
2002-10-25 22:25 [LARTC] shaping marked packets Axel Loewe
2002-10-26 8:19 ` Stef Coene
@ 2004-07-28 0:07 ` nix4me
2004-07-28 3:15 ` George Alexandru Dragoi
2 siblings, 0 replies; 4+ messages in thread
From: nix4me @ 2004-07-28 0:07 UTC (permalink / raw)
To: lartc
Hi,
I am trying to figure out how to shape the following marked packets and
limit them to a speed on 30KBytes. I have read the documentation but I
am unsue of what to do.
iptables -t mangle -A FTP-OUT -p tcp --dport 50000:51000 -j MARK
--set-mark 1
Mark
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] shaping marked packets
2002-10-25 22:25 [LARTC] shaping marked packets Axel Loewe
2002-10-26 8:19 ` Stef Coene
2004-07-28 0:07 ` nix4me
@ 2004-07-28 3:15 ` George Alexandru Dragoi
2 siblings, 0 replies; 4+ messages in thread
From: George Alexandru Dragoi @ 2004-07-28 3:15 UTC (permalink / raw)
To: lartc
tc qdisc del dev ethx root
tc qdisc add dev ethx root handle 1: htb
tc class add dev ethx parent 1: classid 1:1 htb rate 30kbps
tc filter add dev ethx parent 1: prio 0 protocol ip handle 1 fw flowid 1:1
On Tue, 27 Jul 2004 20:07:37 -0400, nix4me <nix4me@cfl.rr.com> wrote:
> Hi,
>
> I am trying to figure out how to shape the following marked packets and
> limit them to a speed on 30KBytes. I have read the documentation but I
> am unsue of what to do.
>
> iptables -t mangle -A FTP-OUT -p tcp --dport 50000:51000 -j MARK
> --set-mark 1
>
> Mark
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-07-28 3:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-25 22:25 [LARTC] shaping marked packets Axel Loewe
2002-10-26 8:19 ` Stef Coene
2004-07-28 0:07 ` nix4me
2004-07-28 3:15 ` George Alexandru Dragoi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.