From: "lartc@manchotnetworks.net" Date: Sat, 04 Sep 2004 14:41:50 +0000 Subject: RE: [LARTC] traffic queueing and ipsec vpn Message-Id: <1094308909.4058.1.camel@drs0> List-Id: References: <20040903181240.B86F74008@outpost.ds9a.nl> In-Reply-To: <20040903181240.B86F74008@outpost.ds9a.nl> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org hi alexis, please do -- i'd like to see just how far off i am :-) i've been just playing arounfd with racoon instead of freeswan -- totally different animal ... cheers charles On Sat, 2004-09-04 at 16:39, Alexis wrote: > Thanks again, this is _really_ enough info, ill do a lab and test this, I > think this is the best way to realize how this work. >=20 > Best regards. >=20 > =20 >=20 > -----Mensaje original----- > De: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl] En > nombre de lartc@manchotnetworks.net > Enviado el: S=E1bado, 04 de Septiembre de 2004 5:15 > Para: LARTC list > Asunto: RE: [LARTC] traffic queueing and ipsec vpn >=20 > hi alexis, >=20 > its been a while since i did this modification to the kptd. >=20 > the diagram assumes that this a linux box doing a vpn tunnel(s). lets ass= ume > that eth0 is facing the lan and eth1 is facing the internet and that eth1 > has one or more ipsec interfaces. >=20 > a packet from the lan comes in on eth0 and is destined to lan via an ipsec > tunnel. i *believe* that before the routing decision is made, the ipsec > process changes the interface to the appropriate ipsecX interface name.=20 >=20 > the packet, as it is not destined for this local machine, pass thru FORWA= RD, > POSTROUTING, and then EGRESS. ipsec encrypts the packet and the new esp > packet is repassed thru POSTROUTING and EGRESS and is dequeued to the > hardware. >=20 > if i am not mistaken, meta data from the unencrypted packet is preserved, > that is, that you may mark the packet in POSTROUTING and then use that ma= rk > to make an QOS EGRESS decision on the ESP packet. i'll have to check this > again, but i don't have a bunch of time at the moment. >=20 > now, assume an esp packet arrives on eth1 addressed to this box because it > is at the end of the tunnel. the esp packet passes PREROUTING, INGRESS, a= nd > passes INPUT as it addressed for this machine. after INPUT, ipsec decrypts > the packet and it is passed thru PREROUTING, INGRESS, FORWARD (as it is > destined now for a machine on the lan), POSTROUTING, EGRESS and dequeued = to > the hardware. >=20 > cheers >=20 > chalres >=20 >=20 > On Fri, 2004-09-03 at 22:16, Alexis wrote: > > Thank you very much for the quick answer. > >=20 > > Let me ask you a question about it so I can save time, analyzing this=20 > > ascii I can see after qos ingress and before input routing a statement = > > that says "if dst ip via ipsec put on ipsecX interface" > >=20 > > Ok, this is my basic schema > >=20 > > LAN > |ethX| linuxbox |ethZ| > IPSEC VPN > >=20 > > This means, all the LAN traffic that reaches the linuxbox is forwarded = > > from ethX to ethZ and then via ipsec reaches its destination. > >=20 > >=20 > > As ive never configured an ipsec vpn using linux yet (only used cisco=20 > > and > > nortel) my question is. > >=20 > > "if dst ip via ipsec put on ipsecX interface" < this means that ill=20 > > have an ipsecX interface and I need to set the queues in this=20 > > interface? Or I need to set up my queues on ethZ? > >=20 > > Thanks in advance. > >=20 > > Ps: ill configure ipsec vpn using kernel 2.6 > >=20 > >=20 > >=20 > > -----Mensaje original----- > > De: lartc-admin@mailman.ds9a.nl [mailto:lartc-admin@mailman.ds9a.nl]=20 > > En nombre de lartc@manchotnetworks.net Enviado el: Viernes, 03 de=20 > > Septiembre de 2004 16:32 > > Para: Alexis; LARTC list > > Asunto: Re: [LARTC] traffic queueing and ipsec vpn > >=20 > > hi alexis, > >=20 > > i -- THINK -- that this is how it happens. > >=20 > > cheers > >=20 > > charles > >=20 > >=20 > > On Fri, 2004-09-03 at 20:12, Alexis wrote: > > > Hi all, ive been reading lartc howto, im new about traffic=20 > > > shaping/police. > > > =20 > > > As far as red (chapter 9 complete) i saw that first the packet=20 > > > passes at the ingress qdisc, then it passes to the ip stack if the=20 > > > packet is directed to the box or its forwarded (is my case), then it = > > > falls to the egress classifier/s. > > > =20 > > > Now, i understand if i have an ipsec vpn at the outside interface,=20 > > > the egress classifiers will act before the packet leave the kernel=20 > > > and enter to the vpn tunnel, is this correct? > > > =20 > > > Here's my situation , i have a "headquarter" box that is a database=20 > > > (to call it with a name) and then a lot of branches that send=20 > > > queries to this database and based on the results, the branches send = > > > packets to other branches trough some established IPSEC tunnels. So, = > > > hq is the route database, and the branches send voice traffic to other > branches. > > > =20 > > > Now i have to set traffic shaping and manage the bandwith for=20 > > > senialization and for voice flows (rtp flows). So i need to be shure = > > > that i can classify the packets at the outside interface before them = > > > enters to the vpn tunnel. > > > =20 > > > is this correct? > > > =20 > > > =20 > > > Thanks in advance. > > > =20 > > > =20 > > > -- > > > Alexis >=20 > _______________________________________________ > LARTC mailing list / LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ >=20 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/