URGENT help required - iproute2+tc Quality of Service

URGENT help required - iproute2+tc Quality of Service

Post by Steve Co » Mon, 11 Sep 2000 08:20:31



Hi,

I'm in urgent need of help with 'Quality of Service' facilities of iproute2 -
specifically the tc command. I have been trying to set up a linux box
with 2 NICs to act as a bandwidth throttling router.  This is urgently
required for work to test bandwidth functionality but I've been
running inot problems

The router is up and running fine but I cannot get the tc command to work.
I always seem to get the same errors. I've been esperimenting with
differnet commands but my first attempt - see example - is copied out  
of the iproute2 HOWTO:

./tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth \
10Mbit rate 10Mbit allot 1514 weight 1Mbit prio 8 maxburst 20 avpkt 1000

./tc class add dev eth0 parent 10:1 classid 10:100 cbq bandwidth 10Mbit \
rate 1Mbit allot 1514 weight 800Kbit prio 5 maxburst 20 avpkt 1000  bounded

./tc qdisc add dev eth0 parent 10:100 sfq quantum 1514b perturb 15

./tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip \
dst 172.16.0.0/16 flowid 10:100

and generates:

RTNETLINK answers: No such file or directory
RTNETLINK answers: No such file or directory
RTNETLINK answers: No such file or directory
RTNETLINK answers: Invalid argument

I first tried the with the standard Mandrake 2.2.4-15 kernel - and the
latest rpm download of iproutes2. Next I donwloaded the iproute2
'patches' for the kernel and recompiled - also downloading the latest
sources for iproute2 and patching those. Finally, I have tried compiling
the latest 2.4 kernel with all the appropraite modules as requested in
most documentation - I have even tried compiling in (rather than loading
moduled) nearly any network related function I can find that could possibly
be linked - but still I get the same errors. Whether they are being
generated by the same problem I don't know (I have seen documentation
saying that there are very limited error messaging for tc). It must
be something else I'm doing - or haven't done.

I'm going to try 'shaper' Sunday - just in case - but it looks as if
it will only run when modularized (and I compiled it straight in the last kernel
build) so its Sunday in the office too :-( )

Any thoughts, possible tests, suggestions on getting to the bottom of
this will be very greatfully received. Also, any pointers to other forums to
try would be helpful.

Many thanks

Steve C


 
 
 

URGENT help required - iproute2+tc Quality of Service

Post by Andrew Kin » Tue, 26 Sep 2000 04:00:00


Steve, you have not created a root cbq qdisc to add the classes to.

you need something like:
tc qdisc add dev eth0 root handle 10: cbq bandwidth 10Mbit avpkt 1000
as the first line. This creates a cbq qdisc and also a cbq class.
Otherwise, you are trying to attach classes to nothing! hope this
helps. (this will create the 10:0 class that you are trying to add classes to).

Andrew King.

 
 
 

1. iproute2 + tc help

Hi,
 I am trying to use tc to implement a simulation enviornment.

I am using the following script to run this simulation and test the
bandwidth measurements using iperf and would expect it to get the same as
mentioned in the script but I guess due to weight parameter the expected
value is not the same when measured using iperf.

/sbin/tc qdisc del dev eth0 root

/sbin/tc qdisc add dev eth0 root handle 10: cbq bandwidth 100Mbit avpkt
1000

/sbin/tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 100Mbit
rate 100Mbit allot 1514 weight 1Mbit prio 8 maxburst 100 avpkt 1000

/sbin/tc class add dev eth0 parent 10:1 classid 10:200 cbq bandwidth 100Mbit
rate 60Mbit allot 1514 weight 6Mbit prio 5 maxburst 20 avpkt 1000 bounded

/sbin/tc class add dev eth0 parent 10:1 classid 10:300 cbq bandwidth 100Mbit
rate 20Mbit allot 1514 weight 2Mbit prio 5 maxburst 20 avpkt 1000 bounded

/sbin/tc class add dev eth0 parent 10:1 classid 10:400 cbq bandwidth 100Mbit
rate 30Mbit allot 1514 weight 3Mbit prio 5 maxburst 20 avpkt 1000 bounded

/sbin/tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip
dst 192.168.1.5 flowid 10:200

/sbin/tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip
dst 192.168.1.7 flowid 10:300

sbin/tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip
dst 192.168.1.8 flowid 10:400

10:200 class id is suppose to give 60Mbit but i think because (60 + 20 +
30Mbit) is exceeding 100Mbit I am getting only 25Mbit/s as throughput when I
use iperf.

So if need to modify the script inorder to achieve complete bandwidth
between the machines as mentioned in rules how should I change it.

Thanks in advance,
Srikanth Goteti
Computer Science, University of Houston

2. Sound card problems

3. iproute2+tc help!

4. Help with Network Card

5. iproute2 TC: Prefer UDP

6. Qt & Kde

7. iproute2+tc

8. automount help

9. iproute2-tc compilation problems

10. bandwidth management with "tc" (iproute2)

11. R6.0 + iproute2 trouble: tc errors?

12. IProute2/tc and limiting Windows Peer-to-Peer file sharing apps

13. QoS and/or fair queueing - package iproute2+tc (CBQ, CSZ, PRIO etc...)