[LARTC] Priority Queueing
Title: Priority Queueing Dear all, How can I do priority queueing in Linux? Should I use PRIO qdisc? Can anyone give me an example on priority queueing? P.S. Priority Queueing is to classify packets into high and low queue, high queue packets always dequeue first before low queue. Patrick
[LARTC] VoIP and QoS
Title: VoIP and QoS There are two Linux routers, a 64K leased line is used to connect these two machines. Now, we would like to run Voice over IP between two machines. We have to run QoS and tag voice packet's TOS field, otherwise, the voice quality is terrible if we transfer file and make voice call at the same time. I am not familiar with tc in Linux. But I have copied a script from LARTC archives. If the following config is used, the situation is better than nothing used. The voice packets can be tagged as TOS=0x21: tc qdisc add dev hdlc0 parent 1:1 handle 2: pfifo limit 512 tc qdisc add dev hdlc0 parent 1:2 handle 3: pfifo limit 512 tc qdisc add dev hdlc0 parent 1:3 handle 4: pfifo limit 512 tc filter add dev hdlc0 parent 1:0 protocol ip prio 1 u32 divisor 1 tc filter add dev hdlc0 parent 1:0 prio 1 u32 match ip tos 0x21 0xff flowid 1:1 I don't know what it means exactly. But this is used, the voice quality is bad at the beginning when file is transferred. The voice quality will "converge" to be good after about 30 seconds. However, this is not acceptable. Can anyone tell me what is the best tc config for running VoIP? Thanks very much.
[LARTC] How to read the statistics
Title: How to read the statistics Hi all, How can I know how many packets are dropped? I have used: tc qdisc It just show me which qdisc I have set. Thanks.
RE: [LARTC] QoS on data and voice traffic
Title: RE: [LARTC] QoS on data and voice traffic Hi, Thx for your reply. Can you give me an example configuration? -Original Message- From: Mr SERBAN Rares [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 6:27 PM To: Patrick Chan; [EMAIL PROTECTED] Subject: Re: [LARTC] QoS on data and voice traffic Hi, You are wrong! The packets must spend less time in your box for 0x08 class. So, if you are using cbq and sfq I don't belive that you will have good results. First you need a scheduler between 0x08 class and 0x00 like PRIO. You can use sfq for 0x00 class or tbf to limit the bandwidth. For 0x08 try to use pfifo. Also you can do the same configuration using htb. Please, for 0x08, use pfifo and for 0x00 sfq! A +, R. --- Patrick Chan <[EMAIL PROTECTED]> wrote: > Hi, > > Sorry for asking so much questions in this mailing > list. > > Because I have to develop a Linux router, > there are both data and voice packets passed thru > it. > The voice packets are already tagged with 0x8 in TOS > field. > The bandwidth of the serial link is 115200bps. > A voice call takes up 34Kbytes bandwidth. > > Now, I use the following tc config: > tc qdisc add dev ppp0 root handle 10: cbq bandwidth > 112Kbit avpkt 1000 > tc class add dev ppp0 parent 10:0 classid 10:100 cbq > bandwidth 112Kbit rate > 57Kb > it allot 1514 weight 5Kbit prio 2 maxburst 20 avpkt > 1000 isolated > tc class add dev ppp0 parent 10:0 classid 10:200 cbq > bandwidth 112Kbit rate > 55Kb > it allot 1514 weight 5Kbit prio 8 maxburst 20 avpkt > 1000 bounded > 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 > 2 u32 match ip tos 0x8 > 0xff > flowid 10:100 > tc filter add dev ppp0 parent 10:0 protocol ip prio > 8 u32 match ip tos 0x00 > 0xff > flowid 10:200 > > > 10:100 is isolated and the bandwidth allocated to > this class is 57Kb, > the voice packets are successfully put to class > 10:100 because > I know it by tc -s qdisc > theoretically, the voice quality should be very > smooth. > But the voice is not smooth, when I start to > download a file. > > If I turn off tc, the quality is even terrible, when > download a file. > > > > Sorry, I just learn tc for 1 month. Hope someone can > help me. > __ Do You Yahoo!? Sign up for SBC Yahoo! Dial - First Month Free http://sbc.yahoo.com
[LARTC] QoS on data and voice traffic
Title: QoS on data and voice traffic Hi, Sorry for asking so much questions in this mailing list. Because I have to develop a Linux router, there are both data and voice packets passed thru it. The voice packets are already tagged with 0x8 in TOS field. The bandwidth of the serial link is 115200bps. A voice call takes up 34Kbytes bandwidth. Now, I use the following tc config: tc qdisc add dev ppp0 root handle 10: cbq bandwidth 112Kbit avpkt 1000 tc class add dev ppp0 parent 10:0 classid 10:100 cbq bandwidth 112Kbit rate 57Kb it allot 1514 weight 5Kbit prio 2 maxburst 20 avpkt 1000 isolated tc class add dev ppp0 parent 10:0 classid 10:200 cbq bandwidth 112Kbit rate 55Kb it allot 1514 weight 5Kbit prio 8 maxburst 20 avpkt 1000 bounded 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 2 u32 match ip tos 0x8 0xff flowid 10:100 tc filter add dev ppp0 parent 10:0 protocol ip prio 8 u32 match ip tos 0x00 0xff flowid 10:200 10:100 is isolated and the bandwidth allocated to this class is 57Kb, the voice packets are successfully put to class 10:100 because I know it by tc -s qdisc theoretically, the voice quality should be very smooth. But the voice is not smooth, when I start to download a file. If I turn off tc, the quality is even terrible, when download a file. Sorry, I just learn tc for 1 month. Hope someone can help me.
Re: [LARTC] Priority Queueing on Linux
Title: Re: [LARTC] Priority Queueing on Linux Hi, Below is the explanation of priority queueing http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/qos.htm#xtocid22 I am developing a linux router. There is both data and voice traffic passed thru it. When I use priority queueing on Cisco router, the voice quality is good, evening downloading a large file. But I use the following tc config, the voice quality is not smooth when downloading a large file: tc qdisc add dev ppp0 root handle 10: cbq bandwidth 112Kbit avpkt 1000 tc class add dev ppp0 parent 10:0 classid 10:100 cbq bandwidth 112Kbit rate 57Kb it allot 1514 weight 5Kbit prio 2 maxburst 20 avpkt 1000 isolated tc class add dev ppp0 parent 10:0 classid 10:200 cbq bandwidth 112Kbit rate 55Kb it allot 1514 weight 5Kbit prio 8 maxburst 20 avpkt 1000 bounded 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 2 u32 match ip tos 0x8 0xff flowid 10:100 tc filter add dev ppp0 parent 10:0 protocol ip prio 8 u32 match ip tos 0x00 0xff flowid 10:200 voice packet is tagged with 0x8 in TOS field. Voice traffic only uses 34K bandwidth. So the bandwidth allocated to voice is enough. Is there any better tc config? -- Date: Tue, 9 Jul 2002 11:46:58 +0200 From: bert hubert <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: [LARTC] Priority Queueing on Linux On Tue, Jul 09, 2002 at 12:02:40PM +0800, Patrick Chan wrote: > There is priority queueing in Cisco router. > > Is there any equivalent implementation for TC on Linux? > > If yes, how can I configure and can you give me example? Please dig up a link so we can see what 'priority queueing' actually *is*. But I bet that tc has it. 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 Date: Tue, 09 Jul 2002 09:19:11 -0400 From: "Michael T. Babcock" <[EMAIL PROTECTED]> Organization: FibreSpeed Ltd. To: lartc <[EMAIL PROTECTED]> Subject: Re: [LARTC] Priority Queueing on Linux bert hubert wrote: >On Tue, Jul 09, 2002 at 12:02:40PM +0800, Patrick Chan wrote: > > >>There is priority queueing in Cisco router. >> >> >Please dig up a link so we can see what 'priority queueing' actually *is*. >But I bet that tc has it. > > I can almost guarantee Patrick is asking about diffserv support. -- Michael T. Babcock CTO, FibreSpeed Ltd.
[LARTC] What does overlimits mean?
Title: What does overlimits mean? Hi all, After configurating tc, there is a overlimits: [root@mailredhat root]# tc -s qdisc qdisc sfq 8030: dev ppp0 quantum 1514b perturb 15sec Sent 9505059 bytes 6445 pkts (dropped 0, overlimits 0) qdisc sfq 802f: dev ppp0 quantum 1514b perturb 15sec Sent 154284 bytes 897 pkts (dropped 0, overlimits 0) qdisc cbq 10: dev ppp0 rate 112Kbit (bounded,isolated) prio no-transmit Sent 9662343 bytes 7344 pkts (dropped 0, overlimits 1710) borrowed 0 overactions 0 avgidle 57142 undertime 0 in the root qdisc, the overlimits is 1710. 1) What does "overlimits" mean? 2) How to avoid overlimits? 3) Below is the tc config, why only root qdisc has overlimits? the child qdisc does not have? tc qdisc add dev ppp0 root handle 10: cbq bandwidth 112Kbit avpkt 1000 tc class add dev ppp0 parent 10:0 classid 10:100 cbq bandwidth 112Kbit rate 57Kb it allot 1514 weight 5Kbit prio 2 maxburst 20 avpkt 1000 isolated tc class add dev ppp0 parent 10:0 classid 10:200 cbq bandwidth 112Kbit rate 55Kb it allot 1514 weight 5Kbit prio 8 maxburst 20 avpkt 1000 bounded 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 2 u32 match ip tos 0x8 0xff flowid 10:100 tc filter add dev ppp0 parent 10:0 protocol ip prio 8 u32 match ip tos 0x00 0xff flowid 10:200
[LARTC] Priority Queueing on Linux
Title: Priority Queueing on Linux There is priority queueing in Cisco router. Is there any equivalent implementation for TC on Linux? If yes, how can I configure and can you give me example? Thx.
RE: [LARTC] tc hard problem
Title: RE: [LARTC] tc hard problem 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 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] tc hard problem
Title: 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