On Friday 22 February 2002 17:38, Rajesh Revuru wrote: > HI all.. > > Iam using tc for testing diffserv fucntionalites. > > My basic interest is to allocate two classes for TCP and UDP and allot = diff > bw shares and test applying traffic generators. > > Iam using CBQ as my queueing discipline... > > tc qdisc add eth1 handle 10:root cbq allot 100Mb avpkt 100 bandwidth > 100Mbit > > Class 1:tc class add dev eth1 parent 10:1 root cbq weight 2 allot 40mb = prio > 2 avpkt 1000 rate 60mbit bandwidth 60mbit bounded isolated > > Class 2:tc class add dev eth1 parent 10:2 root cbq weight 7 allot 30mb = prio > 7 avpkt 1000 rate 60mbit bandwidth 60mbit bounded isolated > > filter 1:tc filter add dev eth1 prio 2 protocop ip root handle 1 fw cla= ssid > 10:1 > > filter 2:tc filter add dev eth1 prio 7 protocop ip root handle 2 fw cla= ssid > 10:2 > > ipchains -I output1 -p tcp -m 1 > > ipchains -I output2 -p udp -m 2 FIrst of all, the bandwith of the classes attacjed to a qdisc must be the= =20 same. So in your cas 100mbit. Second, you need to create a bounded class and attach it to the root qdis= c=20 with rate =3D bandwith. Attach both other class to this class in stead o= f the=20 root qdisc. And don't use the isolated parameter. It's not working. And take weight =3D rate /10. > Question 1: > > My intention is to apply a class.1 to TCP traffic class no.2 to UDP > traffic. Is that acheived? Iam using Iptraf to check the statistics at = the > interfaces.. but i see a little difference The filters and ipchains commands are OK. > Question 2: > > Is there any way where i can check the bw alloted to diff classes > graphically or by numbers? I have some scripts on www.docum.org. First script is monitor.pl and it=20 gives a real time bandwith usage of the classes (it uses the byte counter= s of=20 iptables/ipchains and not the output of the tc command). I have a=20 web-interface example here : http://qos.dyndns.org:8080/cgi-bin/monitor.p= l I have also a version that can be used in a terminal. I also wrote a new script. It uses the=20 output of tc and rrd to create=20 some graphs (http://home.docum.org/stef.coene/qos/gui/rrd.html). Hope this helps Stef --=20 stef.coene@docum.org More QOS info : http://www.docum.org/ Title : "Using Linux as bandwidth manager"