Re: Explanation reqd. for few (more than few!) concepts in TC <long>

Linux Advanced Routing and Traffic Control

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

 



On Tuesday 28 October 2003 08:06, Suraj Shankar wrote:
> Hi all,
>   I am a system administrator trying to understand tc.
> I have been following the lartc documentation along
> with a few others. I am unable to understand few
> things explained in the howtos. Kindly help me with
> the same ...
> 1) Can somebody tell me the exact difference between a
> class and a qdisc? Martin Brown did try to explain to
> me but, I couldn't understand!
You have 2 types of qdiscs.  The root qdisc is attached to the device it self 
and all packets are queued in this qdisc.  If this is a class-full qdisc 
(like htb or cbq) you can add class.  A class can contain some packets.  You 
can stack the classes so you can add a class to a class.  So a packet enters 
the root qdisc and is redirected to a class by a filter.  You need to create 
your filters in such way that the packets are placed in a class that contains 
no other classes.  This class is named a leaf class.
But the leaf class only contains the traffic and can not send them.  To do so, 
you need to add a qdisc to that class.  It's the qdisc that will send the 
packets.  This can be a class-full qdisc so you can add classes, and restart 
the setup.  But that will be a waste of CPU cycles.  It's better to add a sfq 
qdisc or a fifo.

So, you have 1 root qdisc, some classes, some special classes : leaf-classes 
and an other set of qdiscs.

> 2) When we talk about pfifo, what is the 'pack size'
> understood to be; example, when I set limit to 10
> (packets), how many bytes is my bucket?
Pfifo holds packet, so the total bytes depends on the size of your packets : 
tot_bytes = bucket * size_packets.
You can also use bfifo.  This is a bucket expressed in bytes.

> 3) 'HTB is suited for fixed bandwidth' ... by "fixed"
> what exactly is meant ... meaning can it be used where
> bandwidth is shared but at almost always a certain
> "fixed" bandwidth is available (even if available
> bandwidth exceeds, it will be by only a few bytes, for
> a short duration)?
Fixed means that you always have the same bandwidth available on the link.  So 
no burst.  This is needed because you have to make sure YOU are the 
bottleneck so if you have a 1000kbit/s link, you have to make sure you never 
send more then 996kbit/s.

> 4) Can somebody suggest which qdisc is most ideal (for
> shaping and scheduling) in a n/w where the ISP provies
> a (512Kbit) pipe, which is shared by multiple (4)
> clients but, an average of 45bytes can be expected at
> any point in time (although, it might exceed this)?
That's a difficult one, because YOU have to be the bottleneck to get some good 
shaping results.  You can try the htb or the cbq qdisc and take a higher ceil 
then your link.  You will not be the bottleneck and loose some control.

> 5) The lartc howto speaks about 'mpu' with reference
> to TBF, and states "for ethernet, no packet uses less
> than 64 bytes", can you please tell me whether 64
> bytes is the least possible; meaning adding 20 bytes
> of IP and 28 bytes of TCP, I believed a TCP/IP packet
> with no payload could exist of 48 bytes, is this
> possible? and if a payload must be added, should it be
> 16 bytes atleast, can I not have a 52 byte ethernet
> packet? Kindly explain.
> Also, I am unable to see such a parameter when I do a
> tc...help, for TBF.
Sorry, no idea.

> 6) Could you please define the 'cell' parameter in a
> CBQ?
If you have a bounded class, the ceil is the rate.  If it's not bounded, the 
ceil will be the rate of a bounded parent class.

> Also, I am unable to see maxburst, minburst, minidle,
> mpu, rate parameter options when I do a ... for ex. :
> 'tc qdisc add dev eth0 handle 1 root cbq help'
Just take some example tc commands and copy the parameters you don't know.   
The only parameters you have to change is rate and weight.

> 7) How do I set WRR, link sharing and borrowing
> parameters using TC?
Do you mean the wrr qdisc?  See the homepage of the wrr qdisc.

> 8) Also, please pardon my ignorance but, do I need a
> filter for a classless qdisc, cause if I were to
> attach a classless qdisc to the root qdisc then by
> default all packets enter this qdisc and I believe I
> wouldn't have the scope to classify ... right/wrong?
Do you mean adding a class qdisc as the root qdisc or adding a class qdisc to 
a root qdisc?  If you replace the root qdisc with a class less qdisc, you 
don't need a filter.  If you add the class root qdisc to a root qdisc, you 
need a root qdisc with classes and add the class qdisc to a class.  So you 
need some filters to put the packets from the root qdisc to the class where 
the class qdisc is attached to.

More information on the subject can be found on http://www.docum.org.

Stef

-- 
stef.coene@xxxxxxxxx
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net

_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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