* [LARTC] tc hard problem
@ 2002-07-06 2:45 Patrick Chan
2002-07-06 12:10 ` bert hubert
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Patrick Chan @ 2002-07-06 2:45 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 851 bytes --]
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.
Thanks very much.
Patrick
[-- Attachment #2: Type: text/html, Size: 1622 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] tc hard problem
2002-07-06 2:45 [LARTC] tc hard problem Patrick Chan
@ 2002-07-06 12:10 ` bert hubert
2002-07-06 14:08 ` bert hubert
2002-07-08 3:17 ` Patrick Chan
2 siblings, 0 replies; 4+ messages in thread
From: bert hubert @ 2002-07-06 12:10 UTC (permalink / raw)
To: lartc
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [LARTC] tc hard problem
2002-07-06 2:45 [LARTC] tc hard problem Patrick Chan
2002-07-06 12:10 ` bert hubert
@ 2002-07-06 14:08 ` bert hubert
2002-07-08 3:17 ` Patrick Chan
2 siblings, 0 replies; 4+ messages in thread
From: bert hubert @ 2002-07-06 14:08 UTC (permalink / raw)
To: lartc
On Sat, Jul 06, 2002 at 02:10:31PM +0200, bert hubert wrote:
> > 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.
Oh, by the way, you need to install rules at *both* ends! Otherwise you have
little control over downstream, except for dropping it and hoping tcp slows
down enough.
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/
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [LARTC] tc hard problem
2002-07-06 2:45 [LARTC] tc hard problem Patrick Chan
2002-07-06 12:10 ` bert hubert
2002-07-06 14:08 ` bert hubert
@ 2002-07-08 3:17 ` Patrick Chan
2 siblings, 0 replies; 4+ messages in thread
From: Patrick Chan @ 2002-07-08 3:17 UTC (permalink / raw)
To: lartc
[-- Attachment #1: Type: text/plain, Size: 3199 bytes --]
Hello,
Thanks for your help first.
Basically I am not familar with tc very much.
I just copied a config for ethernet from google.com
iptables -t mangle -A FORWARD -p tcp --dport 1720 -j TOS --set-tos
Maximize-Throughput
tc qdisc add dev ppp0 root handle 10: cbq bandwidth 128Kbit avpkt 1000
tc class add dev ppp0 parent 10:0 classid 10:100 cbq bandwidth 64Kbit rate
32Kbit
allot 1514 weight 3Kbit prio 1 maxburst 20 avpkt 1000
tc class add dev ppp0 parent 10:0 classid 10:200 cbq bandwidth 64Kbit rate
32Kbi
t allot 1514 weight 3Kbit prio 5 maxburst 20 avpkt 1000
tc qdisc add dev ppp0 parent 10:100 sfq quantum 1514b perturb 15
tc qdisc add dev ppp0 parent 10:200 sfq quantum 1514b perturb 15
tc filter add dev ppp0 parent 10:0 protocol ip prio 1 u32 match ip tos 0x08
0xff
flowid 10:100
tc filter add dev ppp0 parent 10:0 protocol ip prio 5 u32 match ip tos 0x00
0xff
flowid 10:200
1) Because my requirement does not limit bandwidth, I just wanna set the
priority
of different types of data? How can I modify the config?
2) How can I change quantum and other parameters to be suitable for ppp,
instead of ethernet?
Thx very much!!!
-----Original Message-----
From: bert hubert [mailto:ahu@ds9a.nl]
Sent: Saturday, July 06, 2002 8:11 PM
To: Patrick Chan
Cc: lartc@mailman.ds9a.nl
Subject: Re: [LARTC] tc hard problem
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
[-- Attachment #2: Type: text/html, Size: 5900 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2002-07-08 3:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-06 2:45 [LARTC] tc hard problem Patrick Chan
2002-07-06 12:10 ` bert hubert
2002-07-06 14:08 ` bert hubert
2002-07-08 3:17 ` Patrick Chan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.