From: <hur...@us...> - 2004-01-19 18:25:17
|
Update of /cvsroot/routingtools/tools/rc.d In directory sc8-pr-cvs1:/tmp/cvs-serv8920/rc.d Modified Files: shaper Log Message: - reworked packet marking filter (thus reducing DSL modem lockups I had) - tuned shaper settings - reworked bandwidth tree Index: shaper =================================================================== RCS file: /cvsroot/routingtools/tools/rc.d/shaper,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** shaper 17 Apr 2003 06:20:14 -0000 1.23 --- shaper 19 Jan 2004 18:25:13 -0000 1.24 *************** *** 29,33 **** TC=/usr/sbin/tc ! HTBTC=/usr/local/sbin/tc IPTABLES=/usr/sbin/iptables ISDNCTRL=/usr/sbin/isdnctrl --- 29,33 ---- TC=/usr/sbin/tc ! HTBTC=$TC #/usr/local/sbin/tc IPTABLES=/usr/sbin/iptables ISDNCTRL=/usr/sbin/isdnctrl *************** *** 78,83 **** CLASS_RATE=$[128*$LINKSPEED_UP*$CLASS_LOW/100] CLASS_CEIL=$[128*$LINKSPEED_UP*$CLASS_HIGH/100] ! $HTBTC class add dev $DEVICE parent 1:1 classid 1:$CLASS_ID htb rate ${CLASS_RATE}Bps ceil ${CLASS_CEIL}Bps burst 6k prio $CLASS_PRIO ! $TC qdisc add dev $DEVICE parent 1:$CLASS_ID handle $CLASS_ID: sfq perturb 10 done --- 78,83 ---- CLASS_RATE=$[128*$LINKSPEED_UP*$CLASS_LOW/100] CLASS_CEIL=$[128*$LINKSPEED_UP*$CLASS_HIGH/100] ! $HTBTC class add dev $DEVICE parent 1:1 classid 1:$CLASS_ID htb rate ${CLASS_RATE}Bps ceil ${CLASS_CEIL}Bps prio $CLASS_PRIO ! $TC qdisc add dev $DEVICE parent 1:$CLASS_ID handle ${CLASS_ID}0: sfq perturb 10 done *************** *** 88,96 **** echo -n " packet markers " ! $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -p icmp -j MARK --set-mark $CLASS_ID_0 ! $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -p tcp --tcp-flags ALL ACK -m length --length :64 -j MARK --set-mark $CLASS_ID_0 ! $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -p tcp --tcp-flags ALL SYN -m length --length :64 -j MARK --set-mark $CLASS_ID_0 ! $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -p tcp --tcp-flags ALL SYN,ACK -m length --length :64 -j MARK --set-mark $CLASS_ID_0 ! $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -p tcp --tcp-flags ALL RST -m length --length :64 -j MARK --set-mark $CLASS_ID_0 for class in $CLASSES; do --- 88,96 ---- echo -n " packet markers " ! $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -p icmp -j MARK --set-mark $CLASS_ID_0 ! $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -p tcp --tcp-flags SYN,RST,ACK SYN -m length --length :64 -j MARK --set-mark $CLASS_ID_0 ! ! $IPTABLES -A OUTPUT -t mangle -m mark --mark 0 -o $DEVICE -p icmp -j MARK --set-mark $CLASS_ID_0 ! $IPTABLES -A OUTPUT -t mangle -m mark --mark 0 -o $DEVICE -p tcp --tcp-flags SYN,RST,ACK SYN -m length --length :64 -j MARK --set-mark $CLASS_ID_0 for class in $CLASSES; do *************** *** 100,103 **** --- 100,104 ---- for tos in $CLASS_TOS; do $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -m tos --tos $tos -j MARK --set-mark $CLASS_ID + $IPTABLES -A OUTPUT -t mangle -m mark --mark 0 -o $DEVICE -m tos --tos $tos -j MARK --set-mark $CLASS_ID done *************** *** 110,113 **** --- 111,115 ---- for host in $CLASS_DSTHOSTS; do $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -d $host -j MARK --set-mark $CLASS_ID + $IPTABLES -A OUTPUT -t mangle -m mark --mark 0 -o $DEVICE -d $host -j MARK --set-mark $CLASS_ID done *************** *** 120,123 **** --- 122,126 ---- for host in $CLASS_SRCHOSTS; do $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -s $host -j MARK --set-mark $CLASS_ID + $IPTABLES -A OUTPUT -t mangle -m mark --mark 0 -o $DEVICE -s $host -j MARK --set-mark $CLASS_ID done *************** *** 135,138 **** --- 138,142 ---- fi $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -p $prot --dport $port -j MARK --set-mark $CLASS_ID + $IPTABLES -A OUTPUT -t mangle -m mark --mark 0 -o $DEVICE -p $prot --dport $port -j MARK --set-mark $CLASS_ID done *************** *** 150,153 **** --- 154,158 ---- fi $IPTABLES -A POSTROUTING -t mangle -m mark --mark 0 -o $DEVICE -p $prot --sport $port -j MARK --set-mark $CLASS_ID + $IPTABLES -A OUTPUT -t mangle -m mark --mark 0 -o $DEVICE -p $prot --sport $port -j MARK --set-mark $CLASS_ID done *************** *** 162,166 **** for class in $CLASSES; do eval CLASS_ID=\$CLASS_ID$class ! $TC filter add dev $DEVICE parent 1:0 prio 0 protocol ip handle $CLASS_ID fw flowid 1:$CLASS_ID done --- 167,171 ---- for class in $CLASSES; do eval CLASS_ID=\$CLASS_ID$class ! $TC filter add dev $DEVICE parent 1: prio 10 protocol ip handle $CLASS_ID fw flowid 1:$CLASS_ID done *************** *** 182,189 **** echo -n " kernel settings " ! echo $[512*1024] >/proc/sys/net/core/rmem_default ! echo $[512*1024] >/proc/sys/net/core/rmem_max ! echo $[512*1024] >/proc/sys/net/core/wmem_default ! echo $[512*1024] >/proc/sys/net/core/wmem_max # echo 0 >/proc/sys/net/ipv4/tcp_timestamps --- 187,194 ---- echo -n " kernel settings " ! echo $[128*1024] >/proc/sys/net/core/rmem_default ! echo $[128*1024] >/proc/sys/net/core/rmem_max ! echo $[128*1024] >/proc/sys/net/core/wmem_default ! echo $[128*1024] >/proc/sys/net/core/wmem_max # echo 0 >/proc/sys/net/ipv4/tcp_timestamps *************** *** 264,267 **** --- 269,277 ---- # # $Log$ + # Revision 1.24 2004/01/19 18:25:13 hurikhan + # - reworked packet marking filter (thus reducing DSL modem lockups I had) + # - tuned shaper settings + # - reworked bandwidth tree + # # Revision 1.23 2003/04/17 06:20:14 hurikhan # - do not remark already marked packets (this seems to be |