Re: Is this actually possible?

Linux Advanced Routing and Traffic Control

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

 



>Hi everyone, and thanks for your help so far. 
>
>I have been playing around with tc and htb for a couple of weeks now, and 
>while I am nowhere near understanding everything here, I am beginning to 
>know more about packets than I ever wanted to know. 
>
>I have two university buildings with a 1mb connection to the Internet. The
>two buildings (on either side of town) are connected through a tunnel
>using their internet connection, so that the administration can use the
>database across town. They have to share the connection with all the
>students on both sides, and the traffic the teachers create. So the people
>in admin have a hard time connecting to their database.
>
>What I have done so far is to create two leaves 1:10 and 1:20 and filtered 
>the traffic going to the database on the far end. What the admin there 
>would like is, that the connection is fully available for everyone, until 
>the secretary wants to look something up on the database. Then it should 
>have top prority and all the other traffic should virtually stop.
>
>I managed to apply the filters and have the packets ending up in the right 
>leaf. But the results are far from satisfactory. 
>
>#!/bin/bash
>tc qdisc add dev eth1 root handle 1: htb default 30
>tc class add dev eth1 parent 1: classid 1:1 htb rate 96mbit burst 15k
>tc class add dev eth1 parent 1: classid 1:7 htb rate 128kbps burst 15k
>tc class add dev eth1 parent 1:1 classid 1:10 htb rate 96mbit burst 15k
>tc class add dev eth1 parent 1:7 classid 1:20 htb rate 127kbps ceil 128kbps 
>	burst 15k prio 0
>tc class add dev eth1 parent 1:7 classid 1:30 htb rate 1kbps ceil 128kbps 
>	burst 1k prio 2 
>tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10
>tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10
>tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10
>U32="tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32"
>$U32 match ip src xx.xx.xx.xx/26 flowid 1:10
>$U32 match ip dst 10.190.19.0/28 match ip sport 19813 0xffff flowid 1:20
>
>Only if I lower the ceiling on leaf 1:30 does it show any results. If I 
>have the ceiling the same on both, there is no measureable result in 
>speed. The both seem to share the connection equally.  
>
>Am I missing the point, is it possible at all, or am I just too dum to get 
>it right?
>
>Thanks a lot, 
>
>.peter

I have the same problem and unable to solve.

According to tc-htb man page, if we set PRIO parameter, then after supplying the packets to satisfy the RATE of all classes, the HTB first sends the available packets to LOWEST PRIO class and so on. In this case if the above class 1:20 with PRIO 0 requests packets, than the class 1:30 must receive only 1kbit (the specified RATE), nothing more. In practice class 1:30 shares the bandwidth with class 1:20 and gets not 1kbit, but much more >20kbit.
I have TSL 2.1, kernel 2.4.27-3tr. I changed the PSCHED_CPU and disabled the HTB hysteresis, set SFQ queue length to 16, but the results are the same.

Is there something wrong with my understanding? Can anyone explain why PRIO not works?

Regards,
		
Zviad


_______________________________________________
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