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 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? Thx. -- BSD ownz me -- Daniel Ortiz d.ortiz@xxxxxxxxxxxx ILIMIT Comunicacions Departament Sistemes http://www.ilimit.es Tel: (+34) 93 733 33 75 Fax: (+34) 93 733 32 43
Attachment:
pgp00144.pgp
Description: PGP signature