From: Anand Date: Sat, 28 Jan 2006 18:49:31 +0000 Subject: [LARTC] using tc on xen Message-Id: MIME-Version: 1 Content-Type: multipart/mixed; boundary="===============1705443305==" List-Id: To: lartc@vger.kernel.org --===============1705443305== Content-Type: multipart/alternative; boundary="----=_Part_14530_59821.1138473451363" ------=_Part_14530_59821.1138473451363 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Everyone! My knowledge of tc is very much limited and i got introduced to it by my need for traffic limiting on xen based VM's. For every VM there is a interface. The network is a bridged network. Has any one tried out something like this ? I tried the below script to limit download on an interface however it didn'= t seem to work. Still the interface is able to download at full speeds. 1. vm01 =3D=3D> is virtual interface ------------------------------------------------------------------------ #!/bin/sh TC=3D/sbin/tc DNLD=3D150Kbit # DOWNLOAD Limit DWEIGHT=3D15Kbit # DOWNLOAD Weight Factor $TC qdisc add dev vm01 root handle 11: cbq bandwidth 100Mbit avpkt 1000 mpu= 64 $TC class add dev vm01 parent 11:0 classid 11:1 cbq rate $DNLD weight $DWEIGHT allot 1514 prio 1 avpkt 1000 bounded $TC filter add dev vm01 parent 11:0 protocol ip handle 4 fw flowid 11:1 Any help would be highly appreciated. -- regards, Anand ------=_Part_14530_59821.1138473451363 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Everyone!

My knowledge of tc is very much limited and i got intro= duced to it by my need for traffic limiting on xen based VM's. For every VM= there is a interface. The network is a bridged network.

Has any one= tried out something like this ?

I tried the below script to limit download on an interface however = it didn't seem to work. Still the interface is able to download at full spe= eds.

   1. vm01 =3D=3D> is virtual interface 
-----------= -------------------------------------------------------------
#!/bin/sh
TC=3D/sbin/tc
DNLD=3D150Kbit # DOWNLOAD Limit
DWEI= GHT=3D15Kbit # DOWNLOAD Weight Factor

$TC qdisc add dev vm01 root ha= ndle 11: cbq bandwidth 100Mbit avpkt 1000 mpu 64
$TC class add dev vm01 = parent 11:0 classid 11:1 cbq rate $DNLD weight $DWEIGHT allot 1514 prio 1 a= vpkt 1000 bounded
$TC filter add dev vm01 parent 11:0 protocol ip handle 4 fw flowid 11:1=

Any help would be highly appreciated.

--

regards,<= br>
Anand ------=_Part_14530_59821.1138473451363-- --===============1705443305== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc --===============1705443305==--