From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nataniel Klug Date: Thu, 06 Apr 2006 13:03:21 +0000 Subject: Re: [LARTC] QoS - Ping problem Message-Id: <44351199.3090903@cnett.com.br> List-Id: References: <44340CD6.1030907@cnett.com.br> In-Reply-To: <44340CD6.1030907@cnett.com.br> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org >> CLASS=3D"/sbin/tc class add dev $DL parent" >> $CLASS 1: classid 1:1 htb rate 3072Kbit >> $CLASS 1:1 classid 1:10 htb rate 1024Kbit ceil 1024Kbit >> $CLASS 1:1 classid 1:20 htb rate 1536Kbit ceil 2560Kbit >> $CLASS 1:1 classid 1:30 htb rate 512Kbit ceil 1024Kbit >> $CLASS 1:1 classid 1:40 htb rate 512Kbit ceil 1024Kbit >> $CLASS 1:1 classid 1:50 htb rate 512Kbit ceil 1024Kbit >> >> =20 > > For starters you might want to fix these rates. > 1024+1536+512+512+512 !=3D 3072 > > Over allocating may be causing the high number of dropped packets, and > its at least worth fixing before trying anything else. Make sure child > classes rates never add up to greater than the parents rate, in your > case 3072Kbit. Beyond that though I don't see anything obvious. You're > using sfq which what I usually see recommended to increase the queue > size and avoid dropped packets. > > - Jody > > =20 Jody, Thanks for your help. I changed the rules about child process and it=20 have no effect on ping time, my script now shows like the one it is into=20 the end of this email. Ping response: Estat=EDsticas do Ping para 172.30.0.1: Pacotes: SENDED =3D 10, RECEIVED =3D 6, LOST =3D 4 (40% LOST), Aproximar um n=FAmero redondo de vezes em milissegundos: M=EDnimo =3D 315ms, M=E1ximo =3D 423ms, M=E9dia =3D 371ms If I put this filter: $FILTER match ip protocol 1 0xff flowid 1:10 Then I will have a very good response time from outside world server=20 (like pinging into a big domain like www.uol.com.br), but when I try to=20 ping into my own server (the gateway of my network) it returns that big=20 size time and a big lost: Estat=EDsticas do Ping para 200.221.2.45: Pacotes: Enviados =3D 4, Recebidos =3D 4, Perdidos =3D 0 (0% de perda), Aproximar um n=FAmero redondo de vezes em milissegundos: M=EDnimo =3D 17ms, M=E1ximo =3D 21ms, M=E9dia =3D 18ms Att, Nataniel Klug ------------------------------------------------------------------------ #!/bin/sh #------ # Script de QoS Cyber Nett #------ # Nataniel Klug # suporte@cnett.com.br #------ TC=3D"/sbin/tc" IPT=3D"/usr/local/sbin/iptables" DL=3D"eth1" #------ # Apagando regras antigas de QoS #------ $TC qdisc del dev $DL root 2> /dev/null > /dev/null $TC qdisc del dev $DL ingress 2> /dev/null > /dev/null #------ # Regras para a placa eth1 #------ $TC qdisc add dev $DL root handle 1: htb default 50 CLASS=3D"/sbin/tc class add dev $DL parent" $CLASS 1: classid 1:1 htb rate 3072Kbit $CLASS 1:1 classid 1:10 htb rate 256Kbit $CLASS 1:1 classid 1:20 htb rate 1024Kbit ceil 2048Kbit $CLASS 1:1 classid 1:30 htb rate 512Kbit ceil 1024Kbit $CLASS 1:1 classid 1:40 htb rate 512Kbit ceil 512Kbit $CLASS 1:1 classid 1:50 htb rate 512Kbit ceil 512Kbit QDISC=3D"/sbin/tc qdisc add dev $DL parent" $QDISC 1:10 handle 10: sfq perturb 10 $QDISC 1:20 handle 20: sfq perturb 10 $QDISC 1:30 handle 30: sfq perturb 10 $QDISC 1:40 handle 40: sfq perturb 10 $QDISC 1:50 handle 50: sfq perturb 10 FILTER=3D"/sbin/tc filter add dev $DL parent 1:0 protocol ip prio 1 u32" $FILTER match ip protocol 1 0xff flowid 1:10 $FILTER match ip sport 22 0xffff flowid 1:10 $FILTER match ip sport 23 0xffff flowid 1:10 $FILTER match ip sport 2202 0xffff flowid 1:10 $FILTER match ip sport 80 0xffff flowid 1:20 $FILTER match ip sport 443 0xffff flowid 1:20 $FILTER match ip sport 3128 0xffff flowid 1:20 $FILTER match ip sport 53 0xffff flowid 1:30 $FILTER match ip sport 25 0xffff flowid 1:30 $FILTER match ip sport 110 0xffff flowid 1:30 $FILTER match ip sport 21 0xffff flowid 1:40 _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc