Skip to contentSkip to conversation

htb guarantee bandwidth

LARTC Rohan Almeida 4 participants 5 messages Aug 29, 2002 – Aug 30, 2002

lore
Share & tools
lore
#0 lore raw

Hi People,
I am really losing sleep over concept of bandwidth guarantee using htb.
Let me say that i have tried cbq and was quite satisfied.

A simple example.
I have a link of 128 Kbps, and 3 clients.
Now i give each of them a bandwidth restriction of 64 Kbps, and one out of them i want guaranteed bandwidth.

Now with cbq, i create an isolated class for the guaranteed guy, and i observerd that regardless of the other 2 machines being online, He always gets his allocated 64 Kbps.

For htb, since there is no keyword "isolated", i created 3 root classes. Also in htb, its documented that root classes do not share from each other. In other words, can i assume that they are isolated?

I tried the same scenario as above using htb, but unfortunately the guaranteed machine was not receiving the allocated bandwidth.

Has neone doen nething like this?
Thanx

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

#1 lore raw

hi,

you give to all the clients all the bandwith or limited at 64k, but with different priorities.

class parent 1: classid 1:5 htb rate 128kbit
class parent 1:5 classid 1:1 htb rate 64kbit ceil 128kbit prio 1 class parent 1:5 classid 1:2 htb rate 64kbit ceil 128kbit prio 2

you put the client that you want to have guaranted 64kbps in 1:1, and the other two in 1:2.

it's the clasic example from the devik page.

C

Quoted 22 lines · Rohan Almeida

Hi People,
I am really losing sleep over concept of bandwidth guarantee using htb.
Let me say that i have tried cbq and was quite satisfied.

A simple example.
I have a link of 128 Kbps, and 3 clients.
Now i give each of them a bandwidth restriction of 64 Kbps, and one out of them i want guaranteed bandwidth.

Now with cbq, i create an isolated class for the guaranteed guy, and i observerd that regardless of the other 2 machines being online, He always gets his allocated 64 Kbps.

For htb, since there is no keyword "isolated", i created 3 root classes. Also in htb, its documented that root classes do not share from each other. In other words, can i assume that they are isolated?

I tried the same scenario as above using htb, but unfortunately the guaranteed machine was not receiving the allocated bandwidth.

Quoted 8 lines

Has neone doen nething like this?
Thanx

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

-------------------------------------------------------
Xnet scaneaza automat toate mesajele impotriva virusilor folosind RAV AntiVirus. Xnet automatically scans all messages for viruses using RAV AntiVirus.

Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate variantele lor. Va rugam sa luati in considerare ca exista un risc de fiecare data cand deschideti fisiere atasate si ca MobiFon nu este responsabila pentru nici un prejudiciu cauzat de virusi.
Disclaimer: RAV AntiVirus may not be able to detect all new viruses and variants. Please be aware that there is a risk involved whenever opening e-mail attachments to your computer and that MobiFon is not responsible for any damages caused by viruses.

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

#2 lore raw
In reply to Rohan Almeida
Quoted 11 lines · Ciprian Niculescu

hi,

you give to all the clients all the bandwith or limited at 64k, but with different priorities.

class parent 1: classid 1:5 htb rate 128kbit
class parent 1:5 classid 1:1 htb rate 64kbit ceil 128kbit prio 1 class parent 1:5 classid 1:2 htb rate 64kbit ceil 128kbit prio 2

you put the client that you want to have guaranted 64kbps in 1:1, and the other two in 1:2.

The prio is only used to split the traffic that's available after the rates are satisfied. In this case, the prio will change nothing. But if you have 3 classes like :

class parent 1: classid 1:5 htb rate 128kbit
class parent 1:5 classid 1:1 htb rate 32kbit ceil 128kbit prio 1 class parent 1:5 classid 1:2 htb rate 32kbit ceil 128kbit prio 1 class parent 1:5 classid 1:3 htb rate 64kbit ceil 128kbit prio 2

and class 1:1 uses no bandwidth. Class 1:2 will get 32kbit, class 1:3 64kbit, so 32 kbit left. Class 1:2 has the lowest prio, so it will get the remaining 32kbit. So each class gets 64 kbit.

The rate for a class is always guaranteed. So you don't need an isolated option like in cbq.

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/
#3 lore raw
In reply to Rohan Almeida
Quoted 3 lines · Stef Coene

The prio is only used to split the traffic that's available after the rates are satisfied. In this case, the prio will change nothing. But if you have 3 classes like :

Yes, the prio will change nothing, so it might as well look like this:

class parent 1: classid 1:5 htb rate 128kbit
class parent 1:5 classid 1:1 htb rate 64kbit ceil 128kbit prio 1 class parent 1:5 classid 1:2 htb rate 64kbit ceil 128kbit prio 1

If we put the client with the guaranteed rate (call him A) into 1:1, and the other two clients (B and C) into 1:2, it should work out the same way. If A uses 64kbit, the remaining 64kbit is split between B and C, and assuming there is a fair qdisc attached to 1:2, they should each get 32kbit. If B is inactive, both A and C will get 64kbit: their classes' guaranteed rates. If A is inactive, 1:2 will hit the ceil and B and C will share 128kbit, so each gets 64kbit.

Doesn't that work out? Of course it's entirely academic, since it's not as if adding one extra rule makes it more complicated or less efficient in practice.

Jason.

Signature · 9 lines
Academic Computing Support Specialist
Algoma University College
Sault Ste. Marie, Ontario
705-949-2301 x330                                   Personal Home Page
http://www.auc.ca                                     http://sault.org

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#4 lore raw
In reply to Rohan Almeida
Quoted 11 lines · Jason Tackaberry
Quoted 3 lines · Stef Coene

The prio is only used to split the traffic that's available after the rates are satisfied. In this case, the prio will change nothing. But if you have 3 classes like :

Yes, the prio will change nothing, so it might as well look like this:

class parent 1: classid 1:5 htb rate 128kbit
class parent 1:5 classid 1:1 htb rate 64kbit ceil 128kbit prio 1 class parent 1:5 classid 1:2 htb rate 64kbit ceil 128kbit prio 1

Quoted 7 lines

If we put the client with the guaranteed rate (call him A) into 1:1, and the other two clients (B and C) into 1:2, it should work out the same way. If A uses 64kbit, the remaining 64kbit is split between B and C, and assuming there is a fair qdisc attached to 1:2, they should each get 32kbit. If B is inactive, both A and C will get 64kbit: their classes' guaranteed rates. If A is inactive, 1:2 will hit the ceil and B and C will share 128kbit, so each gets 64kbit.

Better, attach 2 new classes to 1:2 :

class parent 1:2 classid 1:10 htb rate 16kbit ceil 128kbit prio 1 class parent 1:2 classid 1:20 htb rate 48kbit ceil 128kbit prio 1

Class 10 will get 25% of the available bandwidth of class 1:2 and class 20 75%.

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/