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.
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
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.
Michael T. Babcock wrote:> 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.nope, here it is. http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/qos_c/qcprt2/qcdconmg.htm#23965 -- Anton Yurchenko<phila@dg.net.ua> Digital Generation
it is the same as PRIO queue in linux tc. devik On Tue, 9 Jul 2002, bert hubert wrote:> 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 > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ > >
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 <ahu@ds9a.nl> To: lartc@mailman.ds9a.nl 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" <mbabcock@fibrespeed.net> Organization: FibreSpeed Ltd. To: lartc <lartc@mailman.ds9a.nl> 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.
Anton Yurchenko wrote:> nope, here it is. > http://www.cisco.com/univercd/cc/td/doc/product/software/ios121/121cgcr/qos_c/qcprt2/qcdconmg.htm#23965From the page (for those who don''t follow links, or for the archives of this list): PQ [Priority Queuing] allows you to define how traffic is prioritized in the network. You configure four traffic priorities. You can define a series of filters based on packet characteristics to cause the router to place traffic into these four queues; the queue with the highest priority is serviced first until it is empty, then the lower queues are serviced in sequence. -- Michael T. Babcock CTO, FibreSpeed Ltd.
Hi Patrick I have implement voice and data on a linux machine with the assistance of tc. I have found limited success with tc to this end. I am using an ADSL link of 1.5Mb/256Kb. I previously had a 64Kb ISDN link which I could not really get top quality out of with data and voice. (So I just throw lots of bandwidth at the problem!!) I experimented with cbq and sfq but did not go with this solution as they try to be fair about the data it is handling. Voice does not want fairness as voice is a beast that demands attention and it wants it now!! Instead I have implemented PRIO with tbf on the upstream and have tinkered with tbf on an ingress filter on the downstream. I have no direct experience with imq or htb but I have a feeling they may not assist with the immediacy voice requires. If someone can help us with that point it would be most appreciated. The biggest difference I found was changing the mtu to 300. I have assigned voice to TOS 0x10 and used iptables to mark the traffic appropriately. heres is my tc script: tc qdisc del dev eth0 root > /dev/null 2>&1 tc qdisc del dev eth0 ingress > /dev/null 2>&1 tc qdisc add dev eth0 root handle 1: prio bands 4 priomap 1 3 2 3 3 3 0 3 3 3 3 3 3 3 3 3 tc qdisc add dev eth0 parent 1:2 handle 20: tbf rate 208kbit buffer 4kb limit 12kb mpu 50 tc qdisc add dev eth0 parent 1:3 handle 30: tbf rate 208kbit buffer 4kb limit 12kb mpu 50 tc qdisc add dev eth0 parent 1:4 handle 40: tbf rate 208kbit buffer 4kb limit 12kb mpu 50 tc qdisc add dev eth0 handle ffff: ingress tc filter add dev eth0 parent ffff: protocol ip prio 2 u32 match ip protocol 17 0xff match ip dport 1101 0xffff police rate 1536kbit burst 10k drop flowid :1 tc filter add dev eth0 parent ffff: protocol ip prio 6 u32 match ip src 0.0.0.0/0 police rate 1312kbit burst 10k drop flowid :1 I have also played with the priomap, this modification is not necessary. All voice (tos 0x10) goes through the highest priority which I am not rate limiting. The rest of the bands I am rate limiting to 208Kb. On the ingress side I have identified my voice packets and let them have full bandwidth, the rest of the traffic I am rate limiting to 1312Kb. I don''t know whether this helps the voice. If someone can comment on this it would be helpful. With this implementation I can have good quality voice conversations whilst downloading (or loading) My assumptions I have made about tc and voice and data are by no means authoritive, so any input on this subject from the group are welcome. Regards Rod Blennerhassett>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?
You can use the prio options in qdisc and channel traffic thro'' different qdiscs. Another option is to set TOS marks and route to qdiscs using the mark filters in u32 classifier. Why don''t you look up http://www.docum.net . Staf has a good site going. I''ve benefitted from it. Mohan -----Original Message----- From: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl] On Behalf Of Patrick Chan Sent: Tuesday, July 09, 2002 9:33 AM To: lartc@mailman.ds9a.nl Subject: [LARTC] 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.