From mboxrd@z Thu Jan 1 00:00:00 1970 From: Leonardo Balliache Date: Sun, 20 Jul 2003 15:19:54 +0000 Subject: Re: [LARTC] OUTPUT chain marking after or before routing? 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 Hi, At 08:04 a.m. 18/07/03 +0300, you wrote: >----- Original Message ----- >From: "Martin A. Brown" >To: "Chijioke Kalu" >Cc: ; >Sent: Thursday, July 17, 2003 6:55 PM >Subject: Re: [LARTC] OUTPUT chain marking after or before routing? > > > > Catalin, > > > > >When I try to connect to a smtp port somewhere in the Internet, tcpdump >show > > >me that these packets go to the eth2 interface (the main table default > > >route). I don't know where is my mistake but it seems that the marking= in > > >the OUTPUT chain occurs AFTER and not BEFORE routing. Is this a correct > > >behaviour? How can I solve my problem? Please help! > > > > According to my reading of the KPTD (and my understanding), packets > > generated on the local machine have already been routed by the time the > > OUTPUT chain is traversed. See: > > > > http://www.docum.org/stef.coene/qos/kptd/ > > > >I'm very confused now. Look what is written in the iptables man page: > >############# > mangle This table is used for specialized packet alteration. It has t= wo >built-in > chains: PREROUTING (for altering incoming packets before >routing) and OUTPUT > (for altering locally-generated packets before routing). >###################### > >So how it is? OUTPUT marks packets AFTER or BEFORE routing? Just before "output routing". OUTPUT is for locally generated packets.=20 These packets are also to be routed (output routing). OUTPUT mangle marks=20 "locally generated" packets just before they are "output routing". Perhaps confussion is because also input routing exists where a decision is= =20 taken: is this packet for this host or it has just to be forwarded? Read=20 Stef=B4s remarks on the diagram: Output routing : the local process selects a source address and a route.=20 This route is attached to the packet and used later. Best regards, Leonardo Balliache Practical QoS http://opalsoft.net/qos _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/