Alexandra Alvarado
2001-Jun-27 16:21 UTC
Priotizing Bandwith but without Shaping the Bandwith
Hello, I''m Alexandra Well, i have been working with cbq around 3 month ago without any problems, what i do is control the bandwith to 64Kbit for input and output and it works well. But now I don''t want control the Bandwith, i only need prioritize udp trafic over tcp trafic Can somebody to help me with my requirement? Thanks Alexandra
Alexandra Alvarado
2001-Jun-28 09:07 UTC
Re: Priotizing Bandwith but without Shaping the Bandwith
Thanks for answer to me, but: I have Red Hat 7.0 with kernel 2.2.16-22, and it doesn''t support "mangle" options, how can i do the same "Priotizing udp traffic over tcp but without Shaping the Bandwith" with ipchains and cbq or only cbq? Thanks A.A.A.A.B. "Marek L. Kozak" wrote:> > Alexandra Alvarado wrote: > > Hello, > > > But now I don''t want control the Bandwith, i only need prioritize udp > > trafic over tcp trafic > Try this: > iptables -t mangle -A PREROUTING -t udp -j TOS --set-tos > Maximize-Throughput > -- > Regards, > Marek L. Kozak
Alexandra Alvarado
2001-Jun-28 14:55 UTC
Re: Priotizing Bandwith but without Shaping the Bandwith
"Wingtung.Leung" wrote:> > On Thu, 28 Jun 2001, Alexandra Alvarado wrote: > > > I have Red Hat 7.0 with kernel 2.2.16-22, and it doesn''t support > > "mangle" options, how can i do the same "Priotizing udp traffic over tcp > > but without Shaping the Bandwith" with ipchains and cbq or only cbq? > > > > "Marek L. Kozak" wrote: > > > > > > Try this: > > > iptables -t mangle -A PREROUTING -t udp -j TOS --set-tos > > > Maximize-Throughput > > (Please quote correctly, and type your own text *beneath* the quoted text. > It makes the message much more readable.) > > First of all, I don''t think setting TOS field will change behaviour of the > network queue, most routers just ignore that field. And even if it is used > on the local Linux router, I don''t think Alexandra wanted a high > throughput for UDP traffic, but rather a low delay situation. > > Please try to describe in detail what you mean with "giving priority to > UDP traffic over TCP traffic", and what you want to achieve. > > The HOWTO gives an example for splitting bandwith with unbounded classes, > it might be good enough for your situation. Please try it first, and if it > is not what you wanted, give the problems with that setup. > > I''m not sure, but I don''t think ipchains (kernel 2.2) supports setting the > TOS field. It doesn''t matter, you don''t really need a firewall marker, you > can also redirect the traffic using the general u32 filter. > > -- > GnuPG public key: http://www.keyserver.net > fingerprint = A3C4 DE50 712D 4FA8 C564 4D96 5E06 C9CC ECFA 19C5 > > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/Hi, I''m Alexandra Well, as i say before, a i need that all traffic udp has priority over tcp traffic, because i have to improve the voice quility over internet, well now i''m upgrading to Red Hat 7.1 (kernel 2.4) to use TOS field, but my question is if this sentence: iptables -t mangle -A PREROUTING -p udp -j TOS --set-tos Maximize-Throughput works or not, and how can i verify it? Until know i use CBQ, but with cbq i only asign specific bandwith to my clients using ip address, but i don''t know how to prioritize traffic udp over tcp but without limiting the bandwith using CBQ. Thanks A.A.A.A.B.
Wingtung.Leung
2001-Jun-28 19:17 UTC
Re: Priotizing Bandwith but without Shaping the Bandwith
On Thu, 28 Jun 2001, Alexandra Alvarado wrote:> I have Red Hat 7.0 with kernel 2.2.16-22, and it doesn''t support > "mangle" options, how can i do the same "Priotizing udp traffic over tcp > but without Shaping the Bandwith" with ipchains and cbq or only cbq? > > "Marek L. Kozak" wrote: > > > > Try this: > > iptables -t mangle -A PREROUTING -t udp -j TOS --set-tos > > Maximize-Throughput(Please quote correctly, and type your own text *beneath* the quoted text. It makes the message much more readable.) First of all, I don''t think setting TOS field will change behaviour of the network queue, most routers just ignore that field. And even if it is used on the local Linux router, I don''t think Alexandra wanted a high throughput for UDP traffic, but rather a low delay situation. Please try to describe in detail what you mean with "giving priority to UDP traffic over TCP traffic", and what you want to achieve. The HOWTO gives an example for splitting bandwith with unbounded classes, it might be good enough for your situation. Please try it first, and if it is not what you wanted, give the problems with that setup. I''m not sure, but I don''t think ipchains (kernel 2.2) supports setting the TOS field. It doesn''t matter, you don''t really need a firewall marker, you can also redirect the traffic using the general u32 filter. -- GnuPG public key: http://www.keyserver.net fingerprint = A3C4 DE50 712D 4FA8 C564 4D96 5E06 C9CC ECFA 19C5
Wingtung.Leung
2001-Jun-28 20:09 UTC
Re: Priotizing Bandwith but without Shaping the Bandwith
On Thu, 28 Jun 2001, Alexandra Alvarado wrote:> Well, as i say before, a i need that all traffic udp has priority over > tcp traffic, because i have to improve the voice quility over internet, > well now i''m upgrading to Red Hat 7.1 (kernel 2.4) to use TOS field, but > my question is if this sentence: > > iptables -t mangle -A PREROUTING -p udp -j TOS --set-tos > Maximize-Throughput > > works or not, and how can i verify it?I''m not sure, but I *think* this does *not* work.> Until know i use CBQ, but with cbq i only asign specific bandwith to my > clients using ip address, but i don''t know how to prioritize traffic udp > over tcp but without limiting the bandwith using CBQ.A simple solution: attach 2 unbounded (!) classes to your interface, both with a rather low transfer rate like 20kbit/s and give one a high priority and the other one low priority. There is a priority parameter when you create a class. Now find a method to redirect both UDP and TCP traffic to the correct class. An easy and lazy way is to mark the packets with iptables in the mangle table. For example, mark UDP packets with 1 and TCP packets with 2. Look at the iptables manpage for info about using it. Use tc and install the fw filters which redirect the marked packets into the correct classes. Redirect the packets marked with 1 to the low hi prio class, and marked with 2 to the low prio class. That should to it. The low transfer rate is the minimum garantued rate for that class, all bandwidth which is not allocated to a class, will be delivered to the class with the highest priority. I described a similar setup a few weeks/months ago, maybe reading the archives gives you more hints. Succes. (Good that you type beneath the quote, the second step is cut irrelevant parts from the quoted text. Signatures for example. And this small note too. :-) -- GnuPG public key: http://www.keyserver.net fingerprint = A3C4 DE50 712D 4FA8 C564 4D96 5E06 C9CC ECFA 19C5