hi
i have troubles running traffic shaper with tc and iptables (marking)
i have i pc with eth0 - home lan and eth1 - isp (pptp vpn)
here is the script...but it seems does not work (properly|at all):

#!/bin/sh

TC=/sbin/tc
IPT=/usr/sbin/iptables
DEV="eth0"

CLIENTS="/etc/cips"
# 192.168.1.22-27

echo "1" > /proc/sys/net/ipv4/ip_forward
$IPT -t nat -A POSTROUTING -o ppp0 -j MASQUERADE

$TC qdisc del dev $DEV root
$TC qdisc add dev $DEV root handle 1: htb default 999
$TC class add dev $DEV parent 1: classid 1:1 htb rate 10mbit
$TC class add dev $DEV parent 1: classid 1:999 htb rate 1kbit
$TC qdisc add dev $DEV parent 1:999 handle 999: sfq perturb 10
$TC class add dev $DEV parent 1:1 classid 1:2 htb rate 16kbps

MARK=1
for $ip in $(cat $CLIENTS); do
$IPT -t mangle -A FORWARD -s $ip -j MARK --set-mark $MARK
$IPT -t mangle -A FORWARD -d $ip -j MARK --set-mark $MARK
$TC class add dev $DEV parent 1:2 classid 1:$MARK htb rate 2kbps ceil 5kbps
$TC qdisc add dev $DEV parent 1:$MARK handle $MARK: sfq perturb 10
$TC filter add dev $DEV protocol ip parent 1: prio 5 handle $MARK fw flowid 1:$MARK
let MARK=$MARK+1
done

the idea is to shape each pc at 5k and all (as a group) max at 16k
please tell me where am i wrong ?