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
if by "leaky bucket" u mean "drop everything above a certain rate" then htb can do this as a part of normal operation. On 5/26/05, Fatih Düzova <fduzova@gmail.com> wrote:> > 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 > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >-- Miłego Dnia Krystian Antoni _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
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