From owner-freebsd-net@FreeBSD.ORG Thu Feb 21 08:03:00 2008 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 AE2CD16A400 for ; Thu, 21 Feb 2008 08:03:00 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp5-g19.free.fr (smtp5-g19.free.fr [212.27.42.35]) by mx1.freebsd.org (Postfix) with ESMTP id 746FC13C4FD for ; Thu, 21 Feb 2008 08:03:00 +0000 (UTC) (envelope-from tataz@tataz.chchile.org) Received: from smtp5-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp5-g19.free.fr (Postfix) with ESMTP id D26193F614A; Thu, 21 Feb 2008 09:02:58 +0100 (CET) Received: from tatooine.tataz.chchile.org (tataz.chchile.org [82.233.239.98]) by smtp5-g19.free.fr (Postfix) with ESMTP id 853AE3F61AD; Thu, 21 Feb 2008 09:02:58 +0100 (CET) Received: from obiwan.tataz.chchile.org (unknown [192.168.1.25]) by tatooine.tataz.chchile.org (Postfix) with ESMTP id 6F1AA9BF12; Thu, 21 Feb 2008 07:57:51 +0000 (UTC) Received: by obiwan.tataz.chchile.org (Postfix, from userid 1000) id 5BE01405B; Thu, 21 Feb 2008 08:57:51 +0100 (CET) Date: Thu, 21 Feb 2008 08:57:51 +0100 From: Jeremie Le Hen To: "Bruce M. Simpson" Message-ID: <20080221075751.GA28750@obiwan.tataz.chchile.org> References: <20080219221636.GC5164@obiwan.tataz.chchile.org> <47BB7FCB.1090205@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <47BB7FCB.1090205@FreeBSD.org> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: freebsd-net@FreeBSD.org Subject: Re: Two interfaces sharing the same IP address: how to change default route's interface on link change? 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: Thu, 21 Feb 2008 08:03:00 -0000 Hi, On Wed, Feb 20, 2008 at 01:18:03AM +0000, Bruce M. Simpson wrote: > Jeremie Le Hen wrote: > > In summary, favor wired connectivity over the wireless one, at any time: > > could this be at boot time or not. > > > > I'm pretty sure I'm not the only one who wants this kind of setup. So > > how did you achieve this setup? > > The forwarding code needs to be changed to support the notion of a floating > static, regardless. > > Recall that in BSD default routes configured statically, whether manually or > by DHCP, have the RTF_STATIC flg set. > > Currently, the BSD behaviour is NOT to update the rt_ifp for an RTF_STATUC > route when ifadown is called. I believe this to be correct and honours the > original API contract of RTF_STATIC. It is not what you desire in your use > case however. > > Configuring ifstated to manually replumb addresses and routes is probably an > easier place to start. Seamless migration is not possible yet; generally > sockets are tied to the interface where they were implicitly bound, also > nexthop selection happens purely on the basis of destination address. Thank you for your explanation. Even though it is quite clear to me, I think re-architecturing the routing code is out of my knowledge. FWIW, I've just set the the workaround suggested by Niki Denev in the other reply, which uses lagg(4) with the failover protocol, and it works pretty well. Thank you. Best regards, -- Jeremie Le Hen < jeremie at le-hen dot org >< ttz at chchile dot org >