From owner-freebsd-questions Fri Mar 22 7:47: 5 2002 Delivered-To: freebsd-questions@freebsd.org Received: from uk2.kanda-systems.net (uk2.kanda-systems.net [193.195.117.202]) by hub.freebsd.org (Postfix) with ESMTP id 570E437B417 for ; Fri, 22 Mar 2002 07:47:00 -0800 (PST) Received: from localhost.kanda-systems.net (localhost.kanda-systems.net [127.0.0.1]) by uk2.kanda-systems.net (Postfix) with ESMTP id 819F93C1ED; Fri, 22 Mar 2002 16:45:16 +0000 (GMT) Date: Fri, 22 Mar 2002 16:45:16 +0000 (GMT) From: jason+freebsd@kanda.com X-X-Sender: jason@uk2.kanda-systems.net Reply-To: jason+freebsd@kanda.com To: Joel Dinel Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Basic load balancing with IPFW In-Reply-To: <20020322103518.A39798@sunder.touchtunes.com> Message-ID: <20020322163504.Y28894-100000@uk2.kanda-systems.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 22 Mar 2002, Joel Dinel wrote: > Thank you! Finally, someone who understands what I am trying to do. > > Here's a sanitized IPChains rule from the current firewall : > > $MASQADM portfw -a -P tcp -L $LOCALIP 5556 -R $DEVCON1 5556 -p 1 > $MASQADM portfw -a -P tcp -L $LOCALIP 5557 -R $DEVCON1 5557 -p 1 > #$MASQADM portfw -a -P tcp -L $LOCALIP 5556 -R $DEVCON2 5556 -p 1 > #$MASQADM portfw -a -P tcp -L $LOCALIP 5557 -R $DEVCON2 5557 -p 1 > > The "-p 1" part here is what does the ratio balancing. The 2 servers > (DEVCON1 and DEVCON2) are getting the same ratio of connections. If I > boost the number to 10 for DEVCON1, this machine will be getting 10 > times more connections. It's a very simple and 'serial' load balancing > solution; the first connection goes to DEVCON1, the next one goes to > DEVCON21, and so on and so forth. > > Somebody on this list suggested 'PEN' from the ports collection. That > would work. I was hoping of doing it at the filtering level, to be as > simple as possible. > > IPFilter does Round-Robin'ing and Ratio load balancing, but I was hoping > to stick with IPFW (I know it much better). Ah ha I see, your using NAT. You might want to check out the natd(8) man page. I'm not sure that it has anything similar to the -p feature, although I'm not very familiar with its abilities. I'm sure someone else will be able to advise you. Jason. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message