Re: Ceiling question

Linux Advanced Routing and Traffic Control

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

 



On Saturday 09 October 2004 01:30, Peter Huetmannsberger wrote:
> Hi!
>
>  I have a setup where I want to prefer traffic on one port  (for testing
> purposes I used port 22)
>
> my setup is :
>
> tc qdisc add dev eth3 root handle 1: htb default 30
> tc class add dev eth3 parent 1: classid 1:1 htb rate 96mbit burst 15k
> tc class add dev eth3 parent 1: classid 1:7 htb rate 2mbit burst 15k
> tc class add dev eth3 parent 1:1 classid 1:10 htb rate 96mbit burst 15k
> tc class add dev eth3 parent 1:7 classid 1:20 htb rate 1800kbit ceil 2mbit
> burst 15k
> tc class add dev eth3 parent 1:7 classid 1:30 htb rate 200kbit ceil 2mbit
> burst 15k
The parent of class 1:7 should be 1:1.

> tc qdisc add dev eth3 parent 1:10 handle 10: sfq perturb 10
> tc qdisc add dev eth3 parent 1:20 handle 20: sfq perturb 10
> tc qdisc add dev eth3 parent 1:30 handle 30: sfq perturb 10
> U32="tc filter add dev eth3 protocol ip parent 1:0 prio 1 u32"
> $U32 match ip src 81.223.175.128/26 flowid 1:10
> $U32 match ip dst 192.168.5.9 match ip sport 22 0xfff flowid 1:20
> $U32 match ip dst 192.168.5.9 match ip dport 22 0xfff flowid 1:20
> $U32 match ip dst 192.168.5.10 match ip sport 22 0xfff flowid 1:20
> $U32 match ip dst 192.168.5.10 match ip dport 22 0xfff flowid 1:20
>
> What  would like to achieve is that trafic on port 22 has 1800kbit always,
> regardless of traffic on any other port, but if there is no traffic on
> port 22 the rest can claim the whole bandwidth (i.e. 2.3 mbit ).
>
> However if I set the ceiling to 2mbit on both, they seem to sher the
> bandwidth evenly. 
Mhh, it should work.

> If I set the ceiling to 512k on 1:30, I get better 
> performance on 1:20.
Mhh, 
>
> Do I not understand the concept correctly? I assumes that the rate would
> give me the guaranteed bandwidth for each class, 
Indeed.

> and the ceiling is there 
> to make it use what's "left over" from the other classes.
The ceil is the maximum the class can send.

I did some tests, maybe they can help you to understand htb:
http://www.docum.org/docum.org/tests/

Stef

-- 
stef.coene@xxxxxxxxx
 "Using Linux as bandwidth manager"
     http://www.docum.org/
_______________________________________________
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