From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stef Coene Date: Wed, 27 Nov 2002 21:11:32 +0000 Subject: Re: [LARTC] Checking Configuration Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org On Wednesday 27 November 2002 00:10, Dorneles Trem=E9a wrote: > ### Sorry for the long mail... :-( ### > > Hi folks, > > I'm playing with traffic control, trying to improve network > performance, minimizing delay and privileging some hosts, in > a small local ISP, around here. > > This sketch tries to show the network structure: > > +------+ +------+ +---+ > Internet --- |Cisco | ----- |Linux | ----- |HUB| --- LAN > > |Router| eth1|Box |eth0 +---+ > > +------+ +------+ > > Cisco is connected to Internet at 256Kbp/s and LAN runs at > 100Mbp/s. Servers in LAN uses public address. Linux box > just do traffic control and packet filtering. > > Main problem is a LAN mail server, which generates a lot > of traffic (SMTP in & out, POP out), causing long delays > in web and ssh connections... > > So, I write a little script (attached) to try to solve this > issues. > > After reading lartc.org docs again, I see that I have made > a grave mistake: filter incoming and outcoming traffic in > the same interface (I still have to fix this...). > > Furthermore, script last line gives me an error: 'Unknown > filter "flowid", hence option "1:5" is unparsable'. > > --- > Q1: How can I solve this parser error? > $FILTER flowid 1:5 You have to match something. Try this : $FILTER u32 match ip src 0/0 flowid 1:5 > Q2: Can someone point me a example to filter in/out at the > same interface? I accecpt RTFMs (with links)... :-) > Q3: Just to confirm: is internal interface (etho) the right > place to control traffic? You can only shape outgoing traffic with htb or cbq (or you have to use the= =20 imq device). But why not shaping on eth0 _and_ eth1? Shaping on eth0 is f= or=20 the traffic that goes to the LAN. Shaping on eth1 is done for the traffic = that goes to the internet. You have a dedicated shaping box this can=20 perfectly be done. And it's the best solution. Shaping incoming traffic can be done, but why if you can shape on both=20 interfaces ?? > Q4: These values at 'avgidle' and 'undertime' make sense? I think so. They are used for internal cbq calculations and I have no idea= =20 what happens if you change them. > Q5: There is a better way to improve performance? Yes. You add all the class directly to the qdisc and you use the wrong=20 bandwidth parameter. Bandwidth parameter =3D NIC bandwidth, so 10mbit or=20 100mbit. To share the same bandwidth, you have to add 1 bounded class to t= he=20 qdisc with rate =3D link bandwidth. All the other classes are attached to = this=20 class (each bandwidth =3D NIC bandwidth). > Q6: Is it necessary to attach qdiscs to each final class? No, but the default qdisc is a simple one. Don't forget that each class ha= s=20 always 1 qdisc attached to it, even if you don't add one. > There is some kind of advantage in this? If you add a sfq qdisc, data streams within 1 class will get better balance= d. > Thanks in advance and sorry my poor English... Mine is not better :) Stef --=20 stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/