Nataniel Klug <nata <at> cnett.com.br> writes:

> 
>     Hello all,
> 
>     I am with a doubt about QoS solution... I have a 4 Mbit backbone 
> coming from the telco I use... This is the link I serve to my clients, 
> so I make this classes:
> 
> $TC qdisc add dev $DL root handle 1: htb default 60
> 
> CLASS="/sbin/tc class add dev $DL parent"
> $CLASS 1: classid 1:1 htb rate 4096Kbit
> $CLASS 1:1 classid 1:10 htb rate 256Kbit ceil 3072Kbit burst 15k
> $CLASS 1:1 classid 1:20 htb rate 256Kbit ceil 1024Kbit burst 15k
> $CLASS 1:1 classid 1:30 htb rate 2048Kbit ceil 3072Kbit burst 15k
> $CLASS 1:1 classid 1:40 htb rate 256Kbit ceil 512Kbit burst 15k
> $CLASS 1:1 classid 1:50 htb rate 256Kbit ceil 256Kbit burst 15k
> $CLASS 1:1 classid 1:60 htb rate 1024Kbit ceil 2048Kbit burst 15k
> 

...
>     So when my clients try to connect to my ns2 mail server it gets 
> shapped by class 40... I dont want that to happens... So I think in 
> making something like this:
> 
> $TC qdisc add dev $DL root handle 1: htb default 60
> 
> CLASS="/sbin/tc class add dev $DL parent"
> $CLASS 1: classid 1:1 htb rate 100Mbit
> $CLASS 1:1 classid 1:5 htb rate 100Mbit
> $CLASS 1:1 classid 1:10 htb rate 256Kbit ceil 3072Kbit burst 15k
> $CLASS 1:1 classid 1:20 htb rate 256Kbit ceil 1024Kbit burst 15k
> $CLASS 1:1 classid 1:30 htb rate 2048Kbit ceil 3072Kbit burst 15k
> $CLASS 1:1 classid 1:40 htb rate 256Kbit ceil 512Kbit burst 15k
> $CLASS 1:1 classid 1:50 htb rate 256Kbit ceil 256Kbit burst 15k
> $CLASS 1:1 classid 1:60 htb rate 1024Kbit ceil 2048Kbit burst 15k
> 
>     And them direct all traffic coming from my ns2 server (using u32 
> classifier and src address) to class 1:5...
> 
>     Is this correct?

I don't think so. Class 1:5 can now take all bandwidth of dev here.
You should limit it's rate and a ceil as a minimum, but I think you would better
add it as another root class: 

CLASS="/sbin/tc class add dev $DL parent"
$CLASS 1: classid 1:1 htb rate 4096Kbit
$CLASS 1: classid 1:5 htb rate 95Mbit
$CLASS 1:1 classid 1:10 htb rate 256Kbit ceil 3072Kbit burst 15k
$CLASS 1:1 classid 1:20 htb rate 256Kbit ceil 1024Kbit burst 15k
$CLASS 1:1 classid 1:30 htb rate 2048Kbit ceil 3072Kbit burst 15k
$CLASS 1:1 classid 1:40 htb rate 256Kbit ceil 512Kbit burst 15k
$CLASS 1:1 classid 1:50 htb rate 256Kbit ceil 256Kbit burst 15k
$CLASS 1:1 classid 1:60 htb rate 1024Kbit ceil 2048Kbit burst 15k

And have a look at this bautiful page:
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm

The second advice is to lower you numbers. Probably this rates are only
nominally like this and in reality min. 10% lower. If you don't limit it
yourself they will be limited elsewhere and you will have higher delays.
15k burst is also quite high so possible next delays. Mr Devera has very good
advices there.

Jarek P.

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

Reply via email to