* [LARTC] RE: counter-strike
@ 2006-03-03 15:18 Sorin Panca
2006-03-04 13:44 ` Jakub Wartak
0 siblings, 1 reply; 2+ messages in thread
From: Sorin Panca @ 2006-03-03 15:18 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
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?
[-- Attachment #2: deus.tc --]
[-- Type: text/plain, Size: 2980 bytes --]
#!/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
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] RE: counter-strike
2006-03-03 15:18 [LARTC] RE: counter-strike Sorin Panca
@ 2006-03-04 13:44 ` Jakub Wartak
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Wartak @ 2006-03-04 13:44 UTC (permalink / raw)
To: lartc
Dnia pi±tek, 3 marca 2006 16:18, Sorin Panca napisa³:
> $tc qdisc add dev $DEV root handle 2: prio
first thing:
use bands & priomap parameters ( bands=2 ; priomap = 16x "1" ) to direct all
trafic defalult to the 2:2 class
--
Jakub Wartak
-vnull
FreeBSD/OpenBSD/Linux/Solaris/Network Administrator
http://vnull.pcnet.com.pl/
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-03-04 13:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-03 15:18 [LARTC] RE: counter-strike Sorin Panca
2006-03-04 13:44 ` Jakub Wartak
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.