dear jamal, thank you for responding to the jonathan chan's previous email. I've looked at the efcbq example, and this is the tc script that I am using for the testing. Basically, there's two flow going through a router and in the router the tc script below is applied. First of all, The interface, is rate limited to $c_value. The first flow is the high priority traffic which should be given top priority, and the low priority traffic should only get the remaining bandwidth. however it seems that, as jonathan said in his first email, the rate limiting function doesn't seem to be working properly. Rather than rate limiting the traffic to c_value, it's limiting it a much higher rate. any help would be much appreciated regards darwin.agahari@csiro.au --------------------------- c_value=300Mbit tc qdisc del dev eth2 root tc qdisc add dev eth2 root handle 1:0 cbq bandwidth 1000Mbit avpkt 1516 allot 1514 tc class add dev eth2 parent 1:0 classid 1:1 cbq bandwidth 1000Mbit rate $c_value weight 20Mbit prio 1 allot 1514 maxburst 20 avpkt 1516 bounded isolated #high priroity traffic tc class add dev eth2 parent 1:1 classid 1:2 cbq bandwidth $c_value rate $c_value weight 20Mbit prio 2 allot 1514 maxburst 20 avpkt 1516 tc qdisc add dev eth2 parent 1:2 pfifo limit 2 tc filter add dev eth2 parent 1:0 protocol ip prio 1 u32 match ip dst 10.60.30.2/32 classid 1:2 #low priority traffic tc class add dev eth2 parent 1:1 classid 1:3 cbq bandwidth $c_value rate 12Kbit weight 1Kbit prio 8 allot 1514 maxburst 20 avpkt 1516 tc qdisc add dev eth2 parent 1:3 pfifo limit 20 tc filter add dev eth2 parent 1:0 protocol ip prio 2 u32 match ip dst 10.70.30.2/32 classid 1:3 ---------------------------- RESULT 1st flow to destination 10.60.30.2 (classid 1:2) transmit = 280Mbit receive = 279-280Mbit 2nd flow to destination 10.70.30.2 (classid 1:3) transmit = 302Mbit receive = 176Mbit TOTAL rate = 280+176 = 456 (supposed to be rate limited to 300Mbit) ------------------------ with c_value=400Mbit RESULT 1st flow to destination 10.60.30.2 (classid 1:2) transmit = 356Mbit receive = 355-356Mbit 2nd flow to destination 10.70.30.2 (classid 1:3) transmit = 511Mbit receive = 354Mbit TOTAL rate = 356+354 = 700 (supposed to be rate limited to 400Mbit) > > Date: Wed, 14 Jul 2004 12:39:08 +1000 > > From: <Jonathan.Chan@csiro.au> > > To: <linux-net@vger.kernel.org> > > Subject: Linux tc cbq shaping at high speed > > > > > > Dear all, > > > > I try to use TC CBQ to prioritise two classes of traffic > (say premium > > and best effort) into an aggregate trunk of limited size (i.e. less > > than the physical link speed). The CBQ function works fine if the > > aggregate bandwidth is under 200Mbps. If the aggregate bandwidth is > > set higher, say, 300Mbit, both classes of traffic would be sent out > > without rate limiting. > > > > should I use something rather than CBQ for the job > > (e.g. HTB)? Any comments/suggestions are much appreciated... > > Lets resolve this one first. CBQ should work just fine if it > doesnt we have a problem. Start with something simple which > does what you want. Look at iproute2/examples/diffserv/efcbq. > Extract the cbq bits out of it or just run the script in its entirety. > > cheers, > jamal - : send the line "unsubscribe linux-net" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html