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@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
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 ~100 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@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Referencing: http://mailman.ds9a.nl/pipermail/lartc/2004q3/013076.html (the bullet''ed items are what he wrote) * 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. OK. * 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 ~100 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. Dude.. If you want to shape HTTP traffic, why the heck are you going for ftp download?? If you look at your connections (eg: tcptrack -i eth0, you''ll see you''re initiating port 20/21 and not port 80 as you wanted.) * Is this only because one can''t shape incoming trafic ? Yes. That is true. but in your case, since you''re pushing out to eth0 (from eth1) you theoretically is allready introducing outgoing traffic (from eth1 to eth0) So you can shape on that. * Could Ingress solve my pb ? I don''t think so, as * Ingress seems to limit the WHOLE bandwidth... You can use an ingress filter and then use a filter against the FWmarks or in your case sport . (Though I''ve never did that successfully. I prefer fwmarks) * Is it a "prio" question ? Not sure. Check this out. See if it helps you. http://www.redhat.com/archives/fedora-list/2004-July/msg01764.html http://my-opensource.org/howto/qostrafficshaping-shorewall-wondershaper-howto.html -- Ow Mun Heng Fedora GNU/Linux Core 2 on D600 1.4Ghz CPU kernel 2.6.7-2.jul1-interactive Neuromancer 16:55:59 up 8:02, 5 users, load average: 1.38, 1.00, 1.02 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Saturday 10 July 2004 05:54, toto toto 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 ~100 Ko, as expected when no other trafic > is generated. > But if I > root@test# wget ftp://ftp.fr.debian.org/debian/ls-lRI completely disagree with the way you performed the test. Debian.Org is not on your local network isnt it ?? How far from your host until it reach Debian.Org as destination host ? Are you sure your ISP or Debian.Org ISP or perhaps Debian.Org itself doesnt perform traffic per session management, or any QoS ? My suggestion is to test the performance of your HTB using your own local network. Because you know completely your network condition and you can analyze it perfectly. Regards, Rio Martin. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
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=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@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/