Hello! I have a problem with the priority of COutner Strike packets in a LAN with an internet connection !(I have 1Mbps UP (limited by me at 575(see below), 1Mbps DOWN) When a single user download to FULL bandwidth the COutnerstrike works great, but when other users join the LAN and start useing the Bandwidth ....Counter Strike begins to have a very high latency ....practically unplayable!! There is something wrong in this scripts?? Sorry for the lengh of this e-mail but I'm desperate to find what is the problem....HOW CAN I MAKE GAMES like COUNTER STRIKE, have full priority!!! ######################### eth0 (iNET interface) ########################## #!/bin/sh # last update 26.02.2003 TOTAL=575Kbit echo "delete!" tc qdisc del dev eth0 root 2> /dev/null > /dev/null echo "qdisc..." tc qdisc add dev eth0 root handle 1: htb default 99 r2q 1 #parent tc class add dev eth0 parent 1: classid 1:1 htb rate $TOTAL ceil $TOTAL #ssh tc class add dev eth0 parent 1:1 classid 1:3 htb rate 32Kbit ceil $TOTAL prio 2 #vnc+rdc #tc class add dev eth0 parent 1:1 classid 1:4 htb rate 16Kbit ceil $TOTAL prio 2 #www tc class add dev eth0 parent 1:1 classid 1:5 htb rate 128Kbit ceil $TOTAL prio 1 burst 40k #telnet #tc class add dev eth0 parent 1:1 classid 1:6 htb rate 16Kbit ceil $TOTAL prio 2 #ACK+SYN+FIN+RST+ICMP+DNS tc class add dev eth0 parent 1:1 classid 1:60 htb rate 64Kbit ceil 64kbit prio #MSN&YM+IRC tc class add dev eth0 parent 1:1 classid 1:8 htb rate 64Kbit ceil $TOTAL prio 1 #ICMP #tc class add dev eth0 parent 1:1 classid 1:70 htb rate 32Kbit ceil 32Kbit # prio 1 #DNS #tc class add dev eth0 parent 1:1 classid 1:71 htb rate 32Kbit ceil 32Kbit # prio 2 #Counter tc class add dev eth0 parent 1:1 classid 1:72 htb rate 240Kbit ceil 240Kbit prio #default tc class add dev eth0 parent 1:1 classid 1:99 htb rate 32Kbit ceil $TOTAL prio 3 #tc qdisc add dev eth0 parent 1:99 handle 99: sfq perturb 1 tc qdisc add dev eth0 parent 1:5 handle 5: sfq perturb 3 #tc qdisc add dev eth0 parent 1:6 handle 6: sfq perturb 1 echo "filters..." #rdc tc filter add dev eth0 parent 1: protocol ip prio 2 u32 match ip sport \ 3389 0xffff flowid 1:3 #vnc #tc filter add dev eth0 parent 1: protocol ip prio 2 u32 match ip sport \ # 445 0xffff flowid 1:3 #telnet tc filter add dev eth0 parent 1: protocol ip prio 2 u32 match ip sport \ 23 0xffff flowid 1:3 #ssh sport tc filter add dev eth0 parent 1: protocol ip prio 2 u32 match ip sport \ 22 0xffff flowid 1:3 #ssh dport tc filter add dev eth0 parent 1: protocol ip prio 2 u32 match ip dport \ 22 0xffff flowid 1:3 #www tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip sport \ 80 0xffff flowid 1:5 #HTTPS tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip sport \ 443 0xffff flowid 1:5 #YM tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dport \ 5050 0xffff flowid 1:8 #MSN tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dport \ 1863 0xffff flowid 1:8 #IRC tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dport \ 6667 0xffff flowid 1:8 #MSN Transfer tc filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip dport \ 6891 0xffff flowid 1:8 #DNS tc filter add dev eth0 parent 1: protocol ip prio #tc filter add dev eth0 parent 1: protocol ip prio #tc filter add dev eth0 parent 1: protocol ip prio ######################################a MARK with iptables: /sbin/iptables -t mangle -A POSTROUTING -p UDP --dport 27005:27015 -j MARK --set-mark 0x1 tc filter add dev eth0 parent 1:0 protocol ip prio #ICMP tc filter add dev eth0 parent 1: protocol ip prio #ACK tc filter add dev eth0 parent 1: protocol ip prio #SYN tc filter add dev eth0 parent 1: protocol ip prio #FIN tc filter add dev eth0 parent 1: protocol ip prio #RST tc filter add dev eth0 parent 1: protocol ip prio ########################### eth1 (LAN Interface) ####################### #!/bin/sh TRATE=980Kbit echo "delete!" tc qdisc del dev eth1 root 2>/dev/null >/dev/null echo "add qdisc..." tc qdisc add dev eth1 root handle 1: htb default 99 r2q 1 #atentie!!! suma(rate copii) <= rate parinte !!!! echo "add classes..." tc class add dev eth1 parent 1: classid 1:1 htb rate $TRATE ceil $TRATE #tc class add dev eth1 parent 1: classid 1:139 htb rate 4000Kbit ceil 4000Kbit #ICMP class tc class add dev eth1 parent 1:1 classid 1:111 htb rate 32Kbit ceil 32Kbit prio #www class tc class add dev eth1 parent 1:1 classid 1:3 htb rate 178Kbit ceil $TRATE prio 1 burst 100k #rdc class tc class add dev eth1 parent 1:1 classid 1:6 htb rate 32Kbit ceil $TRATE prio 2 #netbios #tc class add dev eth1 parent 1:1 classid 1:7 htb rate 32Kbit ceil $TRATE prio 2 #ssh class tc class add dev eth1 parent 1:1 classid 1:4 htb rate 16Kbit ceil $TRATE prio 2 #dhcpd #tc class add dev eth1 parent 1:1 classid 1:5 htb rate 16Kbit ceil $TRATE prio 2 #Counter Strike #tc class add dev eth1 parent 1: classid 1:8 htb rate 128Kbit ceil 128kbit prio #others parent DOWN=680 tc class add dev eth1 parent 1:1 classid 1:2 htb rate $[DOWN]Kbit ceil $TRATE prio 2 #badboys classes N=24 #23 + 1(default) = 24 RATE=$[(8*$DOWN)/(10*$N)] echo "$[RATE]Kbit / class" tc class add dev eth1 parent 1:2 classid 1:226 htb rate $[RATE]Kbit ceil $TRATE prio 2 #226 tc class add dev eth1 parent 1:2 classid 1:227 htb rate $[RATE]Kbit ceil $TRATE prio 2 #227 tc class add dev eth1 parent 1:2 classid 1:228 htb rate $[RATE]Kbit ceil $TRATE prio 2 #228 tc class add dev eth1 parent 1:2 classid 1:229 htb rate $[RATE]Kbit ceil $TRATE prio 2 #229 tc class add dev eth1 parent 1:2 classid 1:230 htb rate $[RATE]Kbit ceil $TRATE prio 2 #230 tc class add dev eth1 parent 1:2 classid 1:231 htb rate $[RATE]Kbit ceil $TRATE prio 2 #231 tc class add dev eth1 parent 1:2 classid 1:232 htb rate $[RATE]Kbit ceil $TRATE prio 2 #232 tc class add dev eth1 parent 1:2 classid 1:233 htb rate $[RATE]Kbit ceil $TRATE prio 2 #233 tc class add dev eth1 parent 1:2 classid 1:234 htb rate $[RATE]Kbit ceil $TRATE prio 2 #234 #tc class add dev eth1 parent 1:2 classid 1:235 htb rate $[RATE]Kbit ceil $TRATE prio 2 #235 tc class add dev eth1 parent 1:2 classid 1:236 htb rate $[RATE]Kbit ceil $TRATE prio 2 #236 tc class add dev eth1 parent 1:2 classid 1:237 htb rate $[RATE]Kbit ceil $TRATE prio 2 #237 tc class add dev eth1 parent 1:2 classid 1:238 htb rate $[RATE]Kbit ceil $TRATE prio 2 #238 tc class add dev eth1 parent 1:2 classid 1:239 htb rate $[RATE]Kbit ceil $TRATE prio 2 #239 tc class add dev eth1 parent 1:2 classid 1:240 htb rate $[RATE]Kbit ceil $TRATE prio 2 #240 tc class add dev eth1 parent 1:2 classid 1:241 htb rate $[RATE]Kbit ceil $TRATE prio 2 #241 tc class add dev eth1 parent 1:2 classid 1:242 htb rate $[RATE]Kbit ceil $TRATE prio 2 #242 tc class add dev eth1 parent 1:2 classid 1:243 htb rate $[RATE]Kbit ceil $TRATE prio 2 #243 tc class add dev eth1 parent 1:2 classid 1:244 htb rate $[RATE]Kbit ceil $TRATE prio 2 #244 tc class add dev eth1 parent 1:2 classid 1:245 htb rate $[RATE]Kbit ceil $TRATE prio 2 #245 #tc class add dev eth1 parent 1:2 classid 1:246 htb rate $[RATE]Kbit ceil $TRATE prio 2 #246 #tc class add dev eth1 parent 1:2 classid 1:247 htb rate $[RATE]Kbit ceil $TRATE prio 2 #247 #tc class add dev eth1 parent 1:2 classid 1:248 htb rate $[RATE]Kbit ceil $TRATE prio 2 #248 tc class add dev eth1 parent 1:2 classid 1:249 htb rate $[RATE]Kbit ceil $TRATE prio 2 #249 tc class add dev eth1 parent 1:2 classid 1:250 htb rate $[RATE]Kbit ceil $TRATE prio 2 #250 #tc class add dev eth1 parent 1:2 classid 1:251 htb rate $[RATE]Kbit ceil $TRATE prio 2 #251 tc class add dev eth1 parent 1:2 classid 1:252 htb rate $[RATE]Kbit ceil $TRATE prio 2 #252 #tc class add dev eth1 parent 1:2 classid 1:253 htb rate $[RATE]Kbit ceil $TRATE prio 2 #253 tc class add dev eth1 parent 1:2 classid 1:254 htb rate $[RATE]Kbit ceil $TRATE prio 2 #254 #default class tc class add dev eth1 parent 1:2 classid 1:99 htb rate $[RATE]Kbit ceil $TRATE prio 2 #0 echo "add filters..." #icmp tc filter add dev eth1 parent 1:0 protocol ip prio #www tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip sport \ 80 0xffff match ip dst 81.196.113.224/27 flowid 1:3 #MSN tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip sport \ 3783 0xffff match ip dst 81.196.113.224/27 flowid 1:3 #YM tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip sport \ 1034 0xffff match ip dst 81.196.113.224/27 flowid 1:3 #HTTPS tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip dport \ 443 0xffff match ip dst 81.196.113.224/27 flowid 1:3 #rdc tc filter add dev eth1 parent 1:0 protocol ip prio 2 u32 match ip dport \ 3389 0xffff match ip dst 81.196.113.224/27 flowid 1:6 #netbios #tc filter add dev eth1 parent 1:0 protocol ip prio 2 u32 match ip dport \ # 445 0xffff match ip dst 81.196.113.224/27 flowid 1:7 #ssh tc filter add dev eth1 parent 1:0 protocol ip prio 2 u32 match ip sport \ 22 0xffff flowid 1:4 tc filter add dev eth1 parent 1:0 protocol ip prio 2 u32 match ip dport \ 22 0xffff flowid 1:4 #dhcp #tc filter add dev eth1 parent 1:0 protocol ip prio 2 u32 match ip sport \ # 67 0xffff flowid 1:5 #Counter Strike #tc filter add dev eth1 parent 1:0 protocol ip prio #tc filter add dev eth1 parent 1:0 protocol ip prio tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.226 flowid 1:226 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.227 flowid 1:227 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.228 flowid 1:228 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.229 flowid 1:229 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.230 flowid 1:230 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.231 flowid 1:231 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.232 flowid 1:232 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.233 flowid 1:233 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.234 flowid 1:234 #tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ # 81.196.113.235 flowid 1:235 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.236 flowid 1:236 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.237 flowid 1:237 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.238 flowid 1:238 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.239 flowid 1:239 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.240 flowid 1:240 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.241 flowid 1:241 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.242 flowid 1:242 #tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ # 81.196.113.243 flowid 1:243 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.244 flowid 1:244 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.245 flowid 1:245 #tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ # 81.196.113.246 flowid 1:246 #tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ # 81.196.113.247 flowid 1:247 #tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ # 81.196.113.248 flowid 1:248 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.249 flowid 1:249 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.250 flowid 1:250 #tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ # 81.196.113.251 flowid 1:251 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.252 flowid 1:252 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.253 flowid 1:242 tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip dst \ 81.196.113.254 flowid 1:254 echo "add leaf qdisc..." tc qdisc add dev eth1 parent 1:3 handle 3: sfq perturb 2 #tc qdisc add dev eth1 parent 1:4 handle 4: sfq perturb 2 #tc qdisc add dev eth1 parent 1:5 handle 5: sfq perturb 2 #tc qdisc add dev eth1 parent 1:6 handle 6: sfq perturb 2 #tc qdisc add dev eth1 parent 1:139 handle 139: sfq perturb 1 #tc qdisc add dev eth1 parent 1:226 handle 226: sfq perturb 2 #tc qdisc add dev eth1 parent 1:227 handle 227: sfq perturb 2 #tc qdisc add dev eth1 parent 1:228 handle 228: sfq perturb 2 #tc qdisc add dev eth1 parent 1:229 handle 229: sfq perturb 2 #tc qdisc add dev eth1 parent 1:230 handle 230: sfq perturb 2 #tc qdisc add dev eth1 parent 1:231 handle 231: sfq perturb 2 #tc qdisc add dev eth1 parent 1:232 handle 232: sfq perturb 2 #tc qdisc add dev eth1 parent 1:233 handle 233: sfq perturb 2 #tc qdisc add dev eth1 parent 1:234 handle 234: sfq perturb 2 #tc qdisc add dev eth1 parent 1:235 handle 235: sfq perturb 2 #tc qdisc add dev eth1 parent 1:236 handle 236: sfq perturb 2 #tc qdisc add dev eth1 parent 1:237 handle 237: sfq perturb 2 #tc qdisc add dev eth1 parent 1:238 handle 238: sfq perturb 2 #tc qdisc add dev eth1 parent 1:239 handle 239: sfq perturb 2 #tc qdisc add dev eth1 parent 1:240 handle 240: sfq perturb 2 #tc qdisc add dev eth1 parent 1:241 handle 241: sfq perturb 2 #tc qdisc add dev eth1 parent 1:242 handle 242: sfq perturb 2 #tc qdisc add dev eth1 parent 1:243 handle 243: sfq perturb 2 #tc qdisc add dev eth1 parent 1:244 handle 244: sfq perturb 2 #tc qdisc add dev eth1 parent 1:245 handle 245: sfq perturb 2 #tc qdisc add dev eth1 parent 1:246 handle 246: sfq perturb 2 #tc qdisc add dev eth1 parent 1:247 handle 247: sfq perturb 2 #tc qdisc add dev eth1 parent 1:248 handle 248: sfq perturb 2 #tc qdisc add dev eth1 parent 1:249 handle 249: sfq perturb 2 #tc qdisc add dev eth1 parent 1:250 handle 250: sfq perturb 2 #tc qdisc add dev eth1 parent 1:251 handle 251: sfq perturb 2 #tc qdisc add dev eth1 parent 1:252 handle 252: sfq perturb 2 #tc qdisc add dev eth1 parent 1:253 handle 253: sfq perturb 2 #tc qdisc add dev eth1 parent 1:254 handle 254: sfq perturb 2 tc qdisc add dev eth1 parent 1:99 handle 99: sfq perturb 1 ---- Home, no matter how far... http://www.home.ro