From owner-freebsd-net@FreeBSD.ORG Thu Jan 3 13:10:40 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 BAE4916A417 for ; Thu, 3 Jan 2008 13:10:40 +0000 (UTC) (envelope-from bms@FreeBSD.org) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.freebsd.org (Postfix) with ESMTP id 8D4D913C457 for ; Thu, 3 Jan 2008 13:10:40 +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 2202982BC9; Thu, 3 Jan 2008 08:10:40 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Thu, 03 Jan 2008 08:10:40 -0500 X-Sasl-enc: QY2PZh3nrKAD8rrAVV2dxtM6LumlMvS2uuDskgOIgg9t 1199365839 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 76647A9F7; Thu, 3 Jan 2008 08:10:39 -0500 (EST) Message-ID: <477CDECE.9010205@FreeBSD.org> Date: Thu, 03 Jan 2008 13:10:38 +0000 From: "Bruce M. Simpson" User-Agent: Thunderbird 2.0.0.6 (X11/20070928) MIME-Version: 1.0 To: Julian Elischer References: <200712170740.lBH7eYaU068543@repoman.freebsd.org> <4766D6E5.1010503@FreeBSD.org> <4766E54C.30402@elischer.org> <477BBBC7.2020800@FreeBSD.org> <477C1156.9090106@elischer.org> In-Reply-To: <477C1156.9090106@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@FreeBSD.org, "ru@FreeBSD.org >> Ruslan Ermilov" Subject: Outstanding multipath related PR; Floating statics. 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, 03 Jan 2008 13:10:40 -0000 Hi there, I have been cleaning up my PRs. The last PR I have remaining in my queue is directly related to the multipath work you are doing: http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/71474 The problem which caused Thomas to raise the PR, is that of allowing the prefix route for 192.168.1.0/24 to float over to the other interface which *can* reach that prefix. Follow the code in in_rmx.c for in_ifadown() to understand why the problem with downed interfaces happens. Traditionally, BSD has not skipped ifnets which are marked as being down during outbound interface selection. I'm not entirely sure why we should even be looking at downed interfaces for that last part of next-hop selection in the first place. Ruslan (Cc'd) suggests there are cases where this is necessary, I can think of none. The mere fact that the first match may be used fails to take account of the ifnet referenced by rt_ifp being down would clobber correct path selection behaviour for multipath. To be sure, recursive resolution of the next-hop could solve the problem described in the PR, at the expense of introducing unnecessary complexity into the kernel FIB. However, at the end of the PR I suggest a more general approach which could be used to deal with the situation where the destination is *not* covered by interface routes -- floating statics. Both Cisco and Juniper implement floating statics in their FIBs, and they would actually allow folks who unplug their cable and expect to be able to seamlessly fail over to wireless in the most general case, by making 0.0.0.0/0 a floating static. cheers BMS