TC=/sbin/tc EXT=eth1 |
$TC qdisc del dev $EXT root |
$TC qdisc add dev $EXT root handle 1:0 htb default 90 |
$TC class add dev $EXT parent 1:0 classid 1:1 htb rate
350kbit ceil 350kbit |
$TC class add dev $EXT parent 1:1 classid 1:5 htb rate
50kbit ceil 50kbit $TC class add dev $EXT parent 1:1 classid 1:10 htb rate 200kbit ceil 200kbit |
$TC class add dev $EXT parent 1:1 classid 1:90 htb rate 350kbit ceil 350kbit |
$TC qdisc add dev $EXT parent 1:5 handle 10:0 sfq
perturb 10 $TC qdisc add dev $EXT parent 1:10 handle 20:0 sfq perturb 10 $TC qdisc add dev $EXT parent 1:90 handle 90:0 sfq perturb 10 |
$TC filter add dev $EXT parent 1:0 protocol ip u32
match ip dport 80 0xffff classid 1:5 $TC filter add dev $EXT parent 1:0 protocol ip u32 match ip dport 1863 0xffff classid 1:5 $TC filter add dev $EXT parent 1:0 protocol ip u32 match ip dport 25 0xffff classid 1:10 |