"Vinay V.Kulkarni" wrote:
>
> Hello all :
>
> I am trying to set up a TBF for a voice source with 128 kbps peakrate. My
> shell script is as follows :
>
> ---------8<--------------8<-----------------
>
> tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt \
> 1000 mpu 64
>
> tc class add dev eth0 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate \
> 2Mbit allot 1514 weight 1 prio 1 maxburst 20 avpkt 1000
>
> tc qdisc add dev eth0 parent 1:3 tbf rate 128Kbit burst 10Kbit \
> mtu 380 peakrate 128Kbit limit 10Kb
>
> ---------8<--------------8<-----------------
>
> I get a message " RTNETLINK answers: Invalid argument" when I run this..
> I can get rid of this error if I don't give the peakrate parameter. But I
> need that parameter!!!
>
> Any help or suggestion is highly appreciated.
>
> Thanks in advance,
> Vinay.
>
> -------------------------------------------------------------
> Vinay V. Kulkarni
> Project Assistant, ERNET, ECE Dept., IISc., Bangalore 560 012
> Ph : +91-80-360 0855. Fax : +91-80-360 7991
> -------------------------------------------------------------
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to [EMAIL PROTECTED]
Hi,
I don't know if this will be a problem, too. But the second tc command
say that you want to attach class 1:3 to parent 1:1. But there is no
parent 1:1. The root qdisc has handle 1: which means 1:0.
So you should try:
tc class add dev eth0 parent 1:0 classid 1:3 cbq bandwidth 10Mbit rate \
2Mbit allot 1514 weight 1 prio 1 maxburst 20 avpkt 1000
Concerning your problem with the peakrate I tried a few things. I used
bps instead of Kbit. 128Kbit is 16384bps. That didn't worked as well.
But when I tried it with a peakrate of 16385 everything worked fine and
even
tc qdisc ls dev eth0
said that the peakrate is 128Kbit. Don't ask me why. That seems strange
to me, but it works.
Here's the line I used:
tc qdisc add dev eth0 parent 1:3 tbf rate 128Kbit burst 10Kbit \
mtu 380 peakrate 16385bps limit 10Kb
That should work.
Bye,
Christoph
-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]