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
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
Hi there, We currently use CBQ to traffic-shape our boxes. Just wondering, does anybody know of a way to graph the traffic flowing to netblocks / ip addresses? Cheers, Sahil
On Saturday 06 July 2002 14:11, Sahil Gupta - Net4U Limited wrote:> Hi there, > We currently use CBQ to traffic-shape our boxes. Just wondering, does > anybody know of a way to graph the traffic flowing to netblocks / ip > addresses?I create graphs based on the tc-counters. http://home.docum.org/stef.coene/qos/gui/rrd.html I also monitored what-ever-I-wanted with the counters of iptables/ipchains. But I have no graphing script for this. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net
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
Stef, Are you using SNMP? We currently have a great model working using SNMP/MRTG but, we want to get away from SNMP as it isn''t as accurate as we would like it to be. We are really looking for information off the router itself.... are you able to shed any light to it? Cheers, Sahil --------------------------------------------------------------------- Net4U Limited - New Zealands Premier Internet Service Provider -- Home of the new $24.95 Global Dialup / JetStart Service -- Visit http://www.net4u.co.nz for further information --------------------------------------------------------------------- On Sat, 6 Jul 2002, Stef Coene wrote:> On Saturday 06 July 2002 14:11, Sahil Gupta - Net4U Limited wrote: > > Hi there, > > We currently use CBQ to traffic-shape our boxes. Just wondering, does > > anybody know of a way to graph the traffic flowing to netblocks / ip > > addresses? > I create graphs based on the tc-counters. > http://home.docum.org/stef.coene/qos/gui/rrd.html > I also monitored what-ever-I-wanted with the counters of iptables/ipchains. > But I have no graphing script for this. > > Stef > > -- > > stef.coene@docum.org > "Using Linux as bandwidth manager" > http://www.docum.org/ > #lartc @ irc.openprojects.net > >
On Saturday 06 July 2002 16:18, Sahil Gupta - Net4U Limited wrote:> Stef, > Are you using SNMP? We currently have a great model working using > SNMP/MRTG but, we want to get away from SNMP as it isn''t as accurate as we > would like it to be. We are really looking for information off the router > itself.... are you able to shed any light to it?I use SNMP so I can monitor the box remotely. But what do you mean with "it isn''t as accurate as we would like it to be. We are really looking for information off the router itzelf" ?? MRTG is great to monitor devices, but for custom made monitor, you better create your own scripts. I''m leaving for holiday tomorrow morning, so it''s possible that you will have to wait 2 weeks for an answer on you mails. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net
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 = 48Kbandwidth,> 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
Hi, I have the following problem. I have followed iproute2 manual, and try to fillter incoming traffic by using u32. But it seems the filtering is not working properly, all the packets are still going default class. # tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 100Mbit avpkt 1000 cell 8 # tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate 5Mbit prio 3 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded # tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 100Mbit rate 3Mbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded # tc qdisc add dev eth0 parent 1:1 tbf rate 1Mbit buffer 10Kb/8 limit 15Kb mtu 1500 # tc qdisc add dev eth0 parent 1:1 tbf rate 1Mbit buffer 10Kb/8 limit 15Kb mtu 1500 # tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip src 192.20.21.14/32 flowid 1:1 # tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip src 192.20.21.13/32 flowid 1:2 Both class 1 & 2 (1:1, 1:2) are not getting any traffic Is there any thing am I missing. Thanks in advance --------------------------------- Do You Yahoo!? Yahoo! Health - Feel better, live better