Hi list! I did this: 2: root qdisc prio 2:1 counter-strike 2:2 --> 1: htb qdisc for other traffic. 2:3 unused The shaping ocurrs both on the external and the internal interfaces. ping is in this case 500 - 1200 ms. without shapeing it is between 150 and 200 ms. :( Any ideas? Would ingress qdisc help or make things worse?
#!/bin/sh EXT=eth0 INT=eth1 tc=`which tc` ipt=`which iptables` HWR=10240 RNR=2048 LR=102400 RMC=$[ $HWR-$RNR ] u=kbit;U=Mbit BURST=8k CBURST=15k LOWLATENCY="27005 27015 27016 27017 27019 27020" OTHER="21 22 25 80 110 443 554 995 1718 5050 5900 6667 7000 10000" MAN="0x1" ME="86.107.182.1 192.168.0.1" ME2="193.226.120.153" NET="86.107.182.0/25" for DEV in `echo $INT $EXT `; do $tc qdisc del dev $DEV root &>/dev/null $tc qdisc add dev $DEV root handle 2: prio $tc qdisc add dev $DEV parent 2:2 handle 1: htb default 21 # if [ "$DEV" = "$EXT" ]; then # $tc class add dev $DEV parent 1: classid 1:A htb prio 0 rate $HWR$u ceil $HWR$u # else # $tc class add dev $DEV parent 1: classid 1:A htb prio 0 rate 100Mbit ceil 100Mbit # fi $tc class add dev $DEV parent 1: classid 1:2 htb prio 1 rate $[ $RNR/2 ]$u ceil $RNR$u $tc class add dev $DEV parent 1: classid 1:3 htb prio 2 rate $[ $RNR/2 ]$u ceil $RMC$u if [ "$DEV" = "$INT" ]; then $tc class add dev $DEV parent 1: classid 1:4 htb prio 4 rate $[ $LR-$HWR ]$u ceil $[ $LR-$HWR ]$u; fi $tc class add dev $DEV parent 1:2 classid 1:20 htb prio 0 rate $[ $RNR/4 ]$u ceil $[ $RNR-200 ]$u burst $BURST cburst $CBURST $tc class add dev $DEV parent 1:2 classid 1:21 htb prio 1 rate 1$u ceil $[ $RNR-500 ]$u $tc class add dev $DEV parent 1:3 classid 1:30 htb prio 0 rate $[ $RNR/2 ]$u ceil $[ $RMC*9/10 ]$u burst $BURST cburst $CBURST $tc class add dev $DEV parent 1:3 classid 1:31 htb prio 1 rate 1$u ceil $[ $RMC*8/10 ]$u $tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 $tc qdisc add dev $DEV parent 1:21 handle 21: sfq perturb 10 $tc qdisc add dev $DEV parent 1:30 handle 30: sfq perturb 10 $tc qdisc add dev $DEV parent 1:31 handle 31: sfq perturb 10 if [ "$DEV" = "$INT" ]; then $tc qdisc add dev $DEV parent 1:4 handle 40: sfq perturb 10; fi if [ "$DEV" = "$EXT" ]; then WAY=dport; WAY2=src; else WAY=sport; WAY2=dst; fi for PORT in `echo $LOWLATENCY `; do $tc filter add dev $DEV parent 1: protocol ip prio 0 u32 match ip $WAY $PORT 0xffff flowid 2:1 done if [ "$DEV" = "$INT" ]; then for ADDR in `echo $ME `; do $tc filter add dev $DEV parent 1: protocol ip prio 6 u32 match ip src $ADDR flowid 1:4 done else $tc filter add dev $DEV parent 1: protocol ip prio 2 u32 match ip src $ME2 flowid 1:30 fi $tc filter add dev $DEV parent 1: protocol ip prio 1 u32 match ip protocol 1 0xff flowid 2:1 for PORT in `echo $OTHER `; do $tc filter add dev $DEV parent 1: protocol ip prio 4 u32 match mark 1 0xffffffff match ip $WAY $PORT 0xffff flowid 1:30 $tc filter add dev $DEV parent 1: protocol ip prio 3 u32 match ip $WAY $PORT 0xffff flowid 1:20 done $tc filter add dev $DEV parent 1: protocol ip prio 6 u32 match mark 0x1 0xffffffff flowid 1:31 $tc filter add dev $DEV parent 1: protocol ip prio 5 u32 match ip $WAY2 $NET flowid 1:21 done
_______________________________________________ LARTC mailing list LARTC@xxxxxxxxxxxxxxx http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc