* [LARTC] why so fast?
@ 2003-05-14 9:25 sun reflex4
2003-05-14 9:46 ` Stef Coene
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: sun reflex4 @ 2003-05-14 9:25 UTC (permalink / raw)
To: lartc
Hi,
I am doing some test to control outgoing traffic, and I want to see if
everything is working, but when I configure Compuetr A, and make a download
in Computer B from A (e.g. in Computer A Apache is installed), the download
goes so fast(not as in the ceil or rate!), even when I make the rate & ceil
too small, am I doing something wrong??
Example on Computer A:
tc qdisc add dev eth0 root handle 1: htb default 19
tc class add dev eth0 parent 1: classid 1:1 htb rate 10bps ceil 10bps
tc class add dev eth0 parent 1: classid 1:19 htb rate 15bps ceil 15bps
tc filter add dev eth0 parent 1: protocol ip handle 1 fw classid 1:1
iptables -t mangle -A OUTPUT -d 192.168.0.11 -j MARK --set-mark 1
#Compter B has ip 192.168.0.11
Thanx
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?pageþatures/junkmail
_______________________________________________
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] why so fast?
2003-05-14 9:25 [LARTC] why so fast? sun reflex4
@ 2003-05-14 9:46 ` Stef Coene
2003-05-14 10:02 ` sun reflex4
2003-05-14 10:11 ` Stef Coene
2 siblings, 0 replies; 4+ messages in thread
From: Stef Coene @ 2003-05-14 9:46 UTC (permalink / raw)
To: lartc
On Wednesday 14 May 2003 11:25, sun reflex4 wrote:
> Hi,
> I am doing some test to control outgoing traffic, and I want to see if
> everything is working, but when I configure Compuetr A, and make a download
> in Computer B from A (e.g. in Computer A Apache is installed), the
> download goes so fast(not as in the ceil or rate!), even when I make the
> rate & ceil too small, am I doing something wrong??
> Example on Computer A:
> tc qdisc add dev eth0 root handle 1: htb default 19
>
> tc class add dev eth0 parent 1: classid 1:1 htb rate 10bps ceil 10bps
> tc class add dev eth0 parent 1: classid 1:19 htb rate 15bps ceil 15bps
>
> tc filter add dev eth0 parent 1: protocol ip handle 1 fw classid 1:1
>
> iptables -t mangle -A OUTPUT -d 192.168.0.11 -j MARK --set-mark 1
> #Compter B has ip 192.168.0.11
Your setup is good, but you put all packets coming from computer A (and marked
with 1) in class 1:1. The problem is that this is not a leaf class because
it has a child class. And a non-leaf class can not transmit packets itself.
So the packets are sended at link speed.
Solution : only leaf classes can shape traffic so make sure all packets ends
up in a leaf class. You can do this by removing the filter statement so all
packets are placed in the default class. Or change your filter statement so
all packets marked with a 1 are redireted to class 1:19.
If you are interested, I did some tests myself. You can find the results on
www.docum.org.
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
* Re: [LARTC] why so fast?
2003-05-14 9:25 [LARTC] why so fast? sun reflex4
2003-05-14 9:46 ` Stef Coene
@ 2003-05-14 10:02 ` sun reflex4
2003-05-14 10:11 ` Stef Coene
2 siblings, 0 replies; 4+ messages in thread
From: sun reflex4 @ 2003-05-14 10:02 UTC (permalink / raw)
To: lartc
Hi Stef,
is class 1:1 really a non-leaf class? It doesn't have any children.
I know your site, and actually it is the place, where I lerned all this
stuff :)
> tc qdisc add dev eth0 root handle 1: htb default 19
>
> tc class add dev eth0 parent 1: classid 1:1 htb rate 10bps ceil 10bps
> tc class add dev eth0 parent 1: classid 1:19 htb rate 15bps ceil 15bps
>
> tc filter add dev eth0 parent 1: protocol ip handle 1 fw classid 1:1
>
> iptables -t mangle -A OUTPUT -d 192.168.0.11 -j MARK --set-mark 1
>#Compter B has ip 192.168.0.11
>Your setup is good, but you put all packets coming from computer A (and
>marked with 1) in class 1:1. The problem is that this is not a leaf class
>because it has a child class. And a non-leaf class can not transmit
>packets itself. So the packets are sended at link speed.
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?pageþatures/junkmail
_______________________________________________
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] why so fast?
2003-05-14 9:25 [LARTC] why so fast? sun reflex4
2003-05-14 9:46 ` Stef Coene
2003-05-14 10:02 ` sun reflex4
@ 2003-05-14 10:11 ` Stef Coene
2 siblings, 0 replies; 4+ messages in thread
From: Stef Coene @ 2003-05-14 10:11 UTC (permalink / raw)
To: lartc
On Wednesday 14 May 2003 12:02, sun reflex4 wrote:
> Hi Stef,
> is class 1:1 really a non-leaf class? It doesn't have any children.
Oops. Indeed.
But you better create 1 root class and add 1:1 and 1:19 to that root class.
> I know your site, and actually it is the place, where I lerned all this
> stuff :)
Ok :)
> > tc qdisc add dev eth0 root handle 1: htb default 19
> >
> > tc class add dev eth0 parent 1: classid 1:1 htb rate 10bps ceil 10bps
> > tc class add dev eth0 parent 1: classid 1:19 htb rate 15bps ceil 15bps
> >
> > tc filter add dev eth0 parent 1: protocol ip handle 1 fw classid 1:1
> >
> > iptables -t mangle -A OUTPUT -d 192.168.0.11 -j MARK --set-mark 1
> >#Compter B has ip 192.168.0.11
Can you check to see the tc counters to make sure the packets are ending in
the class you want?
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
end of thread, other threads:[~2003-05-14 10:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-14 9:25 [LARTC] why so fast? sun reflex4
2003-05-14 9:46 ` Stef Coene
2003-05-14 10:02 ` sun reflex4
2003-05-14 10:11 ` Stef Coene
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.