From: Alexander Clouter Date: Tue, 27 Jan 2004 00:39:52 +0000 Subject: Re: [LARTC] IMQ Stability Message-Id: <20040127003952.GF14211@inskipp.digriz.org.uk> MIME-Version: 1 Content-Type: multipart/mixed; boundary="IiVenqGWf+H9Y6IX" List-Id: References: In-Reply-To: To: lartc@vger.kernel.org --IiVenqGWf+H9Y6IX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Jan 26, Michael S. Kazmier wrote: > Hello Alex, >=20 > Perhaps I missed something below which ties eth0 and eth1 to the PPP pipe, > or its just my unfamiliarity with PPP. >=20 sorry I should of made it cleaner. If you read up on Advanced Routing HOWT= O,=20 its hopefully easy to understand. lets say: ------------ alex@inskipp:~$ cat /etc/iproute2/rt_tables=20 # # reserved values # 255 local 254 main 253 default 0 unspec # # local # 1 inr.ruhep # inskipp 32 ppp-upstream 33 ppp-downstream ------------ you then type (something along the lines of): --------- ip route add default dev ppp1 table ppp-upstream ip route add default dev ppp0 table ppp-downstream ip rule add from 10.0.0.0/8 iif eth1 table ppp-upstream ip rule add to 10.0.0.0/8 iif eth0 table ppp-downstream ip route flush cache --------- In summary, this setups linux to do exactly what is in the diagram (below).= =20 The nice thing is after the above is setup you treat it as if its a physica= l=20 interface, its a real ppp session. Any traffic that goes into ppp0 appears= =20 on ppp1 and vice versa; treat it like a fancy wormhole :) The advantage here over the IMQ-ng that is being made, from what I uderstan= d,=20 is here the only patch you need is to bypass connection tracking on the=20 Internet bound traffic from eth1 (for techie reasons), when it 'appears' fr= om=20 ppp1 then the connection tracking should be allowed to continue. This is= =20 where the RAW netfilter patch comes into play. Although you are swapping one kernel patch for another, the RAW one looks= =20 like its going to be around much longer and actually maintained, the other= =20 very important fact is that you can now (if you think about it, I will leav= e=20 it as an exercise for you) use it to simulate those IP-Aliasing interfaces= =20 and actually now shape on that basis per pipe. The clue is true _source_= =20 based routing ;) > Regardless, an interesting methodology. Do you think you could do the > following: >=20 > --------------= =20 >=20 > The reason I ask is that I would like to, at the PPP level, apply CBQ or = HTB > rate shaping to my each end user (ie, limit traffic to 256K or something > like that). And then, after each customer has their rate shaping, at the > ETH level I would like to priorize traffic (ie, all www prio 3, ssh - > telnet, prio 1, ftp prio 4, everything else prio 7) >=20 > Thoughts? >=20 in theory I guess you could setup a linu bridge over the ppp-pipe, however= =20 there is no point (from what I can see) as you are NATing, so the box is th= e=20 default gateway for the other machines, plus more importantly, if you want = a=20 bridge why not just forget about the ppp-pipe and bridge over eth0<->eth1. = =20 This is what my jdg-qos-script[1] from more or less day one. Anyway, feedback would be great on the above idea. Regards Alex [1] http://www.digriz.org.uk/jdg-qos-script/ --=20 _________________=20 / Genius is pain. \ | | \ -- John Lennon / -----------------=20 \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || --IiVenqGWf+H9Y6IX Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFAFbNYNv5Ugh/sRBYRAkiEAJ48TiGkTL1wf6hbnAbtL+zt+7sL1QCcDQH2 TgPAGXiI2XzZ2rkvaLcaTEE= =viSM -----END PGP SIGNATURE----- --IiVenqGWf+H9Y6IX-- _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/