From owner-freebsd-net@FreeBSD.ORG Fri Dec 14 08:15:26 2007 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 80E1A16A417 for ; Fri, 14 Dec 2007 08:15:26 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outJ.internet-mail-service.net (outJ.internet-mail-service.net [216.240.47.233]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4B013C455 for ; Fri, 14 Dec 2007 08:15:26 +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, 14 Dec 2007 00:15:25 -0800 X-Client-Authorized: MaGic Cook1e Received: from julian-mac.elischer.org (home.elischer.org [216.240.48.38]) by idiom.com (Postfix) with ESMTP id E6CDF126CBD for ; Fri, 14 Dec 2007 00:15:24 -0800 (PST) Message-ID: <47623B9A.2050603@elischer.org> Date: Fri, 14 Dec 2007 00:15:22 -0800 From: Julian Elischer User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031) MIME-Version: 1.0 To: FreeBSD Net Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: initial call for review.. initial multi-fib (routing table) 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: Fri, 14 Dec 2007 08:15:26 -0000 This is a call for review for a change that is part of a longer term project. This implements multiple routing tables. Eventually the implementation will be much cleaner but the first implementation is designed to be backported to 6.x and thus must be ABI compatible. It need not be particularly 'clean' as the version in 8.x will be.. First itis needs to be committed to -current in its 6.x form so an MFC can occur, then the cleaner version can be committed over the top of it to clean it up. if you have p4 access you can get the diffs by: p4 diff2 -du //depot/vendor/freebsd/src/sys/...@130844 //depot/user/julian/routing/src/sys/... otherwise you can look at http://www.freebsd.org/~julian/mrt2.diff in addition initial changes to netstat are in: p4 diff2 -du //depot/vendor/freebsd/src/usr.bin/netstat/...@130844 //depot/user/julian/routing/src/usr.bin/netstat/... and the command line tool can be found at: //depot/user/julian/routing/src/usr.sbin/setfib/... on the web that is: http://perforce.freebsd.org/changeList.cgi?FSPC=%2F%2Fdepot%2Fuser%2Fjulian%2Frouting%2F... using the utility you can do: setfib 1 csh route add ...... (to add routes to fib 1) netstat -rn to see routes in fib1 ping 1.1.1.1 to ping according to fib1 ^D eventually there will be a socket option to allow a single socket to be attached to a fib and rules in ipfw to allow it to annotate a packet to be forwarded according to a particular fib.. pf already has such code, but i do not yet have all the code needed for it to be turned on yet. Note; this is the 'compatible' version destined for 6.x and teh final one for -current will have a lot of stuff cleaned up. That doesn't mean there is nothing more to clean up here of course.. I've had this running (a couple of edits ago) so it isn;t too wrong. currently due to ABI issues (for 6.x) the number of tables is set at compile time. (currently 2) but that will change.