From: Sorin Panca <sorin.panca@gmail.com>
To: lartc@vger.kernel.org
Subject: [LARTC] RE: counter-strike
Date: Fri, 03 Mar 2006 15:18:15 +0000 [thread overview]
Message-ID: <44085E37.8080408@gmail.com> (raw)
[-- 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
next reply other threads:[~2006-03-03 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-03-03 15:18 Sorin Panca [this message]
2006-03-04 13:44 ` [LARTC] RE: counter-strike Jakub Wartak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44085E37.8080408@gmail.com \
--to=sorin.panca@gmail.com \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.