All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Javier Govea" <jgovea@magma.ca>
To: netfilter@lists.netfilter.org
Subject: RE: Round Robin Load Balancing
Date: Thu, 31 Jul 2003 10:48:53 -0400 (EDT)	[thread overview]
Message-ID: <200307311448.h6VEmrpq018899@webmail2.magma.ca> (raw)

Hi guys,

Well I tried to use the "nth" patch in the mangle table in both the FORWARD and PREROUTING
chains and still no success. My browser still cannot surf internet, it just waits and
eventually times out. The rules i tested are below, please correct them if they are wrong.

Any more suggestions??? any other ideas????

Many thanks to all of you guys...
Xavier
PS. I tried th following 3 sets rules:

1. This rule:
iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source <ppp0-ip-addr>
...

together with this one (i tested this rule in both chains FORWARD and PREROUTING):

iptables -t mangle -A FORWARD -m nth --every 4 --packet 0 -p --syn -j ROUTE --oif ppp0
...

2. This rule:
iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source <ppp0-ip-addr>
...

together with this one (i tested this rule in both chains FORWARD and PREROUTING):

iptables -t mangle -A FORWARD -m nth --every 4 --packet 0 -m state --state new  -j ROUTE
--oif ppp0
...

3.And this rule

iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source <ppp0-ip-addr>
...

together with this one (i tested this rule in both chains FORWARD and PREROUTING):

iptables -t mangle -A FORWARD -m nth --every 4 --packet 0 -m state -p tcp --syn --state
new  -j ROUTE --oif ppp0
...



On Jul 29, "George Vieira" <georgev@citadelcomputer.com.au> wrote:
> 
> probably because you should be doing that on the SYN packet ONLY.. not on any packet
because it'll send 1 connection across multiple interfaces...
> 
> Thanks,
> ____________________________________________
> George Vieira
> Systems Manager
> georgev@citadelcomputer.com.au
> 
> Citadel Computer Systems Pty Ltd
> <a href='http://www.citadelcomputer.com.au'>http://www.citadelcomputer.com.au</a>
>  
> 
> -----Original Message-----
> From: Javier Govea [mailto:jgovea@magma.ca]
> Sent: Tuesday, July 29, 2003 7:15 AM
> To: Chris Wilson; Javier Govea
> Cc: Daniel Chemko; George Vieira; netfilter@lists.netfilter.org; Ramin
> Dousti; netfilter@lists.netfilter.org
> Subject: Re: Round Robin Load Balancing
> 
> 
> Hi guys,
> 
> Thanx for all your suggestions, but i have bad news. The rules you guys are suggesting 
> make a lot of sense to me but they don't work. My hosts still cannot surf the net. 
> 
> This rule:
> 
> iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source <ip-of-ppp0>
> 
> is another form for the masquerade rule:
> 
> iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
> 
> Using either of these two rules my hosts can access internet, but i still have the 
> problem of the load balancing. Some ppp links are used more than others in situations 
> such as loading the same web page in four different browsers.
> 
> As soon as i add the "nth" rules to the mangle table my browsers stop working, they just 
> can contact the web servers and eventually they time out. I'm not sure if by adding any 
> rule to my mangle table the browsers stop, but at least they stop when i add your 
> suggestions to the mangle table.
> 
> Any other ideas, suggestions, tips?? all are very welcome...
> Thanx to all, i really appreacite all your time and interest....
> Xavier
> 
> 
> > 
> > Try something like this:
> > 
> > iptables -t mangle -A POSTROUTING -m nth --every 4 --packet 0 \
> > 	-j ROUTE --oif ppp0
> > iptables -t mangle -A POSTROUTING -m nth --every 4 --packet 1 \
> >         -j ROUTE --oif ppp1
> > ...
> > 
> > iptables -t nat -A POSTROUTING -o ppp0 -j SNAT --to-source <ip-of-ppp0>
> > iptables -t nat -A POSTROUTING -o ppp1 -j SNAT --to-source <ip-of-ppp1>
> > ...
> > 
> > Cheers, Chris.
> > -- 
> >    ___ __     _
> >  / __// / ,__(_)_  | Chris Wilson -- UNIX Firewall Lead Developer |
> > / (_ / ,\/ _/ /_ \ | NetServers.co.uk <a 
> href='<a href='http://www.netservers.co.uk&#39;&gt;<a
href='http://www.netservers.co.uk&lt;/a&gt;'>http://www.netservers.co.uk</a></a>'>http://www.netservers.co.uk'><a
href='http://www.netservers.co.uk&lt;/a&gt;'>http://www.netservers.co.uk</a></a></a> |
> > \ _//_/_/_//_/___/ | 21 Signet Court, Cambridge, UK. 01223 576516 |
> > 
> > 
> > 
> 
> 


             reply	other threads:[~2003-07-31 14:48 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-31 14:48 Javier Govea [this message]
2003-07-31 20:02 ` Round Robin Load Balancing Ramin Dousti
  -- strict thread matches above, loose matches on Subject: below --
2003-11-18  8:47 Vivek Kashyap
2003-08-17 16:38 Javier Govea
2003-08-11 11:00 George Vieira
2003-08-10 22:30 George Vieira
2003-08-11  7:25 ` Ramin Dousti
2003-08-10 19:15 Javier Govea
2003-08-10 19:07 Javier Govea
2003-07-29 15:50 Daniel Chemko
2003-07-29 15:38 Javier Govea
2003-07-28 21:14 Javier Govea
2003-07-27 18:46 Daniel Chemko
2003-07-27 17:40 Javier Govea
2003-07-27 18:51 ` Chris Wilson
2003-07-26 18:21 Javier Govea
2003-07-27  0:30 ` Ramin Dousti
2003-07-27  6:49 ` Daniel Chemko
2003-07-26 18:07 Javier Govea
2003-07-24  0:58 Javier Govea
2003-07-24  0:31 Javier Govea
2003-07-24  1:03 ` Ramin Dousti
2003-07-17 22:52 George Vieira
2003-07-17 22:36 Daniel Chemko
2003-07-17 20:29 Javier Govea
2003-07-18  4:57 ` Ramin Dousti
2003-07-15 19:44 Daniel Chemko
2003-07-15 20:54 ` Ramin Dousti
2003-07-15 19:33 Javier Govea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200307311448.h6VEmrpq018899@webmail2.magma.ca \
    --to=jgovea@magma.ca \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.