At 08:04 a.m. 18/07/03 +0300, you wrote:
----- Original Message ----- From: "Martin A. Brown" <mabrown-lartc@xxxxxxxxxxxxxx> To: "Chijioke Kalu" <kchijioke@xxxxxxx> Cc: <catalin@xxxxxxxxxxxxxxxxxxxx>; <lartc@xxxxxxxxxxxxxxx> 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 two 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. These packets are also to be routed (output routing). OUTPUT mangle marks "locally generated" packets just before they are "output routing".
Perhaps confussion is because also input routing exists where a decision is taken: is this packet for this host or it has just to be forwarded? Read Stef´s remarks on the diagram:
Output routing : the local process selects a source address and a route. This route is attached to the packet and used later.
Best regards,
Leonardo Balliache
Practical QoS http://opalsoft.net/qos