Help:how many bandwidth are borrowed in HTB?How to caculate!

Linux Advanced Routing and Traffic Control

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

 



Hi,All
	I use HTB to control traffic.Here is my script:

	/usr/sbin/tc qdisc del dev nas0 root
	/usr/sbin/tc qdisc add dev nas0 root handle 1:0 htb default 60
   	/usr/sbin/tc class add dev nas0 parent 1:0 classid 1:1 htb ceil 896kbit rate 896kbit prio 0 burst 60k
	/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:10 htb ceil 896kbit rate 537kbit prio 1 burst 60k
	/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:20 htb ceil 361kbit rate 161kbit prio 2 burst 60k
	/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:30 htb ceil 298kbit rate 98kbit prio 3 burst 60k
	/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:40 htb ceil 271kbit rate 71kbit prio 4 burst 60k
	/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:50 htb ceil 117kbit rate 17kbit prio 5 burst 60k
	/usr/sbin/tc class add dev nas0 parent 1:1 classid 1:60 htb ceil 212kbit rate 12kbit prio 6 burst 60k

	#### Attach SFQ to each class #####
	/usr/sbin/tc qdisc add dev nas0 parent 1:10 handle 10: sfq perturb 10
	/usr/sbin/tc qdisc add dev nas0 parent 1:20 handle 20: sfq perturb 10
	/usr/sbin/tc qdisc add dev nas0 parent 1:30 handle 30: sfq perturb 10
	/usr/sbin/tc qdisc add dev nas0 parent 1:40 handle 40: sfq perturb 10
	/usr/sbin/tc qdisc add dev nas0 parent 1:50 handle 50: sfq perturb 10
	/usr/sbin/tc qdisc add dev nas0 parent 1:60 handle 60: sfq perturb 10

	######Filters#########

	/usr/sbin/tc filter add dev nas0 parent 1:0 protocol ip prio 1 u32 match ip sport 20 0xffff flowid 1:10
	/usr/sbin/tc filter add dev nas0 parent 1:0 protocol ip prio 1 u32 match ip dport 20 0xffff flowid 1:10
	/usr/sbin/tc filter add dev nas0 parent 1:0 protocol ip prio 3 u32 match ip sport 8000 0xffff flowid 1:30
	/usr/sbin/tc filter add dev nas0 parent 1:0 protocol ip prio 3 u32 match ip dport 8000 0xffff flowid 1:30

	Then,I use "ftp 21" and "ftp 8001" to test this script,which according to class 1:10 and class 1:30.I found that the class 1:30 will get more bandwidth than class 1:10.I got confused!You know,class can borrow more available bandwidth.But I don't know why the low priority (1:30) can borrow more bandwidth than high priority(1:10)?
	Would anyone like to tell me how HTB caculate borrowed bandwidth?
	Any suggestion will be highly appreciated!

  Best Regards

        swcims
        swcims@xxxxxxx
          2004-07-30


_______________________________________________
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