TC进行流量控制实例:
 
# tc qdisc add dev eth0 root handle 10: htb default 11
#tc class add dev eth0 parent 10: classid 10:1 htb rate 8mbit ceil 8mbit
#tc class add dev eth0 parent 10:1 classid 10:11 htb rate 8mbit ceil 8mbit prio 0
#tc class add dev eth0 parent 10:1 classid 10:12 htb rate 400kbit ceil 400kbit prio 1
#tc class add dev eth0 parent 10:1 classid 10:13 htb rate 400kbit ceil 400kbit prio 1

#tc filter add dev eth0 parent 10: protocol ip prio 1 handle 100 fw classid 10:12
#iptables -t mangle -A POSTROUTING -d 192.168.1.187 -j MARK --set-mark 100

#tc filter add dev eth0 parent 10: protocol ip prio 1 handle 200 fw classid 10:13
#iptables -t mangle -A POSTROUTING -d 192.168.1.188 -j MARK --set-mark 200