Re: HTB & Bdw Guarantee

Linux Advanced Routing and Traffic Control

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

 



Shouldn't you assign priorities to your classes? Also make RED a leaf queue 
for more more smooth TCP experience

Dmitry

On Saturday 10 July 2004 01:48, toto toto <freeswan9@xxxxxxxx> wrote:
> 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=10.x.y.z
>
> BDW_IN=1024kbit
> BDW_OUT=256kbit
>
> BDW_WEB_IN=800kbit
> BDW_OTHER_IN=224kbit
> BDW_WEB_OUT=176kbit
> BDW_OTHER_OUT=80kbit
>
> #-----------------------------------------------------------#
>
> 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@xxxxxxxxxxxxxxx
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


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