Ceiling question

Linux Advanced Routing and Traffic Control

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

 



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
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. If I set the ceiling to 512k on 1:30, I get better 
performance on 1:20.

Do I not understand the concept correctly? I assumes that the rate would 
give me the guaranteed bandwidth for each class, and the ceiling is there 
to make it use what's "left over" from the other classes.

If someone could enlighten me, I would appreciate it.

Thanks, 

.peter

_______________________________________________
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