tc class add dev eth1 parent 1:1 classid 1:11 htb rate 300kbit ceil ${CEIL}kbit prio 1
tc class add dev eth1 parent 1:1 classid 1:12 htb rate 200kbit ceil ${CEIL}kbit prio 2
tc class add dev eth1 parent 1:1 classid 1:13 htb rate 300kbit ceil ${CEIL}kbit prio 3
tc qdisc add dev eth1 parent 1:13 handle 130: sfq perturb 10
tc filter add dev eth1 parent 1:0 protocol ip prio 2 handle 2 fw classid 1:11
tc filter add dev eth1 parent 1:0 protocol ip prio 3 handle 3 fw classid 1:12
tc filter add dev eth1 parent 1:0 protocol ip prio 4 handle 4 fw classid 1:13
iptables -t mangle -A PREROUTING -s 192.168.1.32/29 -j RETURN
iptables -t mangle -A PREROUTING -s 192.168.1.0/28 -j MARK --set-mark 0x1
iptables -t mangle -A PREROUTING -s 192.168.1.0/28 -j RETURN
iptables -t mangle -A PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j RETURN
iptables -t mangle -A PREROUTING -p tcp -m tcp --dport 80 -j RETURN
iptables -t mangle -A PREROUTING -p tcp -m tcp --dport 25 -j RETURN
iptables -t mangle -A PREROUTING -p tcp -m tcp --dport 110 -j RETURN
iptables -t mangle -A PREROUTING -m tos --tos Minimize-Delay -j RETURN
iptables -t mangle -A PREROUTING -m tos --tos Minimize-Cost -j MARK --set-mark 0x3
iptables -t mangle -A PREROUTING -m tos --tos Minimize-Cost -j RETURN
iptables -t mangle -A PREROUTING -m tos --tos Maximize-Throughput -j MARK --set-mark 0x4
iptables -t mangle -A PREROUTING -m tos --tos Maximize-Throughput -j RETURN