From owner-freebsd-net@FreeBSD.ORG Wed Feb 20 01:18:06 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 2074B16A40D for ; Wed, 20 Feb 2008 01:18:06 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id F2B6713C442 for ; Wed, 20 Feb 2008 01:18:05 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 5E9A88FFD0; Tue, 19 Feb 2008 20:18:05 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Tue, 19 Feb 2008 20:18:05 -0500 X-Sasl-enc: jzg+9b0siHwxUwvIlnmyFdog8SykL66ftv6HqqZ4L8w7 1203470285 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTP id BD7DA1526F; Tue, 19 Feb 2008 20:18:04 -0500 (EST) Message-ID: <47BB7FCB.1090205@FreeBSD.org> Date: Wed, 20 Feb 2008 01:18:03 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.9 (X11/20080207) MIME-Version: 1.0 To: Jeremie Le Hen References: <20080219221636.GC5164@obiwan.tataz.chchile.org> In-Reply-To: <20080219221636.GC5164@obiwan.tataz.chchile.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 20 Feb 2008 01:18:06 -0000 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. BMS