* [LARTC] ssh and cs LAG
@ 2004-10-12 18:44 Hariett Jones
0 siblings, 0 replies; only message in thread
From: Hariett Jones @ 2004-10-12 18:44 UTC (permalink / raw)
To: lartc
I have htb on 486 sx with 16mb ram. Slackware 9.1. Connection : dsl 1Mbit.
486 works as router and trafic shaper for network made of 12 pc's. it
does the job quite well, but when i play Counter-Strike or connect to my
486 via ssh (on lan), i get huge lag every 11-20 sec. when i connect to
486 via ssh and run iptraf program i see all the trafic, and after a
while when lag comes the kb/s stats reset. and iptraf shows that there
is only 50% bandwith usage. What could be the problem ?
root@gecon:/home/bernard# cat /etc/rc.d/rc.htb
#!/bin/sh
HIGHSPEED="19 "
CLIENTS="01 05 07 11 12 13 15 18 63"
SLOW="20 21 22"
htb_start() {
echo "tc qdisc add dev eth1 root handle 1: htb default 12"
tc qdisc add dev eth1 root handle 1: htb default 12
echo "tc qdisc add dev eth0 root handle 2: tbf rate 230kbit latency
50ms burst 1540"
tc qdisc add dev eth0 root handle 2: tbf rate 230kbit latency 50ms
burst 1540
echo "tc class add dev eth1 parent 1: classid 1:1 htb rate 1000kbit
ceil 1000kbit"
tc class add dev eth1 parent 1: classid 1:1 htb rate 1000kbit ceil
1000kbit
# tc class add dev eth1 parent 1: classid 1:2 htb rate 200kbit ceil 200kbit
echo "Ustawianie klas"
for IP in $HIGHSPEED; do
echo "tc class add dev eth1 parent 1:1 classid 1:1${IP} htb rate
500kbit ceil 1000kbit"
tc class add dev eth1 parent 1:1 classid 1:1${IP} htb rate 500kbit
ceil 1000kbit
# tc class add dev eth1 parent 1:2 classid 1:2${IP} htb rate 20kbit
ceil 20kbit
done
for IP in $CLIENTS; do
echo "tc class add dev eth1 parent 1:1 classid 1:1${IP} htb rate
100kbit ceil 1000kbit"
tc class add dev eth1 parent 1:1 classid 1:1${IP} htb rate 100kbit
ceil 1000kbit
# tc class add dev eth1 parent 1:2 classid 1:2${IP} htb rate 20kbit
ceil 20kbit
done
for IP in $SLOW; do
echo "tc class add dev eth1 parent 1:1 classid 1:1${IP} htb rate
50kbit ceil 1000kbit"
tc class add dev eth1 parent 1:1 classid 1:1${IP} htb rate 50kbit
ceil 1000kbit
done
# dla niezakwalifikowanych gdzie indziej
echo "tc class add dev eth1 parent 1:1 classid 1:100 htb rate 50kbit
ceil 50kbit quantum 4"
tc class add dev eth1 parent 1:1 classid 1:100 htb rate 50kbit ceil
50kbit quantum 4
# tc class add dev eth1 parent 1:2 classid 1:200 htb rate 10kbit ceil
10kbit
echo "Ustawianie filtrów i SFQ"
for IP in $HIGHSPEED; do
echo "tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match
ip dst 192.168.0.1${IP} flowid 1:1${IP}"
tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match ip dst
192.168.0.1${IP} flowid 1:1${IP}
# tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match ip
src 192.168.0.1${IP} flowid 1:2${IP}
echo "tc qdisc add dev eth1 parent 1:1${IP} handle 1${IP}:0 sfq
perturb 10"
tc qdisc add dev eth1 parent 1:1${IP} handle 1${IP}:0 sfq perturb 10
# tc qdisc add dev eth1 parent 1:2${IP} handle 2${IP}:0 sfq perturb 10
done
for IP in $CLIENTS; do
echo "tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match
ip dst 192.168.0.1${IP} flowid 1:1${IP}"
tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match ip dst
192.168.0.1${IP} flowid 1:1${IP}
# tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match ip
src 192.168.0.1${IP} flowid 1:2${IP}
echo "tc qdisc add dev eth1 parent 1:1${IP} handle 1${IP}:0 sfq
perturb 10"
tc qdisc add dev eth1 parent 1:1${IP} handle 1${IP}:0 sfq perturb 10
# tc qdisc add dev eth1 parent 1:2${IP} handle 2${IP}:0 sfq perturb 10
done
for IP in $SLOW; do
echo "tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match
ip dst 192.168.0.1${IP} flowid 1:1${IP}"
tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match ip dst
192.168.0.1${IP} flowid 1:1${IP}
# tc filter add dev eth1 protocol ip parent 1: prio 2 u32 match ip
src 192.168.0.1${IP} flowid 1:2${IP}
echo "tc qdisc add dev eth1 parent 1:1${IP} handle 1${IP}:0 sfq
perturb 10"
tc qdisc add dev eth1 parent 1:1${IP} handle 1${IP}:0 sfq perturb 10
done
echo "tc filter add dev eth1 protocol ip parent 1: prio 3 u32 match ip
dst 192.168.0.0/24 flowid 1:100"
tc filter add dev eth1 protocol ip parent 1: prio 3 u32 match ip dst
192.168.0.0/24 flowid 1:100
# tc filter add dev eth1 protocol ip parent 1: prio 3 u32 match ip src
192.168.0.0/24 flowid 1:200
echo "tc qdisc add dev eth1 parent 1:100 handle 100:0 sfq perturb 10"
# tc qdisc add dev eth1 parent 1:200 handle 200:0 sfq perturb 10
}
htb_stop() {
echo "tc qdisc del dev eth1 root"
tc qdisc del dev eth1 root
echo "tc qdisc del dev eth0 root"
tc qdisc del dev eth0 root
}
case "$1" in
'start')
htb_start
;;
'stop')
htb_stop
;;
'restart')
htb_stop
htb_start
;;
*)
echo "usage $0 start|stop|restart"
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-10-12 18:44 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-12 18:44 [LARTC] ssh and cs LAG Hariett Jones
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.