On Tuesday 01 October 2002 19:58, William Diehl III wrote: > Greetings! > > As the network administrator of a small private university in Riverside, CA > with little funding for bandwidth but 1500 on-campus students, I find it > necessary to shape our 3mbit bonded T1s so that students don't clobber the > staff (and perhaps vice versa). I've been a huge fan of linux traffic > shaping since forever but have always had issues with the priority and the > fairness. > > I come to you today with a problem. I need to be able to shape traffic and > ensure fairness. Consequently, I have the following script which enables 3 > cbq's with 3 levels of priority, the lowest (student queue) being limited > to ony 2/3rds of the bandwidth (2mbit). Each class has an SFQ attached as > well as an SFQ on the top class. > > The limit to 2mbit seems to function properly. However, neither the > priority or the fairness seem to work. I get students downloading at > 40-50KB/s, out performing a "high priority" address by 10x!! Also, one or > two students can dominate the entire student class which says to me the SFQ > is not doing its job. Sfq uses a ip-address AND ports to sepearate the flows. You can use efsq if you want. Efsq is sfq but you can configure it so it uses only the ip-address as hash key. > Here is my script, if any kind soul would help and let me know the issue, > we here would be eternally grateful (not to mention you would save us from > buying a packeteer which is VERY expensive!) Perhaps my understanding of > priority is off, but as I see it, if there's traffic in the high priority > queues, the lower queues must wait until dequeued. And the SFQs are > supposed to prevent one host from dominating traffic. I supposed if the > host has many simultaneous connections to different hosts this might be > construed as multiple streams in which case such a host could defeat the > SFQ. Is this what's happening? I have also tried with HTB and had similiar > results. I don't know about cbq, but the prio in htb is only used for excess bandwidth. So each class will get his rate no mather what the prio is. If each class is served, the remaining bandwidth is devided with the lowest prio class first. If you use htb, make sure the sum of the rate of the class = the ceil of the parent class. Same for cbq. > ########################################## > tc class add dev $eth parent 1:0 classid 1:1 cbq rate $bandwidth allot 1500 > bounded prio 1 > tc qdisc add dev $eth parent 1:1 handle 11: sfq perturb 5 This qdisc is useless. A qdisc is only usefull in leaf classes. For cbq, each time you add a class, you also should provide a weight parameter. As thumb rule : weight = rate / 10. Also provide a bandwidth parameter with value = link bandwdith = 10 Mbit when you add a class. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/