On Wednesday 14 May 2003 11:25, sun reflex4 wrote: > Hi, > I am doing some test to control outgoing traffic, and I want to see if > everything is working, but when I configure Compuetr A, and make a download > in Computer B from A (e.g. in Computer A Apache is installed), the > download goes so fast(not as in the ceil or rate!), even when I make the > rate & ceil too small, am I doing something wrong?? > Example on Computer A: > tc qdisc add dev eth0 root handle 1: htb default 19 > > tc class add dev eth0 parent 1: classid 1:1 htb rate 10bps ceil 10bps > tc class add dev eth0 parent 1: classid 1:19 htb rate 15bps ceil 15bps > > tc filter add dev eth0 parent 1: protocol ip handle 1 fw classid 1:1 > > iptables -t mangle -A OUTPUT -d 192.168.0.11 -j MARK --set-mark 1 > #Compter B has ip 192.168.0.11 Your setup is good, but you put all packets coming from computer A (and marked with 1) in class 1:1. The problem is that this is not a leaf class because it has a child class. And a non-leaf class can not transmit packets itself. So the packets are sended at link speed. Solution : only leaf classes can shape traffic so make sure all packets ends up in a leaf class. You can do this by removing the filter statement so all packets are placed in the default class. Or change your filter statement so all packets marked with a 1 are redireted to class 1:19. If you are interested, I did some tests myself. You can find the results on www.docum.org. Stef -- stef.coene@xxxxxxxxx "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net