lartc.org : Linux Advanced Routing & Traffic Control
(Answer) (Category) lartc.org FAQ : (Category) CBQ remarks :
borrowing traffic between classes
You can borrow the traffic between classes. For this, you create a bounded class with rate equal to the sum of the total rate the classes may get together. After that, you create child classes with this class as parent (make the child classes not isolated ! !). Now the classes can borrow bandwidth from each other.
Give each class also a weight parameter. Most users take weight = rate / 10.
tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 10: cbq bandwidth 10mbit avpkt 1000
tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 10mbit \
     rate 100kbps allot 1514 maxburst 20 avpkt 1000 bounded

tc class add dev eth0 parent 10:1 classid 10:10 cbq bandwidth 10mbit \
     rate 30kbps weight 3kb allot 1514 maxburst 20 avpkt 1000
tc class add dev eth0 parent 10:1 classid 10:20 cbq bandwidth 10mbit \
     rate 70kbps weight 7kb allot 1514 maxburst 20 avpkt 1000

stef.coene@docum.org
[Append to This Answer]
Previous: (Answer) bandwidth parameter
Next: (Answer) accuracy
This document is: http://qos.dyndns.org:3389/cgi-bin/fom?file=6
[Search] [Appearance]
This is a Faq-O-Matic 2.719.