From owner-freebsd-net@FreeBSD.ORG Fri Jun 23 19:24:21 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 98B5916A4A6 for ; Fri, 23 Jun 2006 19:24:21 +0000 (UTC) (envelope-from ozkan@mersin.edu.tr) Received: from mail.mersin.edu.tr (mail.mersin.edu.tr [193.255.128.3]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0148043D49 for ; Fri, 23 Jun 2006 19:24:20 +0000 (GMT) (envelope-from ozkan@mersin.edu.tr) Received: from localhost (localhost.mersin.edu.tr [127.0.0.1]) by mail.mersin.edu.tr (Postfix) with ESMTP id A3B514526E; Fri, 23 Jun 2006 22:26:08 +0300 (EEST) X-Virus-Scanned: by amavisd-new at mersin.edu.tr Received: from mail.mersin.edu.tr ([127.0.0.1]) by localhost (mail.mersin.edu.tr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id d4Sm3r6rYKbp; Fri, 23 Jun 2006 22:26:06 +0300 (EEST) Received: from [81.213.166.209] (unknown [81.213.166.209]) by mail.mersin.edu.tr (Postfix) with ESMTP id E880045260; Fri, 23 Jun 2006 22:26:05 +0300 (EEST) Message-ID: <449C3FDA.6010802@mersin.edu.tr> Date: Fri, 23 Jun 2006 22:24:10 +0300 From: =?ISO-8859-9?Q?=D6zkan_KIRIK?= User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050927) X-Accept-Language: tr-TR, tr, en-US, en MIME-Version: 1.0 To: Christopher Martin , freebsd-net@freebsd.org References: <52se08$ad99g9@iinet-mail.icp-qv1-irony6.iinet.net.au> In-Reply-To: <52se08$ad99g9@iinet-mail.icp-qv1-irony6.iinet.net.au> Content-Type: text/plain; charset=ISO-8859-9; format=flowed Content-Transfer-Encoding: 8bit Cc: Subject: Re: Multiple routes to the same destination X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jun 2006 19:24:21 -0000 I think policy routing can solve this problem, you can use ipfw's fwd action to route packets. this method doesn't work as round robbin, but it can solve your problem. No routing protocol need. expamle config: first router = 10.0.0.1 second router = 10.0.0.2 ipfw add check-state ipfw add prob 0.5 fwd 10.0.0.1 all from any to not 10.0.0.0/24 keep-state ipfw add fwd 10.0.0.2 all from any to not 10.0.0.0/24 keep-state ... With this solution, if a connection established over first router, the packets belongs to same connection uses first router as gateway. Özkan KIRIK Christopher Martin yazmış: >There is probably some good reason for this, but there is just one thing >that seems very lacking from FreeBSD, and that's the ability to put in >multiple routes in the table the same destination. > >Now, I am sure a lot of people are saying "You idiot, use OSPF/BGP/RIP if >you want fail over!" But that's not what I want! In the case of just about >every other OS today you can put in as many routes as you like, and it will >use any routes to a destination in a round robin, assuming they have >equivalent, preferable metrics. Sort of poor mans load balancing. This also >prevents protocols like OSPF from entering multiple routes to destination >networks even if they have the same cost. > >People have tried to overcome this in the past with ipfw rules: >http://lists.freebsd.org/pipermail/freebsd-questions/2005-July/093285.html > >The best this solution (more of a hack, really) can do is route sessions >back out the same interface they came in. > >Is there a good reason? If there isn't one, how much work will it take to >fix? I have to admit that it frustrates me enough to at least have a crack >at fixing it myself, even though I am no expert 1337 coder. > >Please pardon my ignorance! > >C Martin >_______________________________________________ >freebsd-net@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-net >To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" > > >