HTB question
Hi,
I am new to tc, please forgive me for simple question.
I have linux 2.4 in my routers, I would like to use HTB. I have downloaded binary code from http://luxik.cdi.cz/~devik/qos/htb/#source, (tc.gz), but I could not open the file. Is there any other place I can get binary code for HTB. Also if you can give some direction how to patch it, it will be really helpful.
Thanks in advance
Omer
---------------------------------
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
don;tknow other place. Try to download with wget or lynx - netscappe | IE tries to be too smart sometimes.
What says "file tc.gz" about downloaded file ? What is the size of the file ?
devik
Quoted 14 lines · Omer suat
Hi,
I am new to tc, please forgive me for simple question.
I have linux 2.4 in my routers, I would like to use HTB. I have downloaded binary code from
http://luxik.cdi.cz/~devik/qos/htb/#source, (tc.gz), but I could not open the file. Is there any other place I can get binary code for HTB. Also if you can give some direction how to patch it, it will be really helpful.Thanks in advance
Quoted 7 lines
Omer
---------------------------------
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 9 lines · Omer suat
Hi,
I am new to tc, please forgive me for simple question.
I have linux 2.4 in my routers, I would like to use HTB. I have downloaded binary code from http://luxik.cdi.cz/~devik/qos/htb/#source, (tc.gz), but I could not open the file. Is there any other place I can get binary code for HTB. Also if you can give some direction how to patch it, it will be really helpful.
You will have to download the source of iproute2 (see under links on www.docum.org) and the patch for htb. Patch the source, compile and you will find the binary in directory tc. I also have some mimimal info on how to patch it on www.docum.org under FAQ.
Stef
Signature · 7 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello all,
I have a small problem with HTB which i would like to share with the list. I have send tha same mail to Martin Devera and he replied but i would like to post my problem here in order to have more information,because i am new in this area of administration.
I have the simplest scenario that you can imagine. I have a linux server which have internet connection with 64Kbps ISDN line using an external modem and behind this server i have 5 WIN clients. My linux server is RedHat 7.2 with kernel 2.4.17 patched with HTB and i used the patched tc from Martin Devera site.
My clients use my server as a gateway to the internet. I need to ensure that one WIN client have 5 kbytes/sec from the total bandwith of 8-9 kbytes when he wants!Why is that? Because it use a VPN client which needs at least 4 kbytes in order to have useful connection. As a result i have to devide my 8-9 kbytes/s bandwidth in 2 pieces, one with 5 kbytes and one with 3-4 kbytes.i created the following script according your guide.
#!/bin/bash
tc="/root/QoS/QoS/tc"
$tc qdisc del dev eth0 root
$tc qdisc add dev eth0 root handle 1: htb default 11
$tc class add dev eth0 parent 1: classid 1:1 htb rate 10kbps ceil 10kbps burst 12910b \
cburst 12910b
$tc class add dev eth0 parent 1:1 classid 1:10 htb rate 5kbps ceil 10kbps burst \
24910b cburst 12910b
$tc class add dev eth0 parent 1:1 classid 1:11 htb rate 2kbps ceil 10kbps burst \
12910b cburst 12910b
$tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.14 \
flowid 1:10
# 192.168.0.14 is the ip of my WIN clients which needs the 4kbytes
$tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10 $tc qdisc add dev eth0 parent 1:11 handle 11: sfq perturb 10
I run it and i did some tests.
I use 2 WIN clients which belong to defualt class and started to download 1 big file from each one. They had 4kbytes/sec download speed when downloading the files.
Then i started to download a big file from my WINclient(192.168.0.14) and he didn't managed to have more that 3 kbytes download speed.
I run several time tc -s class show dev eth0 and saw that the default class borrowed several packets.
see what i mean:
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1401248 bytes 944 pkts (dropped 0, overlimits 0)
rate 4037bps 2pps
lended: 455 borrowed: 489 giants: 0
tokens: -3184094 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2603364 bytes 1738 pkts (dropped 0, overlimits 0)
rate 7921bps 5pps
lended: 489 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1202116 bytes 794 pkts (dropped 0, overlimits 0)
rate 3816bps 2pps
lended: 794 borrowed: 0 giants: 0
tokens: 3406788 ctokens: 911840
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1422444 bytes 958 pkts (dropped 0, overlimits 0)
rate 4037bps 2pps
lended: 461 borrowed: 497 giants: 0
tokens: -1783000 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2644242 bytes 1765 pkts (dropped 0, overlimits 0) rate 7921bps 5pps
lended: 497 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1221798 bytes 807 pkts (dropped 0, overlimits 0)
rate 3816bps 2pps
lended: 807 borrowed: 0 giants: 0
tokens: 3320517 ctokens: 911840
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1430014 bytes 963 pkts (dropped 0, overlimits 0)
rate 4005bps 2pps
lended: 466 borrowed: 497 giants: 0
tokens: -3078483 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2660896 bytes 1776 pkts (dropped 0, overlimits 0) rate 7921bps 5pps
lended: 497 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1230882 bytes 813 pkts (dropped 0, overlimits 0)
rate 3816bps 2pps
lended: 813 borrowed: 0 giants: 0
tokens: 3320517 ctokens: 911840
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1437584 bytes 968 pkts (dropped 0, overlimits 0)
rate 4005bps 2pps
lended: 471 borrowed: 497 giants: 0
tokens: -5316046 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2676036 bytes 1786 pkts (dropped 0, overlimits 0) rate 7887bps 5pps
lended: 497 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1238452 bytes 818 pkts (dropped 0, overlimits 0)
rate 3848bps 2pps
lended: 818 borrowed: 0 giants: 0
tokens: 3406788 ctokens: 911840
class htb 1:11 parent 1:1 leaf 11: prio 0 quantum 1000 rate 16Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1448182 bytes 975 pkts (dropped 0, overlimits 0)
rate 4005bps 2pps
lended: 471 borrowed: 504 giants: 0
tokens: -3276238 ctokens: 911840
class htb 1:1 root rate 80Kbit ceil 80Kbit burst 12909b/8 mpu 0b cburst 12909b/8 mpu 0b level 7
Sent 2689662 bytes 1795 pkts (dropped 0, overlimits 0) rate 7887bps 5pps
lended: 504 borrowed: 0 giants: 0
tokens: 911840 ctokens: 911840
class htb 1:10 parent 1:1 leaf 10: prio 0 quantum 1000 rate 40Kbit ceil 80Kbit burst 24909b/8 mpu 0b cburst 12909b/8 mpu 0b level 0
Sent 1241480 bytes 820 pkts (dropped 0, overlimits 0)
rate 3848bps 2pps
lended: 820 borrowed: 0 giants: 0
tokens: 3743680 ctokens: 911840
Then only way to ensure that my 192.168.0.14 client have 4-5 kbytes is when i change the ceil for the default class to 2.
I also noticed that even i change the rate for default class to 1 they always have 2-3 kbytes/sec.
After several tests i realized that my default class always borrowed packets from my 10 class even when class 10 use tha bandwidth.As a result i couldn't ensure 4-5 kbytes for class 10.
Does anyone know a way to achive my goal.
I would be grateful if some can give me any hits about it.
Regards,
Pavlos
Signature · 10 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ I love having the feeling of being in control while i have the sensation of speed The surfer of life ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB Question
In reply to Omer suatHi Stef,
Sorry to write to you directly but my list membership is not working, I
receive the archive but cant send to the list, cant delete myself because I don't exist and can't rejoin as they say I do exist, anyway hope you don't mind
Can you tell me what the difference between these two scripts is please.
What I want to achieve is a high speed channel 1000kbit from port 3000 from an application running on the box doing the shaping, while shaping the traffic at 64kbit going thru the box to the network, WITHOUT affecting the small 64kbit bandwidth.
In EXAMPLE 1 ALL traffic goes thru 1:1 but does not seem to affect the slow channels 1:2,1:3 and 1:4
In EXAMPLE 2 the port 3000 traffic only goes thru 1:998 and 1:997 but it shows "lended" packets in the "tc stats"
My feeling is EXAMPLE 2 is the right way but I would like your input
EXAMPLE 1:
tc qdisc del dev eth0 root handle 1: htb default 999 tc qdisc add dev eth0 root handle 1: htb default 999 r2q 1 tc class add dev eth0 parent 1: classid 1:1 htb rate 64kbit
tc class add dev eth0 parent 1: classid 1:998 htb rate 1000kbit tc qdisc add dev eth0 parent 1:998 handle 1998: sfq perturb 10 tc class add dev eth0 parent 1:998 classid 1:997 htb rate 1000kbit ceil 1000kbit prio 0 quantum 15140
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 3000 0xffff flowid 1:997
tc class add dev eth0 parent 1:1 classid 1:999 htb rate 6kbit ceil 64kbit prio 0 quantum 1514
tc qdisc add dev eth0 parent 1:999 handle 1999: sfq perturb 10 tc class add dev eth0 parent 1:1 classid 1:2 htb rate 24kbit ceil 64kbit prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 24kbit ceil 24kbit prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:4 htb rate 10kbit ceil 64kbit prio 0 quantum 1514
tc qdisc add dev eth0 parent 1:2 handle 200: sfq perturb 2
tc qdisc add dev eth0 parent 1:3 handle 300: sfq perturb 2
tc qdisc add dev eth0 parent 1:4 handle 400: sfq perturb 2
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:2
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 25 0xffff flowid 1:3
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 53 0xffff flowid 1:4
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 53 0xffff match ip protocol 17 0xff flowid 1:4
END EXAMPLE 1
EXAMPLE 2:
tc qdisc del dev eth0 root handle 1: htb default 999
tc qdisc add dev eth0 root handle 1: htb default 999 r2q 1
tc class add dev eth0 parent 1: classid 1:1 htb rate 64kbit
tc class add dev eth0 parent 1:1 classid 1:999 htb rate 6kbit ceil 64kbit prio 0 quantum 1514
tc qdisc add dev eth0 parent 1:999 handle 1999: sfq perturb 10 tc class add dev eth0 parent 1:1 classid 1:2 htb rate 24kbit ceil 64kbit prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:3 htb rate 24kbit ceil 24kbit prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:4 htb rate 10kbit ceil 64kbit prio 0 quantum 1514
tc class add dev eth0 parent 1:1 classid 1:5 htb rate 1000kbit ceil 1000kbit prio 0 quantum 15140
tc class add dev eth0 parent 1:5 classid 1:6 htb rate 1000kbit ceil 1000kbit prio 0 quantum 15140
tc qdisc add dev eth0 parent 1:2 handle 200: sfq perturb 2
tc qdisc add dev eth0 parent 1:3 handle 300: sfq perturb 2
tc qdisc add dev eth0 parent 1:4 handle 400: sfq perturb 2
tc qdisc add dev eth0 parent 1:6 handle 600: sfq perturb 5
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:2
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 25 0xffff flowid 1:3
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 53 0xffff flowid 1:4
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip dport 53 0xffff match ip protocol 17 0xff flowid 1:4
tc filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match ip sport 3000 0xffff flowid 1:6
END EXAMPLE 2
Regards Allan Gee
Equation
021 4181777
www.equation.co.za
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello!
I'm newbie to stuff that is discussed here, so i want to ask you to help me with decision. I have such situation:
1) linux server, with 1 ethernet interface with ip 193.220.70.33/27 (contains file archive and web service)
2) cisco router, connected to internet (512 Kbit download and 64Kbit upload)
3) adsl hub with a lot of clients behind it(some clients have one real static ip address, and one client have network of class C with 32 real ip addresses). adsl hub gets and sends packets through linux server.
4) linux server, adsl hub and cisco router are connected to switch
i want to make so that all clients behind adsl hub if they download files from 193.220.70.33(our server) share 60Mbits of eth0 of linux server and to share 512 Kbit of internet.
Thanks to lartc howto and Stef Coene' docum.org things now more clear to me(i'm going to use htb), but could you suggest something about it?
Thanks in advance,
Ruslan
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
I have a question regarding how HTB choose to send a package when the rate is almost reached.
What I would like to know, is how HTB solve this;
The class rate has not yet been reached. When htb now dequeue the next package, rate would be crossed. The next package is smaller than the quantum parameter.
Would HTB delay this package, or just send it?
If latter, then HTB is able to cross its configured class rate without any borrowing.. Hence send at its full speed until the bucket is emptied.
Does HTB has any bucket containing unused tokens like token bucket? Or does HTB only accumulate tokens at its configured rate, while unused token are dropped??
Thanks in advance
Lars
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 10 lines · Lars Landmark
I have a question regarding how HTB choose to send a package when the rate is almost reached.
What I would like to know, is how HTB solve this;
The class rate has not yet been reached. When htb now dequeue the next package, rate would be crossed. The next package is smaller than the quantum parameter.
Would HTB delay this package, or just send it?
As far as I know, and correct me if I'm wrong, ÇÔÂ will SEND this packet. All it cares about, is whether the limit is exceeded or not. It is not, so off it goes... There isn't much difference in such small number of bytes...
Regards
- Giannis Stoilis
[email protected]
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] HTB Question
In reply to Omer suatHi all
i have installed the FEDORA
and i saw the fedora ships with latest IP and TC and HTB too when i add the with TC Script with HTB
iam getting that HTB version.
HTB init, kernel part version 3.12
and iam comparing with my old version which is installed and patched with TC 3.6 patch
that is on RH 9.0 with TC and HTB patch shows
HTB init, kernel part version 3.7
so which one is latest , iam concused
could some one recomend me..
hare
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hi,
I try to configure 3 HTB class with a rate near to zero and the ceil equal to the max of the bandwith. And I put prio parameter for each class. In this configuration, HTB is equivalent with Weighted Round Robin algorithm.
Is it more correct to put the good rate for each class or to play with the prio parameter, knowing that it's more difficult to know the correct rate for each class ?
Do you know the min value possible to put for the rate parameter ?
Thanks,
doude.
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc