From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Barry A Rich" Subject: RE: UDP stream load balancing across multiple uplinks Date: Mon, 4 Aug 2008 09:57:14 -0400 Message-ID: <000301c8f63a$00215660$00640320$@com> References: <000501c8edf5$19903230$4cb09690$@com> <000001c8ee61$67e4b7a0$37ae26e0$@com> <4889ECB9.3090206@riverviewtech.net> <000801c8f0b6$7a804580$6f80d080$@com> <1217834772.4178.7.camel@casper.meteor.dp.ua> Reply-To: Mime-Version: 1.0 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1217834772.4178.7.camel@casper.meteor.dp.ua> Content-Language: en-us Sender: netfilter-owner@vger.kernel.org List-ID: Content-Type: text/plain; charset="koi8-r" To: 'Mail List - Netfilter' Cc: casper@meteor.dp.ua > -----Original Message----- > From: netfilter-owner@vger.kernel.org [mailto:netfilter-owner@vger.kernel.org] > On Behalf Of ??????????? ?????? > Sent: Monday, August 04, 2008 3:26 AM > To: barich@trisectrix.com > Cc: 'Mail List - Netfilter' > Subject: RE: UDP stream load balancing across multiple uplinks >=20 > =F7 =F0=CE=C4, 28/07/2008 =D7 09:33 -0400, Barry A Rich =D0=C9=DB=C5=D4= : > > > -----Original Message----- > > > From: netfilter-owner@vger.kernel.org > > > [mailto:netfilter-owner@vger.kernel.org] > > > On Behalf Of Grant Taylor > > > Sent: Friday, July 25, 2008 11:10 AM > > > > > > Given that the source IP of your packets can change mid stream, y= ou > > > could use the "nth" match extension. Using "nth" you would match > > > packets to decide how to mark them and then use the mark to deter= mine > > > what routing table to use which would ultimately decide which out= bound > > > path to use. > > > > The following setup does load balancing across the uplinks. However= , the > > source address in the outgoing packets is not being SNAT'ed. Any > > suggestions? >=20 > Only first packet of udp "connection" is reaching the rule in the nat > table and does the job, since nat occurs for all packets in this > connection rest of rules would not match. I understand better. I removed the following rule: #iptables -t raw -A PREROUTING -i eth0 -p udp --sport $SPORT -j NOTRACK The connection is tracked and the outgoing UDP packets are SNAT-ed. How= ever, the source address for all UDP packets is the IP address of the uplink assigned to the connection (regardless of the uplink they actually are sent). Is there a way to SNAT without connection tracking?