From: Dmitry Golubev <dmitry@mikrotik.com>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] HTB & Bdw Guarantee
Date: Sat, 10 Jul 2004 09:14:15 +0000 [thread overview]
Message-ID: <200407101214.15480.dmitry@mikrotik.com> (raw)
In-Reply-To: <20040709224839.71831.qmail@web25307.mail.ukl.yahoo.com>
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@yahoo.fr> 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\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/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2004-07-10 9:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Dmitry Golubev [this message]
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=200407101214.15480.dmitry@mikrotik.com \
--to=dmitry@mikrotik.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox