[Linux-Biella] QOS
MauroTB
linux@bilug.linux.it
Mon, 1 Jul 2002 09:13:44 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_000D_01C220DF.99BEA840
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Sto provando QOS ma non riesco a farlo andare
Ho un'hdsl a 2M,stavo provando a limitare tutto il traffico a 100k.
Non funziona,o meglio
tc qdisc add dev eth0 root handle 10: cbq bandwidth 2Mbit avpkt 1000
tc class add dev eth0 parent 10: classid 10:1 cbq bandwidth 2Mbit rate =
2Mbit allot 1514 weight 200Kbit prio 8 maxburst 20 avpkt 1000
tc class add dev eth0 parent 10:1 classid 10:2 cbq bandwidth 10Mbit rate =
100kbps allot 1514 weight 10kbit prio 5 maxburs 20 avpkt 1000 bounded
tc qdisc add dev eth0 parent 10:1 sfq quantum 1514 perturb 15
iptables -t mangle -F
iptables -t mangle -A PREROUTING -o eth0 -t mangle -j MARK --set-mark 15
tc filter add dev eth0 parent 10:0 protocol ip prio 5 handle 15 fw =
flowid 10:2
se faccio #tc -s class show dev eth0
il comando mi ritorna
class cbq 10: root rate 2Mbit (bounded,isolated) prio no-transmit
Sent 382278 bytes 529 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 3124 undertime 0
class cbq 10:1 parent 10: leaf 8013: rate 2Mbit prio no-transmit
Sent 27834 bytes 129 pkts (dropped 0, overlimits 0)
borrowed 0 overactions 0 avgidle 3124 undertime 0
class cbq 10:2 parent 10:1 rate 5000bps (bounded) prio 5
Sent 27834 bytes 129 pkts (dropped 0, overlimits 82)
borrowed 0 overactions 0 avgidle 3.57712e+06 undertime 0
Vedo che i contatori di 10:1 salgono ma ci sono molti overlimits,e la =
banda disponibile non =E8 'bounded' sui 100k ma se provo un download =
vado con isoliti 250k/sec.
Qualche idea?
TNX
------=_NextPart_000_000D_01C220DF.99BEA840
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2716.2200" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Sto provando QOS ma non riesco a farlo=20
andare</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Ho un'hdsl a 2M,stavo provando a =
limitare tutto il=20
traffico a 100k.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Non funziona,o meglio</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>tc qdisc add dev eth0 root handle 10: =
cbq bandwidth=20
2Mbit avpkt 1000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tc class add dev eth0 parent 10: =
classid 10:1 cbq=20
bandwidth 2Mbit rate 2Mbit allot 1514 weight 200Kbit prio 8 maxburst 20 =
avpkt=20
1000</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tc class add dev eth0 parent 10:1 =
classid 10:2 cbq=20
bandwidth 10Mbit rate 100kbps allot 1514 weight 10kbit prio 5 =
maxburs 20=20
avpkt 1000 bounded<BR>tc qdisc add dev eth0 parent 10:1 sfq quantum 1514 =
perturb=20
15</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>iptables -t mangle -F<BR>iptables -t =
mangle -A=20
PREROUTING -o eth0 -t mangle -j MARK --set-mark 15<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>tc filter add dev eth0 parent 10:0 =
protocol ip prio=20
5 handle 15 fw flowid 10:2<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>se faccio #tc -s class show dev =
eth0</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>il comando mi ritorna</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>class cbq 10: root rate 2Mbit =
(bounded,isolated)=20
prio no-transmit<BR> Sent 382278 bytes 529 pkts (dropped 0, =
overlimits=20
0)<BR> borrowed 0 overactions 0 avgidle 3124 undertime 0<BR>class =
cbq 10:1=20
parent 10: leaf 8013: rate 2Mbit prio no-transmit<BR> Sent 27834 =
bytes 129=20
pkts (dropped 0, overlimits 0)<BR> borrowed 0 overactions 0 =
avgidle 3124=20
undertime 0<BR>class cbq 10:2 parent 10:1 rate 5000bps (bounded) prio=20
5<BR> Sent 27834 bytes 129 pkts (dropped 0, overlimits =
82)<BR> =20
borrowed 0 overactions 0 avgidle 3.57712e+06 undertime =
0<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Vedo che i contatori di 10:1 salgono ma =
ci sono=20
molti overlimits,e la banda disponibile non =E8 'bounded' sui 100k ma se =
provo un=20
download vado con isoliti 250k/sec.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Qualche idea?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>TNX</DIV></FONT></BODY></HTML>
------=_NextPart_000_000D_01C220DF.99BEA840--