Skip to contentSkip to conversation

My 1st BW Manager

LARTC [email protected] 2 participants 2 messages Apr 19, 2003

lore
Share & tools
lore
#0 lore raw

Original Message:
-----------------
From: Stef Coene [email protected]

Quoted 9 lines · On Friday 18 April 2003 19:21, [email protected] wrote:

I'm not sure, but I think you use htb.init. And this is not the htb.init mailing list. This is the LARTC lists to discuss topics like shaping, advanced routing and other network stuff.
But answering on your question :
You have to create 1 class attached to the root qdisc and add the 4 other classes to that class (don't ask me how you have to do that with htb.init).
Can you also check that the filters are working and the traffic is placed in the class where it belongs?

Oh sorry about that, below is what command i inserted:

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 htb default 30
tc class add dev eth0 parent 1: classid 1:2 htb rate 120Kbit burst 15k tc class add dev eth0 parent 1:2 classid 1:11 htb rate 6Kbit ceil 120Kbit burst 15k
tc qdisc add dev eth0 parent 1:11 handle 11 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.1 classid 1:11
tc class add dev eth0 parent 1:2 classid 1:12 htb rate 6Kbit ceil 120Kbit burst 15k
tc qdisc add dev eth0 parent 1:12 handle 12 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.2 classid 1:12
tc class add dev eth0 parent 1:2 classid 1:13 htb rate 6Kbit ceil 120Kbit burst 15k
tc qdisc add dev eth0 parent 1:13 handle 13 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.3 classid 1:13
tc class add dev eth0 parent 1:2 classid 1:14 htb rate 6Kbit ceil 120Kbit burst 15k
tc qdisc add dev eth0 parent 1:14 handle 14 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.4 classid 1:14

I ve tried those, and it worked, all hosts able to borrow bandwidth from parent class (120Kbit), but when any host start to download with DAP (download manager) that can consume high bandwidth, it can borrow 120Kbit from parent class and the speed wont decrease as the other hosts up and ask for more bandwidth.

Any idea why ?

Regards,
Rio Martin.

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

#1 lore raw
Quoted 41 lines · On Saturday 19 April 2003 07:08, [email protected] wrote:

Original Message:
-----------------
From: Stef Coene [email protected]

Quoted 9 lines · On Friday 18 April 2003 19:21, [email protected] wrote:

I'm not sure, but I think you use htb.init. And this is not the htb.init mailing list. This is the LARTC lists to discuss topics like shaping, advanced routing and other network stuff.
But answering on your question :
You have to create 1 class attached to the root qdisc and add the 4 other classes to that class (don't ask me how you have to do that with htb.init).
Can you also check that the filters are working and the traffic is placed in the class where it belongs?

Oh sorry about that, below is what command i inserted:

tc qdisc del dev eth0 root
tc qdisc add dev eth0 root handle 1 htb default 30
tc class add dev eth0 parent 1: classid 1:2 htb rate 120Kbit burst 15k tc class add dev eth0 parent 1:2 classid 1:11 htb rate 6Kbit ceil 120Kbit burst 15k
tc qdisc add dev eth0 parent 1:11 handle 11 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.1 classid 1:11
tc class add dev eth0 parent 1:2 classid 1:12 htb rate 6Kbit ceil 120Kbit burst 15k
tc qdisc add dev eth0 parent 1:12 handle 12 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.2 classid 1:12
tc class add dev eth0 parent 1:2 classid 1:13 htb rate 6Kbit ceil 120Kbit burst 15k
tc qdisc add dev eth0 parent 1:13 handle 13 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.3 classid 1:13
tc class add dev eth0 parent 1:2 classid 1:14 htb rate 6Kbit ceil 120Kbit burst 15k
tc qdisc add dev eth0 parent 1:14 handle 14 sfq perturb 10
tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.4 classid 1:14

Quoted 7 lines

I ve tried those, and it worked, all hosts able to borrow bandwidth from parent class (120Kbit), but when any host start to download with DAP (download manager) that can consume high bandwidth, it can borrow 120Kbit from parent class and the speed wont decrease as the other hosts up and ask for more bandwidth.

Any idea why ?

Yes :)
Remove the burst parameter. Htb will calculate the minimal burst for you. And 6kbit is too low. You have 4 classes and you have 120kbit so give each class a rate of 120/4 = 30kbit.
And prio 100 for a filter is useless. Prio in filters is only to determine the order how the filters are checked. In your case, you can remove each time prio 100. This will not change anything, it's only a clean up if the commands.

Stef

Signature · 8 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/