Martin Devera wrote:> If you read the manual, the algorithm will not work correctly > with {,c}burst < MTU ... > devik >I just tried to change {,c}burst to 1600, or leaving them by default but no visible result. here is the latest tc -s -d class show dev eth0 class htb 1:101 parent 1:1 prio 0 rate 40Kbit ceil 40Kbit burst 1599b/8 mpu 0b cburst 1599b/8 mpu 0b quantum 512 level 0 Sent 392526 bytes 5898 pkts (dropped 0, overlimits 15394) lended: 5898 borrowed: 0 giants: 0 injects: 0 tokens: -11905 ctokens: -11905 class htb 1:1 root prio 0 rate 100Kbit ceil 1Kbit burst 1599b/8 mpu 0b cburst 1599b/8 mpu 0b quantum 1280 level 3 Sent 956111 bytes 14168 pkts (dropped 0, overlimits 0) rate 12bps lended: 566 borrowed: 0 giants: 0 injects: 0 tokens: 224179 ctokens: -59999999 class htb 1:100 parent 1:1 prio 0 rate 60Kbit ceil 60Kbit burst 1599b/8 mpu 0b cburst 1599b/8 mpu 0b quantum 768 level 0 Sent 563585 bytes 8270 pkts (dropped 0, overlimits 20093) rate 11bps lended: 7704 borrowed: 566 giants: 0 injects: 0 tokens: -14100 ctokens: -14100 thanks, Anton
> I just tried to change {,c}burst to 1600, or leaving them by default but > no visible result. > here is the latest tc -s -d class show dev eth0 > > class htb 1:101 parent 1:1 prio 0 rate 40Kbit ceil 40Kbit burst 1599b/8 > mpu 0b cburst 1599b/8 mpu 0b quantum 512 level 0 Sent 392526 bytes 5898 > pkts (dropped 0, overlimits 15394) lended: 5898 borrowed: 0 giants: 0 > injects: 0 > tokens: -11905 ctokens: -11905 > > class htb 1:1 root prio 0 rate 100Kbit ceil 1Kbit burst 1599b/8 mpu 0b > cburst 1599b/8 mpu 0b quantum 1280 level 3 Sent 956111 bytes 14168 pkts > (dropped 0, overlimits 0) rate 12bps lended: 566 borrowed: 0 giants: 0 > injects: 0 > tokens: 224179 ctokens: -59999999ceil 1kbit !!?? devik
Martin Devera wrote:>>I just tried to change {,c}burst to 1600, or leaving them by default but >>no visible result. >>here is the latest tc -s -d class show dev eth0 >> >>class htb 1:101 parent 1:1 prio 0 rate 40Kbit ceil 40Kbit burst 1599b/8 >>mpu 0b cburst 1599b/8 mpu 0b quantum 512 level 0 Sent 392526 bytes 5898 >>pkts (dropped 0, overlimits 15394) lended: 5898 borrowed: 0 giants: 0 >>injects: 0 >>tokens: -11905 ctokens: -11905 >> >>class htb 1:1 root prio 0 rate 100Kbit ceil 1Kbit burst 1599b/8 mpu 0b >>cburst 1599b/8 mpu 0b quantum 1280 level 3 Sent 956111 bytes 14168 pkts >>(dropped 0, overlimits 0) rate 12bps lended: 566 borrowed: 0 giants: 0 >>injects: 0 >>tokens: 224179 ctokens: -59999999 >> > >ceil 1kbit !!?? >Wouldn`t it prevent 1:1 from borrowing from 1: ? I think I`m missunderstanding the ceil. As I see it it is if I fe. have rate 100kbit and ceil 100kbit then 1:1 would go at at least 100kbit and can borrow 100kbit from 1: . Which is in my case unwanted. I want to limit 1:1 to 100kbit without abilyti to borrow. 1:100 and 1:101 could borrow from one another up to the max rate of 1:1 ( 100 kbit) that is what I want ot achieve. thanks, Anton
> >ceil 1kbit !!?? > > > Wouldn`t it prevent 1:1 from borrowing from 1: ? I think I`mit will but also it will prevent 1:1 to lend anything.> missunderstanding the ceil. As I see it it is if I fe. have rate 100kbit > and ceil 100kbit then 1:1 would go at at least 100kbit and can borrow > 100kbit from 1: . Which is in my case unwanted. I want to limit 1:1 tono 100/100 is it can do 100 and 100 is also it;s maximal rate. Cail should be greater or the same in respec to rate. devik
Hello, After your explaining now I think I get the meaning of htb options and here is my config , which still sadly doesnt work. Downloads from srchost1 and srchost2 go at full speed, and are not shaped. Though counters for respective classes increase. tc -s -d show class dev eth0 ------------------------------------- class htb 1:101 parent 1:1 prio 0 rate 40Kbit ceil 100Kbit burst 1650b/8 mpu 0b cburst 1727b/8 mpu 0b quantum 512 level 0 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) lended: 0 borrowed: 0 giants: 0 injects: 0 tokens: 628545 ctokens: 263144 class htb 1:1 root prio 0 rate 100Kbit ceil 100Kbit burst 1599b/8 mpu 0b cburst 1599b/8 mpu 0b quantum 1280 level 3 Sent 3131025 bytes 23836 pkts (dropped 0, overlimits 0) rate 281bps 3pps lended: 751 borrowed: 0 giants: 0 injects: 0 tokens: -8719 ctokens: -8719 class htb 1:100 parent 1:1 prio 0 rate 60Kbit ceil 100Kbit burst 1675b/8 mpu 0b cburst 1727b/8 mpu 0b quantum 768 level 0 Sent 36068 bytes 504 pkts (dropped 0, overlimits 538) rate 281bps 3pps lended: 319 borrowed: 185 giants: 0 injects: 0 tokens: -12135 ctokens: 10773 ------------------------------------- tc qdisc show dev eth0 ------------------------------------- qdisc htb 1: r2q 10 default 400 dcache 0 deq_util 1/83333 deq_rate 4 trials_per_deq 0 dcache_hits 0 direct_packets 94066 ------------------------------------- tc filter show dev eth0 ------------------------------------- filter parent 1: protocol ip pref 3 fw filter parent 1: protocol ip pref 3 fw handle 0x1 classid 1:100 filter parent 1: protocol ip pref 3 fw handle 0x2 classid 1:101 ------------------------------------- iptables -t mangle -L ------------------------------------- Chain PREROUTING (policy ACCEPT) target prot opt source destination Chain INPUT (policy ACCEPT) target prot opt source destination MARK all -- sourcehost1 anywhere MARK set 0x1 MARK all -- sourcehost2 anywhere MARK set 0x2 Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination MARK all -- anywhere sourcehost1 MARK set 0x1 MARK all -- anywhere sourcehost2 MARK set 0x2 Chain POSTROUTING (policy ACCEPT) target prot opt source destination
You are trying to shape downloads !? It will not work of course in this setup. You can shape output only. Or what do you want to shape ? devik On Fri, 26 Apr 2002, Anton Yurchenko wrote:> Hello, > > After your explaining now I think I get the meaning of htb options and > here is my config , which still sadly doesnt work. Downloads from > srchost1 and srchost2 go at full speed, and are not shaped. Though > counters for respective classes increase.
Martin Devera wrote:>You are trying to shape downloads !? It will not work of course >in this setup. You can shape output only. Or what do you want to shape ? >devik >ok I got it :)) that is what I suspected :)) finaly. that is common logic, I`m sorry, after reading some of the docs you go mad. my bad, thank you and Stef Coene very much for you help. Anton
;) Try Patrick''s IMQ version it should be able to do it. On Fri, 26 Apr 2002, Anton Yurchenko wrote:> ok I got it :)) that is what I suspected :)) finaly. that is common > logic, I`m sorry, after reading some of the docs you go mad. my bad, > thank you and Stef Coene very much for you help.
Question :> > Has anyone ever managed to compile iproute2 from source, > > running a 2.4.x kernel ?I have also managed to solve it in another way.. Here is how ... Solution 1: Well I have managed to fix the compile error on a kernel 2.4.x If we have a look at the file, /usr/src/linux/include/linux/if_ether.h that you get from the different kernels, we notice a change. On 2.2.x kernel... #define ETH_P_ECHO 0x0200 /* Ethernet Echo packet */ On 2.4.x kernel... #define ETH_P_PUP 0x0200 /* Xerox PUP packet */ Q: How to fix it ? In the directory /lib of the source from the iproute2 tarball, is a file called, ''ll_proto.c'' In the file, there is an entry ''__PF(ECHO,echo)'' on line 36. A: Remove this line, and try to compile it again. Solution 2:> Using SGL :) > > hvisage@meklon:~$ tar -zxf > download/iproute2-2.4.7-now-ss020116-try.tar.gz > hvisage@meklon:~$ cd iproute2/ > hvisage@meklon:~/iproute2$ sed -e "s/UTILS_H/IPROUTE2_UTILS_H/g" > < include/utils.h > include/iproute2_utils.h > hvisage@meklon:~/iproute2$ for i in `find . -type f | xargs grep > utils.h|grep :|cut -f 1 -d :`; do sed -e > ''s/"utils.h"/"iproute2_utils.h"/'' <$i > $i.new;mv $i.new $i;done > hvisage@meklon:~/iproute2$ make > > QED ;^) > > The reason: > there are a /usr/include/utils.h that get''s included before > the iproute2/include/utils.h :(---- To unsubscribe from this list: send the line "unsubscribe glug" in the subject of a message to glug-request@linux.org.za. If you have a problem unsubscribing, please mail glug-admins@linux.org.za