Skip to contentSkip to conversation

Leaky bucket in TC

LARTC Fatih Düzova 2 participants 3 messages May 26, 2005 – May 27, 2005

lore
Share & tools
lore
#0 lore raw

Hi,
I am trying to control bandwidths of the connections by using TC with HTB. But I want to implement Leaky Bucket on this structure so as to have a straight flow.
Due to being new in this area, could anyone help me how I could do this? Does TC support leaky bucket?

Best regards,

Fatih Duzova
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#1 lore raw

if by "leaky bucket" u mean "drop everything above a certain rate" then htb can do this as a part of normal operation.

Quoted 16 lines · Fatih Düzova

Hi,
I am trying to control bandwidths of the connections by using TC with HTB. But I want to implement Leaky Bucket on this structure so as to have a straight flow.
Due to being new in this area, could anyone help me how I could do this? Does TC support leaky bucket?

Best regards,

Fatih Duzova
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

Signature · 2 lines
Miłego Dnia
Krystian Antoni

_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

#2 lore raw
In reply to Fatih Düzova

Thank you for your response,
My aim is to define a bandwidth (i guess it can be done by defining equal rate and ceil values), and not to allow to pass this value "at any moment" during the connection. Is htb able to do this job, for instance in the simple example below?

tc qdisc add dev ath0 root handle 1:0 htb default 15 tc class add dev ath0 parent 1:0 classid 1:1 htb rate 240kbit

tc class add dev ath0 parent 1:1 classid 1:5 htb rate 72kbit ceil 72kbit tc class add dev ath0 parent 1:1 classid 1:10 htb rate 120kbit ceil 120kbit tc class add dev ath0 parent 1:1 classid 1:15 htb rate 48kbit ceil 48kbit

tc qdisc add dev ath0 parent 1:5 handle 5:0 sfq perturb 10 tc qdisc add dev ath0 parent 1:10 handle 10:0 sfq perturb 10 tc qdisc add dev ath0 parent 1:15 handle 15:0 sfq perturb 10

tc filter add dev ath0 protocol ip parent 1:0 prio 1 u32 match ip dport 22 0xffff flowid 1:5
tc filter add dev ath0 protocol ip parent 1:0 prio 1 u32 match ip sport 22 0xffff flowid 1:5
tc filter add dev ath0 protocol ip parent 1:0 prio 1 u32 match ip dport 80 0xffff flowid 1:10
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc