[LARTC] Ceiling question
Stef Coene
stef.coene@docum.org
Sat, 9 Oct 2004 19:57:24 +0200
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=3D"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.=20
Mhh, it should work.
> If I set the ceiling to 512k on 1:30, I get better=20
> performance on 1:20.
Mhh,=20
>
> Do I not understand the concept correctly? I assumes that the rate would
> give me the guaranteed bandwidth for each class,=20
Indeed.
> and the ceiling is there=20
> 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
=2D-=20
stef.coene@docum.org
=A0"Using Linux as bandwidth manager"
=A0 =A0 =A0http://www.docum.org/