Change to Ultimate Traffic Conditioner page

Linux Advanced Routing and Traffic Control

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

 



I found a problem in the Ultimate Traffic Conditioner page in the HTB script. The two classes of traffic 1:10 and 1:20 are given rates of 100% and 90% of their parent, which add up to 190%. HTB classes can't have their children's rates add up to more than their own rate.

From the looks of it, the intent was to grant the high priority class a guaranteed 10% of bandwidth, while still allowing it to borrow unused bandwidth from the bulk class. I've attached a small change that achieves that goal. I hope that's helpful.

-Edward L. Hannaford
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

diff --git a/lartc.db b/lartc.db
index ab12035..0fc4576 100644
--- a/lartc.db
+++ b/lartc.db
@@ -8887,13 +8887,14 @@ tc qdisc add dev $DEV root handle 1: htb default 20
 
 tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k
 
-# high prio class 1:10:
+# high prio class 1:10 - guaranteed 10 percent, but it can borrow
+# unused bandwidth up to the maximum, and has the highest priority:
 
-tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \
-   burst 6k prio 1
+tc class add dev $DEV parent 1:1 classid 1:10 htb rate $[$UPLINK/10]kbit \
+   ceil ${UPLINK}kbit burst 6k prio 1
 
 # bulk & default class 1:20 - gets slightly less traffic, 
-# and a lower priority:
+# a lower priority, and can't borrow bandwidth:
 
 tc class add dev $DEV parent 1:1 classid 1:20 htb rate $[9*$UPLINK/10]kbit \
    burst 6k prio 2

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