hi all, I''m trying to do the following: tc qdisc add dev eth0 root handle 1: htb default 15 tc class add dev eth0 parent 1:0 classid 1:1 htb rate 1mbit tc class add dev eth0 parent 1:1 classid 1:15 htb rate 512kbit ceil 1mbit what I expect: limit outgoing traffic to 1mbit, start rate is 512kbit and let it grow up to 1mbit (correct me if i''m wrong here) so, here is the problem on different computers I have different behaviour (same kernel configuration) tried on xeon, p3 and pentium-m (notebook), only on p3 it works as expected. the only value has effect (on xeon, pentium-m) is the rate in classid 1:15, for example, when I put 128kbit, speed grows up to 1mbit I tried to test this using lo interface - same problem. -is there any hardware requirements for tc? -how to debug such things? (where should I look) thanks --alex
On Thursday 15 December 2005 20:21, Alexander Kabanov wrote:> tc qdisc add dev eth0 root handle 1: htb default 15 > tc class add dev eth0 parent 1:0 classid 1:1 htb rate 1mbit > tc class add dev eth0 parent 1:1 classid 1:15 htb rate 512kbit ceil > 1mbit > > what I expect: > limit outgoing traffic to 1mbit, start rate is 512kbit and let it grow > up to 1mbit > (correct me if i''m wrong here)That would be correct, if there were some sibling classes to 1:15 that prevented it from using 1mbit traffic at all times. Right now, there is no one who could prevent 1:15 to borrow bandwidth to reach 1mbit, so most likely it will just ignore the rate setting and use as much bandwidth as it needs, up to 1mbit in total. Regards, Andreas Klauer
Alexander Kabanov wrote:> > hi all, > > I''m trying to do the following: > > tc qdisc add dev eth0 root handle 1: htb default 15 > tc class add dev eth0 parent 1:0 classid 1:1 htb rate 1mbit > tc class add dev eth0 parent 1:1 classid 1:15 htb rate 512kbit ceil 1mbitTry parent 1: -- gypsy
ok, I''m lost :), there is no problems in kernel (tried with eth0 on different kernels and different platforms), seems like I can''t test it on lo interface. here is my commands (one more time): tc qdisc del dev eth0 root tc qdisc add dev eth0 root handle 1: htb default 10 tc class add dev eth0 parent 1: classid 1:1 htb rate 1mbit tc class add dev eth0 parent 1:1 classid 1:10 htb rate 512kbit ceil 1mbit when I run this on my old PIII server with any 2.6 kernel I get what I expect, 1mbit bandwidth limit. when I run this on my xeon or notebook (pentium-m), I have different upper limit (5.27mbit) don''t know what might be a problem... any suggestions? thanks, --alex