From mboxrd@z Thu Jan 1 00:00:00 1970 From: bert hubert Date: Sat, 06 Jul 2002 12:10:31 +0000 Subject: Re: [LARTC] tc hard problem Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: lartc@vger.kernel.org On Sat, Jul 06, 2002 at 10:45:12AM +0800, Patrick Chan wrote: > Hi, > > I have a Linux router which has to do QoS > Voice and Data traffic will pass through this router > Of cuz, voice traffic is put in first priority than data traffic > Can you tell me how can I configure tc in order to meet > the following requirements? > > 1. There are two types of traffic: voice and data > > 2. The bandwidth to the Internet is just 64K > > 3. Each voice call occupies 16K bandwidth, so > the whole bandwidth can only allows 4 concurrent voice calls > > 4. The most important and most hard to do: > If no voice call, data can use up to 64K bandwidth > > If there are three voice calls, voice can use up to 16K x 3 = 48K bandwidth, > data only can use 16K bandwidth > > If there are four voice calls, voice can use up to 64K bandwidth, > data cannot use any bandwidth > > Voice always come first, data can only use the bandwidth left. I've tried this and you can't get it perfect. The big thing with voice is that it really hates delays. I think you'll be able to do 3 calls and have data active at the same time. You can easily do this with the PRIO qdisc. Just make sure that all call data, which you can recognize because they are small UDP packets most of the time, and put them in the highest priority band, band 0 or 1 I think. Put the rest in the lowest band. I very much advise the use of 'tcng' http://tcng.sourceforge.net/dist/tcng-8s.tar.gz Configure with ./configure -n and read the example file. It should be pretty easy to write something that does what you want. Also see http://ds9a.nl/ols-presentation/800x600 , near the end. Regards, bert -- http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk http://lartc.org Linux Advanced Routing & Traffic Control HOWTO _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/