All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] HTB & Bdw Guarantee
@ 2004-07-09 22:48 toto toto
  2004-07-09 22:54 ` [LARTC] HTB & BDW Guarantee toto toto
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: toto toto @ 2004-07-09 22:48 UTC (permalink / raw)
  To: lartc

Hello,

I have problems setting up HTB.
This is my setup :

NET 1024/256 ADSL 
||
eth1
Linux Firewall 
eth0 
||
LAN 10.a.a.a

I want to GUARANTEE for an IP (10.x.y.z) a 800kbit
bandwidth for HTTP download.
But When 10.x.y.z does no HTTP download, other trafic
must get the whole bandwidth, of course.

The script I use (see below) is quite the same as
presented at (the greeeeat page) :
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm,
the only difference is that I use only 2 classes (HTTP
trafic vs other)

BUT ( :-(( )
When I 
root@test# wget ftp.fr.debian.org/debian/ls-lR
(...)
21% [=====>  ] 4,984,704    106.39K/s   
root@test#

It goes at ~110 Ko, as expected when no other trafic
is generated.
But if I 
root@test# wget ftp://ftp.fr.debian.org/debian/ls-lR

after the beginning of the HTTP download, the latter
goes dooown, and if I run a second wget ftp://...,
the HTTP download goes UNDER (really under) the 800
kbits...??!!
It seems like there's no difference whether the
shaping is done or not.

Trafic seems to be classified (tc -s -d class show dev
eth0 / eth1), but...

Actually my goal is more complicated than HTTP
downloads (I need to guarantee bandwidth for
H323 -> Netmeeting & co, so both down&up-loads), but
I'm just testing for now, and if I can't shape such a
simple trafic as HTTP download...

Could anyone tell me what I did wrong, or didn't
understand...
Is this only because one can't shape incoming trafic ?

Could Ingress solve my pb ? I don't think so, as
Ingress seems to limit the WHOLE bandwidth...
Is it a "prio" question ?

Thanks for your help

PSes : 
- has anyone experienced H323 trafic shaping ?? if so,
scripts are welcome !!!
- If CBQ can do better, then I'll turn to CBQ, but
it's just like chinese for me...
HTB is more simple



Here's the script :
#!/bin/bash

OUT=eth1
IN=eth0

IP\x10.x.y.z 

BDW_IN\x1024kbit
BDW_OUT%6kbit

BDW_WEB_IN€0kbit
BDW_OTHER_IN"4kbit
BDW_WEB_OUT\x176kbit
BDW_OTHER_OUT€kbit

#-----------------------------------------------------------#

function start_out () {

tc qdisc add dev $OUT root handle 1: htb default 11

tc class add dev $OUT parent 1: classid 1:1 htb rate
$BDW_OUT ceil $BDW_OUT
tc class add dev $OUT parent 1:1 classid 1:10 htb rate
$BDW_WEB_OUT ceil $BDW_OUT
tc class add dev $OUT parent 1:1 classid 1:11 htb rate
$BDW_OTHER_OUT ceil $BDW_OUT

tc qdisc add dev $OUT parent 1:10 handle 20: pfifo
limit 5
tc qdisc add dev $OUT parent 1:11 handle 40: sfq
perturb 10

tc filter add dev $OUT protocol ip parent 1:0 prio 1
u32 \
        match ip src $IP match ip dport 80 0xffff
flowid 1:10
}

function start_in () {

tc qdisc add dev $IN root handle 1: htb default 11

tc class add dev $IN parent 1: classid 1:1 htb rate
$BDW_IN ceil $BDW_IN
tc class add dev $IN parent 1:1 classid 1:10 htb rate
$BDW_WEB_IN ceil $BDW_IN
tc class add dev $IN parent 1:1 classid 1:11 htb rate
$BDW_OTHER_IN ceil $BDW_IN

tc qdisc add dev $IN parent 1:10 handle 20: pfifo
limit 5
tc qdisc add dev $IN parent 1:11 handle 40: sfq
perturb 10

tc filter add dev $IN protocol ip parent 1:0 prio 1
u32 \
        match ip dst $IP match ip sport 80 0xffff
flowid 1:10
}

#-----------------------------------------------------------#

function stop_out () {

tc filter del dev $OUT protocol ip parent 1:0 prio 1
u32

tc class del dev $OUT parent 1:1 classid 1:11
tc class del dev $OUT parent 1:1 classid 1:10

tc class del dev $OUT parent 1: classid 1:1
tc qdisc del dev $OUT root handle 1: htb
}

function stop_in() {

tc filter del dev $IN protocol ip parent 1:0 prio 1
u32

tc class del dev $IN parent 1:1 classid 1:11
tc class del dev $IN parent 1:1 classid 1:10

tc class del dev $IN parent 1: classid 1:1
tc qdisc del dev $IN root handle 1: htb
}

case $1 in
start)
        echo
        start_out
        start_in
        echo
        ;;
stop)
        echo
        stop_out
        stop_in
        echo
        ;;
*)
        echo "Usage : $0 {start|stop|restart}"
        ;;
esac




	

	
		
Créez gratuitement votre Yahoo! Mail avec 100 Mo de stockage !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-07-10  9:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-09 22:48 [LARTC] HTB & Bdw Guarantee toto toto
2004-07-09 22:54 ` [LARTC] HTB & BDW Guarantee toto toto
2004-07-10  0:05 ` [LARTC] HTB & Bdw Guarantee Ow Mun Heng
2004-07-10  2:39 ` [LARTC] HTB & BDW Guarantee Rio Martin
2004-07-10  9:14 ` [LARTC] HTB & Bdw Guarantee Dmitry Golubev

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.