limiting upload with tc

view story

http://www.linuxquestions.org – i have a linux router for a LAN that has an interface named "external" which is the public-facing address. I am trying to set a global max upload rate for a client with local ip to 2mbit, and if the upload link is congested, have it slow down to a minimum of 900kbps. I do this: Code: tc qdisc add dev external root handle 1: htb default 1 tc class add dev external parent 1: classid 1:2 htb rate 905kbit ceil 2.15mbit and this: Code: iptables -t mangle -A POSTROUTING -o external -s -j CLASSIFY --set-class 1:2 Except the client ALWAYS has 900kbps upload (HowTos)