From: "Gavin" <gavin@raha.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] htb ceiling
Date: Fri, 05 Apr 2002 09:01:37 +0000 [thread overview]
Message-ID: <marc-lartc-101799734824883@msgid-missing> (raw)
In-Reply-To: <marc-lartc-101799477322990@msgid-missing>
The full output of htp.init compile is this:
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1 htb default 10 r2q 100
tc class add dev eth1 parent 1:2 classid 1:10 htb rate 2Mbit ceil 2Mbit
burst 15k
tc qdisc add dev eth1 parent 1:10 handle 10 sfq perturb 10
tc class add dev eth1 parent 1:2 classid 1:20 htb rate 1Mbit ceil 5Mbit
burst 15k
tc qdisc add dev eth1 parent 1:20 handle 20 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dport 25
0xffff classid 1:20
tc class add dev eth1 parent 1:2 classid 1:30 htb rate 512Kbit ceil 1Mbit
burst 15k
tc qdisc add dev eth1 parent 1:30 handle 30 sfq perturb 10
tc class add dev eth1 parent 1:2 classid 1:40 htb rate 256Kbit ceil 512Kbit
burst 15k
tc qdisc add dev eth1 parent 1:40 handle 40 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
10.0.0.2 classid 1:40
tc class add dev eth1 parent 1:2 classid 1:50 htb rate 128Kbit ceil 256Kbit
burst 15k
tc qdisc add dev eth1 parent 1:50 handle 50 sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
10.0.0.150 classid 1:50
tc class add dev eth1 parent 1:2 classid 1:60 htb rate 64bit ceil 128bit
burst 15k
tc qdisc add dev eth1 parent 1:60 handle 60 sfq perturb 10
tc class add dev eth1 parent 1:2 classid 1:70 htb rate 32Kbit ceil 64Kbit
burst 15k
tc qdisc add dev eth1 parent 1:70 handle 70 sfq perturb 10
tc class add dev eth1 parent 1:2 classid 1:80 htb rate 16bit ceil 32bit
burst 15k
tc qdisc add dev eth1 parent 1:80 handle 80 sfq perturb 10
tc class add dev eth1 parent 1:2 classid 1:90 htb rate 8Kbit ceil 16Kbit
burst 15k
tc qdisc add dev eth1 parent 1:90 handle 90 sfq perturb 10
tc class add dev eth1 parent 1: classid 1:2 htb rate 5Mbit burst 15k
- the only classes with any filters are 1:40(256Kbit/512kKbit) for 10.0.0.2
and 1:50(128Kbit/256Kbit) for 10.0.0.150. I just ran some more tests, and
10.0.0.150 can still only get 128Kbit
Am I seriously misunderstanding how this works?
----- Original Message -----
From: "Stef Coene" <stef.coene@docum.org>
To: "Gavin" <gavin@raha.com>; <LARTC@mailman.ds9a.nl>
Sent: Friday, April 05, 2002 11:42 AM
Subject: Re: [LARTC] htb ceiling
On Friday 05 April 2002 10:19, Gavin wrote:
> Hello,
>
> I'm using HTB (through htb.init :) and it's nearly perfect, but the CEIL
> directive seems to have no effect.
>
> The relevant lines are:
>
> tc qdisc add dev eth1 root handle 1 htb default 10 r2q 100
> tc class add dev eth1 parent 1: classid 1:2 htb rate 5Mbit burst 15k
> tc class add dev eth1 parent 1:2 classid 1:40 htb rate 256Kbit ceil
512Kbit
> burst 15k
> tc qdisc add dev eth1 parent 1:40 handle 40 sfq perturb 10
> tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst
> 10.0.0.2 classid 1:40
>
> - this allows 10.0.0.2 to download at 256Kbit, even when it is the only
> machine doing any downloading. I can affect this speed by changing the
> $rate, but changing $ceil has no effect whatsoever.
The ceil will prevent 10.0.0.2 to download faster then 512 kbit. The rate
will say how much 10.0.0.2 can download compare to the other classes (so the
other lines are also relevant :).
As example : If you have a second class :
tc class add dev eth1 parent 1:2 classid 1:50 htb rate 256Kbit ceil 512Kbit
burst 15k
Then both classes will get 50% of the bandwidth if they are both
downloading.
If they are alone, they can get the 512 Kbit.
Second example :
tc class add dev eth1 parent 1:2 classid 1:50 htb rate 128Kbit ceil 512Kbit
burst 15k
Class 1:50 and class 1:40 are downloading -> class 1:40 will get 256 *
(512/(256+128)) = 341 kbit and class 1:50 : 128 * (512/(256+128)) = 171 Kbit
(they will devide the bandwidth compared to the rates).
I hope you understand what you want I want to say and I hope it's an answer
on your question :)
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
next prev parent reply other threads:[~2002-04-05 9:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-05 8:19 [LARTC] htb ceiling Gavin
2002-04-05 8:42 ` Stef Coene
2002-04-05 9:01 ` Gavin [this message]
2002-04-05 10:40 ` Martin Devera
2002-04-05 11:58 ` Gavin
2002-04-05 12:10 ` Martin Devera
2002-04-05 12:26 ` Stef Coene
2002-04-05 12:26 ` Stef Coene
2002-04-05 12:41 ` Gavin
2002-04-05 13:09 ` Martin Devera
2002-04-05 15:52 ` Stef Coene
2002-04-07 17:52 ` Gavin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-lartc-101799734824883@msgid-missing \
--to=gavin@raha.com \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.