I've created a script which uses tc to limit traffic through our internet gateway, but its not working how I expected it to. Instead of limiting each person to a certain speed, the whole network is limited to the speed. So if bob is downloading at 128kbps, then joe can't download anything. bob should be able to go at 128kbps and joe should be able to download at 128kbps at the same time. This is what I've got:
Code: Select all
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit
tc class add dev $DEV parent 1: classid 1:1 cbq rate $SPEED allot 1500 prio 5 bounded isolated
tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst $IP flowid 1:1
I've never really used tc before, and can't find too much info on the options. Any ideas for how to limit an individual rather than the network?