tc hard problem
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
Quoted 18 lines · Patrick Chan
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 calls4. The most important and most hard to do:
If no voice call, data can use up to 64K bandwidth
Quoted 7 lines
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
Signature · 6 lines
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 / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 5 lines · bert hubert
Quoted 1 line
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
Signature · 6 lines
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 / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
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:[email protected]]
Sent: Saturday, July 06, 2002 8:11 PM
To: Patrick Chan
Cc: [email protected]
Subject: Re: [LARTC] tc hard problem
Quoted 12 lines · Patrick Chan
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
Quoted 7 lines
3. Each voice call occupies 16K bandwidth, so
the whole bandwidth can only allows 4 concurrent voice calls4. The most important and most hard to do:
If no voice call, data can use up to 64K bandwidthIf there are three voice calls, voice can use up to 16K x 3 = 48K
bandwidth,
Quoted 6 lines
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
Signature · 3 lines
http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk http://lartc.org Linux Advanced Routing & Traffic Control HOWTO