From: Gustavo Homem Date: Mon, 10 Jul 2006 23:43:40 +0000 Subject: Re: [LARTC] simple TOS based setup vs more complex ones Message-Id: <20060710234340.GF15607@angulosolido.pt> List-Id: References: <20060710112551.GF2177@angulosolido.pt> In-Reply-To: <20060710112551.GF2177@angulosolido.pt> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org Hi Martin, On Mon, Jul 10, 2006 at 03:45:49PM -0500, Martin A. Brown wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Hello Gustavo, >=20 > : After reading section 9 of LARTC it seemed to me that a pure TOS=20 > : based QoS setup with be sufficient for a small newtork.=20 > : Interactive packets could have the highest priority, second=20 > : highest for DNS and small HTTP packets and lowest prio for all=20 > : others. > :=20 > : The advantage is that, the setup would be simply a couple of=20 > : iptables lines, because the default pfifo_fast qdisc already=20 > : implements priorities. >=20 > In your proposed system, is still possible for a flood of DNS=20 > queries to cause queue depths upstream (and queue depths translate=20 > directly to queue backups and delays). Sure, but I am talking about a simple setup that works for small networks. = In such cases there won't be DNS floods, unless someone really wants to gen= erate one. >=20 > : For this case, what is the recommended way to limit the outgoing=20 > : rate to ensure that nothing is queued on the modem? >=20 > The answer depends on what you are trying to do. Consider HTB=20 > and/or HFSC. Although you might find that TBF is sufficient, you=20 > are already talking about ToS, so TBF probably won't cut the=20 > mustard in your situation. >=20 > : Can this be done with pfifo_fast? >=20 > Not really. =20 So the priorities are useless in real world with pfifo_fast, is that it? Th= is is bit surprising, IIUC. This is why I asked. > Although, the actual qdisc proposed is different,=20 > please see this recent exchange [0] about prio qdisc. >=20 > If you are using a work-conserving qdisc (i.e., a qdisc that=20 > performs no shaping), you'll not really be able to guarantee=20 > anything about the quality of traffic from one point to another. =20 > In order to offer some sort of guarantees on any link, your device=20 > must be the bottleneck. This requires shaping or, at least, some=20 > sort of non-work-conserving qdisc. >=20 What I was initially looking for was just TOS marking + plus simple interfa= ce throtlling, i.e, the simplest form of shapping. If it can't be done with= pfifo_fast, my next idea was something like: tc qdisc add dev eth0 root handle 1: htb default 10 tc class add dev eth0 parent 1: classid 1:1 htb rate 7000kbps ceil 7000kbps tc class add dev eth0 parent 1:1 classid 1:10 prio + iptables rules for setting TOS values Is this right? This seems to be similar to what you proposed here: http://mailman.ds9a.nl/pipermail/lartc/2006q2/019138.html For a not so simple approach but which seems to be working well, I have an = adaption of Dan Singletary's script here: http://downloads.angulosolido.pt/QoS/ It uses directly HTB on both directions, for a setup with only 2 network in= terfaces which is very common (no kernel patching is needed). Do you want to comment? Still, I want to test the simplest possible solution and see how far one ca= n go with only a few lines of bash, for both practical and pedagogical purp= oses. I think it's important to have a simple solution that works for typic= al scenarios (2 interfaces, linux router with NAT) on stock kernels. ** Best regards Gustavo ** nothing wrong about patching and compiling kernels, but it brings mainte= nance overhead everytime there is system upgrade for whatever reason --=20 Angulo S=F3lido - Tecnologias de Informa=E7=E3o http://angulosolido.pt > Good luck, >=20 > - -Martin >=20 > [0] http://mailman.ds9a.nl/pipermail/lartc/2006q2/019130.html > http://mailman.ds9a.nl/pipermail/lartc/2006q2/019138.html > http://mailman.ds9a.nl/pipermail/lartc/2006q2/019143.html > http://mailman.ds9a.nl/pipermail/lartc/2006q2/019158.html >=20 > - --=20 > Martin A. Brown > http://linux-ip.net/ > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.2 (GNU/Linux) > Comment: pgf-0.71 (http://linux-ip.net/sw/pine-gpg-filter/) >=20 > iD8DBQFEsryFHEoZD1iZ+YcRAmUAAKDb74IxaBWmCgHA8sd1Sy1SVXS4ZACfYkvD > 5NhD00yJMOG5CeFTTFPPk+s> =3DRmHf > -----END PGP SIGNATURE----- _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc