lartc.org : Linux Advanced Routing & Traffic Control
(Answer) (Category) lartc.org FAQ : (Category) CBQ remarks :
bandwidth parameter
The bandwidth of the root qdisc is the device bandwidth. This is 10mbit for a 10 megabit NIC and 100mbit for a 100 megabit NIC. This parameter needs to be equal to the link the qdisc is attached to. For the subclasses, the bandwidth is equal to the bandwidth of the qdisc where the class belongs to. If you define a qdisc that's attached to a class, the bandwidth is equal to the rate of that class. So the same bandwidth parameter is used for al the classes with the same major number.

Example :

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 10: cbq bandwidth 10mbit \
       allot 1514 avpkt 1000
tc class add dev eth0 parent 10:0 classid 10:1 cbq \
       bandwidth 10mbit rate 1mbit prio 3 bounded allot 1514
tc qdisc add dev eth0 parent 10:1 handle 20: cbq \
       bandwidth 1mbit allot 1514 avpkt 1000

stef.coene@docum.org
[Append to This Answer]
Next: (Answer) borrowing traffic between classes
This document is: http://qos.dyndns.org:3389/cgi-bin/fom?file=5
[Search] [Appearance]
This is a Faq-O-Matic 2.719.