From owner-freebsd-net@FreeBSD.ORG Fri May 2 19:47:28 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 39D261065676 for ; Fri, 2 May 2008 19:47:28 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outM.internet-mail-service.net (outm.internet-mail-service.net [216.240.47.236]) by mx1.freebsd.org (Postfix) with ESMTP id 1BC378FC15 for ; Fri, 2 May 2008 19:47:28 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.40) with ESMTP; Fri, 02 May 2008 18:53:03 -0700 Received: from julian-mac.elischer.org (localhost [127.0.0.1]) by idiom.com (Postfix) with ESMTP id 1C59B2D601F; Fri, 2 May 2008 12:47:27 -0700 (PDT) Message-ID: <481B6FCE.2080605@elischer.org> Date: Fri, 02 May 2008 12:47:26 -0700 From: Julian Elischer User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: John Hay References: <20080430172705.2E3275AD6@mail.bitblocks.com> <4818BC79.40605@elischer.org> <20080502090200.GA57055@zibbi.meraka.csir.co.za> <481B5733.7020503@elischer.org> In-Reply-To: <481B5733.7020503@elischer.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD Net Subject: Re: multiple routing tables review patch ready for simple testing. 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, 02 May 2008 19:47:28 -0000 Julian Elischer wrote: > John Hay wrote: >>>> This confuses me.... >>>> >>>> The whole point of a FIB is to decide the *next* hop for a >>>> given input packet. So questions. >>>> 1) A packet arrives on an interface. If this interface is >>>> associated with more than one FIB, which FIB does it get >>>> given to? >>>> >>> which ever one you select, using the policy of your choice. >>> >>> that's what policy routing is about. >>> if you don't WANT policy based routing, dont turn it on. >>> >>> >>> >>>> 2) If that decision is taken by a a packet 'classifier', >>>> isn't it in effect doing the job of a FIB (deciding the >>>> next hop, which happens to be a local FIB)? Recall that >>>> basically a packet passes from a FIB to another FIB until >>>> it gets to its eventual destination. >>> the packet classifier selects a FIB which in turn implements a >>> particular routing decision tree. >>> In the degenerate case where a FIB has only one route >>> then you are correct, but there are technical reasons why this is >>> superior to just using a fwd rule in the firewall. >> >> The linux guys seems to have multiple fibs (or whatever they call them) >> which they can chain together by giving them different priorities. The >> effect seems to be that a packet will be matched through the highest >> priority fib to the lowest until a route match is found en then is used. >> Will something like that be possible? I came across that kind of use >> with the olsr guys. They let olsrd twiddle one of the higher priority >> fibs and then put fallback routes in a lower priority fib. That way >> olsrd can override a route (even the default route) and when olsrd >> exists and deltes all its routes, the original ones are still in the >> lower priority fib and will be used. > > no we are going to do the simple thing.. > such enhancements can be done later if there is a call for it. > > We will just have a number of tables that you can associate a packet > with at a number of points in its path. having another table as the > 'default route' for a table (i.e. if you don't find something look in > another table) is something that would be relatively easy to do, but > I have not done it.hav Having been prodded to go look up OLSR i an say that this is exactly the kind of thing that multiple routing tables are useful for. OLSR is an overlay network and any machine that participated must have a split personality. First it must be able to think in terms of the basic local network, and it must be able to think in terms of the world from the perspective of the overlay. In this case you would set the overlay interfaces to work with FIB 1 so that packets are transported according to rules defined there and the application packets to the internet would be routed according to FIB 0 which would have entries for the overlay interfaces but not necessarily entries for the actual physical interfaces. (for example)