On Tuesday 27 May 2003 11:11, Daniel Ortiz wrote: > Hi, I have a little problem with tc. > That's my cfg: > > /*****************************************/ > #!/bin/bash > > DEV="dev eth0" > > tc qdisc del $DEV root > > tc qdisc add $DEV root handle 1: htb default 1 > > tc class add $DEV parent 1: classid 1:1 htb rate 100kbit ceil 100kbps kbit? Shouldn't that be 100kbps ?? > tc class add $DEV parent 1:1 classid 1:10 htb rate 40kbps ceil 100kbps > tc class add $DEV parent 1:1 classid 1:11 htb rate 30kbps ceil 100kbps > tc class add $DEV parent 1:1 classid 1:12 htb rate 30kbps ceil 100kbps > tc qdisc add $DEV parent 1:10 handle 10: sfq > tc qdisc add $DEV parent 1:11 handle 11: sfq > tc qdisc add $DEV parent 1:12 handle 12: sfq > tc filter add $DEV protocol ip parent 1:0 prio 1 handle 1 fw flowid 1:10 > tc filter add $DEV protocol ip parent 1:0 prio 3 handle 2 fw flowid 1:11 > tc filter add $DEV protocol ip parent 1:0 prio 1 handle 3 fw flowid 1:12 > iptables -A PREROUTING -t mangle -j MARK -p icmp --set-mark 1 > iptables -A OUTPUT -t mangle -j MARK -p icmp --set-mark 1 > iptables -A PREROUTING -t mangle -j MARK -p tcp --set-mark 2 > iptables -A OUTPUT -t mangle -j MARK -p tcp --set-mark 2 > iptables -A OUTPUT -t mangle -j MARK -p tcp --sport 22 --set-mark 3 > iptables -A PREROUTING -t mangle -j MARK -p tcp --sport 22 --set-mark 3 > > /*************************************/ > > All works correctly and the packets pass in his own class and filter, > but an ftp connection (mark 2 --> 1:11 , 30kbps rate --> 100kbps ceil) > only get 30kbps, > Why, if the bw is alvailable, don't get all the bw? Normally it should. But you made a type (see the line where you add class 1:1 and my reply). Stef -- stef.coene@xxxxxxxxx "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net