[LARTC] htb ceiling

Linux Advanced Routing and Traffic Control

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

 



On Friday 05 April 2002 10:19, Gavin wrote:
> Hello,
>
> I'm using HTB (through htb.init :) and it's nearly perfect, but the CEI=
L
> 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 512=
Kbit
> 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 onl=
y
> 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 rat=
e=20
will say how much 10.0.0.2 can download compare to the other classes (so =
the=20
other lines are also relevant :). =20

As example : If you have a second class :
tc class add dev eth1 parent 1:2 classid 1:50 htb rate 256Kbit ceil 512Kb=
it
burst 15k
Then both classes will get 50% of the bandwidth if they are both download=
ing.=20
 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 512Kb=
it
burst 15k
Class 1:50 and class 1:40 are downloading -> class 1:40 will get 256 *=20
(512/(256+128)) =3D 341 kbit and class 1:50 : 128 * (512/(256+128)) =3D 1=
71 Kbit=20
(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 answ=
er=20
on your question :)

Stef

--=20

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


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