Re: tc is giving an error: RTNETLINK answers: File exists

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
Hi Fourcentsshy,

  1. After the 1st command is executed, there is a QDISC: 1:0
      After the 2nd command is executed, there is a CLASS: 1;1 (CLASS and QDISC have different namespace)
      After the 3td command is executed, request for creating QDISC: 1:0 failed since there is a QDISC with the handle 1:0 already.
              You could try handle 2:0 in the 3td command. You need care that handle 1:76 equal to 1:0, QDISC just uses the higher 2 bytes.

  2. I have tried the 3 commands which you gived. If I replace 1:76 with 2:0, the 3 commands could be executed successfully.

  3. The parameters ceil and cell are right for each QDISC. For HTB, tc would calculate the cell according to other parameters because PKT_SCHED need 
      cell. So for different QDISC, TC need different parameters.

Bests,
Yongle Lai
     
-----Original Message-----

Message: 8
Date: Mon, 18 Sep 2006 13:33:18 -0700
From: fourcentsshy <fourcentsshy@xxxxxxxxxxxx>
Subject: Re:  tc is giving an error: RTNETLINK answers: File
	exists
To: gypsy <gypsy@xxxxxxxxxx>, lartc <lartc@xxxxxxxxxxxxxxx>
Message-ID: <1158611598.7714.58.camel@xxxxxxxxxxxxxxxxxx>
Content-Type: text/plain

On Sat, 2006-09-16 at 09:14 -0700, gypsy wrote:
> fourcentsshy wrote:
> > the script so I could examine what was really going on. For this 
> > device, the error takes place on the third command. the command 
> > sequence take place like this:
> > 
> > /sbin/tc qdisc add dev eth5 root handle 1: cbq bandwidth 1600Kbit\  
> > cell 8 avpkt 1000 mpu 64
> > 
> > /sbin/tc class add dev eth5 parent 1: classid 1:1 est 1sec 8sec cbq\  
> > bandwidth 1600Kbit rate 1500kbit allot 1514 maxburst 20 avpkt 1000\  
> > prio 0 bounded isolated
> > 
> > /sbin/tc qdisc add dev eth5 parent 1:1 handle 1:76 cbq\  bandwidth 
> > 1600Kbit cell 8 avpkt 1000 mpu 64
> This says to me "cell", not "ceil".  That's a mistake.

I wish that were true. It would make this problem so much easier to solve. The HTB classes use the ceil parameter, but CBQ qdiscs use the cell parameter for packet transmission time calculations. The manual says it has a reasonable default, but the working script I have didn't shape properly until I played with it.

ATM, since I'm debugging the script, its setup to exit after the 3rd tc command I've listed above. tc doesn't seem to care what handle I give the second qdisc. I've tried many different handles and every time I get the same error: 

RTNETLINK answers: File exists. 

I've even tried running those very same lines on different machines, with different Linux distros on them. I keep getting the same error on them as well. It would be helpful if the device let me know which file it's talking about. The working script only adds CBQ classes to CBQ classes. Is it possible that its forbidden to add a CBQ qdisc to a CBQ class?

> 
> ==--snip--==

> One more thing.
> You can send your commands to a database (mysql or whatever).  Once 
> disallowing duplicate records and again allowing dups.  The difference 
> is the Bad Boy.

I do love mysql and work with it almost daily (great fun). I thought about writing a customer database for the very reason you mentioned, but dups are not the problem. I do have a working script that uses the same resource file with no problems. It limits customer bandwidth nicely and even uses the same method of choosing handles, but there is a minor problem with load balancing. I'd very much like to fix that.

> 
> I use HTB not CBQ but I still think the parameter is "ceil" not "cell"
> and fixing that will help or solve.

When I first started playing with tc, I tried using HTBs because they looked easier to work with. I couldn't get them to work, so I tried the CBQs. They didn't work either. It turned out that one of our technicians has installed an older version of Fedora on the gateway server and that version of tc was broken. I upgraded it to FC4 and the script came alive. Since the script was working, I didn't bother to switch back to the HTBs (but I'm strongly considering doing just that). 

Thanks for your time. I guess I'll keep trying different things. 

Cheers,
William Murphy
Velocity Technologies, Inc.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux