From owner-freebsd-ipfw@FreeBSD.ORG Mon Jan 2 06:44:08 2006 Return-Path: X-Original-To: freebsd-ipfw@freebsd.org Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF34E16A41F for ; Mon, 2 Jan 2006 06:44:08 +0000 (GMT) (envelope-from bsd@roamingsolutions.net) Received: from basillia.speedxs.net (basillia.speedxs.net [83.98.255.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6CAF643D48 for ; Mon, 2 Jan 2006 06:44:08 +0000 (GMT) (envelope-from bsd@roamingsolutions.net) Received: from ongers.net (ongers.speedxs.nl [83.98.237.210]) by basillia.speedxs.net (Postfix) with ESMTP id 3ADAC748E; Mon, 2 Jan 2006 07:26:28 +0100 (CET) Received: from (165.146.229.241 [165.146.229.241]) by MailEnable Inbound Mail Agent with ESMTP; Mon, 02 Jan 2006 07:52:36 +0100 Message-ID: <43B8CC58.9020906@roamingsolutions.net> Date: Mon, 02 Jan 2006 08:46:48 +0200 From: G Bryant User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Dennis Olvany References: <43B875FD.6000102@gmail.com> In-Reply-To: <43B875FD.6000102@gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0552-4, 2005/12/30), Outbound message X-Antivirus-Status: Clean Cc: freebsd-ipfw@freebsd.org Subject: Re: route selection and ipfw forwarding X-BeenThere: freebsd-ipfw@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: IPFW Technical Discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Jan 2006 06:44:09 -0000 Dennis Olvany wrote: >Let's say that I wanted to balance upstream traffic across four WAN >links to the same ISP and default gateway using IPFW probabilities. > >Can the FreeBSD routing table contain multiple routes to the same >destination? > >How would a route be selected and could such a selection be influenced >by IPFW? >_______________________________________________ >freebsd-ipfw@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-ipfw >To unsubscribe, send any mail to "freebsd-ipfw-unsubscribe@freebsd.org" > > > > It is possible to do load sharing, but not balancing in the true sense of the word. You need to use ipfw's FWD rule to forward (push) packets to the different gateways of the 4 WAN links, but it get's a bit more complicated from there. You now also need to keep-state on each of the sessions, and will have to check-state of all established outgoing packets to send them out the same WAN link as the rest of that sessions packets. If you are NATting first, then you will have to divert via each of the natd's and then check-state. It's a dirty solution, but I have a working system with 2 WAN links. You can also use IPFW set's to manage the percentage splits betweeen the links. (or for failover). Another solution would be to have a second FreeBSD box at the ISP and use ng_one2many on both sides to distribute the network traffic over the 4 WAN links. Regards, Graham