From owner-freebsd-net@FreeBSD.ORG Wed Apr 6 16:13:09 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABEC9106566B for ; Wed, 6 Apr 2011 16:13:09 +0000 (UTC) (envelope-from ndenev@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3C7398FC1A for ; Wed, 6 Apr 2011 16:13:08 +0000 (UTC) Received: by wyf23 with SMTP id 23so1639699wyf.13 for ; Wed, 06 Apr 2011 09:13:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to:x-mailer; bh=w6Q02rU9OJJiP79BxzABOWFTOW6yGP6+qrV0g5vpcLI=; b=ErtmeYBq16m906bZME1rF28efSluPUzFfKD8PH8gAIKhkyUNQ9XQHc6M2zTW3yHn7h kYAGiK7oP3pVviwTAGQWKSMMESlmWcbqFJtw4eFfTr/eLia+ptTJpeiGR5+3PNuH3Zxx VnruWIg+6e31JRb+X1nCCmzVbpPLIBBP/nTbA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer; b=we+MPJLUl32medsqwZUeDi6FO8A/lMpB7u2PINK/VSwk93mJwQEc5vOT7s2MmGcmkP 7uMCqhMOLwovb4bgwyp155gqawyVoG+v0By96RSga5L7UzSDClvkqsoLzxG2g+UUibbX 4DDM16atGGX2Gs+wBxi94gjSu2OVW7efkUe/Q= Received: by 10.216.140.92 with SMTP id d70mr1167412wej.105.1302106387974; Wed, 06 Apr 2011 09:13:07 -0700 (PDT) Received: from imba-brutale.totalterror.net (93-152-151-19.ddns.onlinedirect.bg [93.152.151.19]) by mx.google.com with ESMTPS id m73sm370057wej.16.2011.04.06.09.13.05 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 Apr 2011 09:13:06 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Nikolay Denev In-Reply-To: Date: Wed, 6 Apr 2011 19:13:04 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <5A6C513B-E30B-4E32-8556-D6501E8EE59B@gmail.com> References: <1128701301678831@web100.yandex.ru> <20110406120207.GA32062@DataIX.net> To: Michael Proto X-Mailer: Apple Mail (2.1084) Cc: Baginski Darren , freebsd-net@freebsd.org Subject: Re: Multiple gateways support 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: Wed, 06 Apr 2011 16:13:09 -0000 On Apr 6, 2011, at 5:36 PM, Michael Proto wrote: > On Wed, Apr 6, 2011 at 8:02 AM, J. Hellenthal = wrote: >> On Wed, Apr 06, 2011 at 01:45:54PM +0400, Eir Nym wrote: >>> On 1 April 2011 21:27, Baginski Darren wrote: >>>> Hi! >>>>=20 >>>> Could please someone tell me about current state of multiple gw = capabilities of FreeBSD? >>>> I have dual homed FreeBSD box, one interface ISP1 another ISP2 : >>>> 1) can I balance outgoing traffic across them ? >>>> 2) Is there support of any kind dead gateway detection? >>>> 3) Can I install multiple routes to the same network (with same and = with different wight)? If yes how it behaves with one link failure, in = particular if interface is down? >>>>=20 >>=20 >> =46rom what you said here it seems that your looking for lagg(4) with >> configured with the loadbalance option. Give this man page [1] a >> thorough read and youll probably see what your looking for. >>=20 >> 1) http://www.freebsd.org/cgi/man.cgi?query=3Dlagg >>=20 >>=20 >>>=20 >>> about multiply GWs: you can set multiply gw via setfib(1) utility = and >>> use fib in your firewall rules. But it is not very handy with DHCP = and >>> rc(8) (setfib is located in /usr/bin and can't be used in = /etc/rc.d). >>> Due to this I have to add another FreeBSD box to handle dynamic >>> routes. >>>=20 >>> This is the one thing I know which can I do in linux easily and in >>> freebsd with hacks. >>=20 >> -- >>=20 >> Regards, >>=20 >> J. Hellenthal >> JJH48-ARIN >> 0x89D8547E >>=20 >>=20 >=20 >=20 > I don't think lagg(4) will work here, as its designed for two > interfaces that are attached to the same network (see the example in > the man page). For two different ISPs, I think the setfib approach is > probably the way to go. >=20 >=20 > -Proto >=20 Actually I think the OP is asking about the "options RADIX_MPATH" = feature. 1) Yes, It can balance over the two links but only using Modulo-N Hash = (RFC2991) algorithm, and probably you should setup NAT on both links. 2) AFAIK there is no dead gw detection code yet. 3) Yes you can do that. There were some fixes for handling interfaces = with no-link but I was not able to see it working in my setup. e.g. the = host still tries to send traffic to a interface with no link, = effectively blackholing the traffic (this was tested on a soekris box = with if_vr(4)) IMHO the whole RADIX_MPATH stuff is still in experimental stage and = needs some more work to work correctly. There is a recent thread about some improvements in RADIX_MPATH. Regards, Nikolay