Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Dec 2007 00:15:22 -0800
From:      Julian Elischer <julian@elischer.org>
To:        FreeBSD Net <freebsd-net@freebsd.org>
Subject:   initial call for review.. initial multi-fib (routing table) support
Message-ID:  <47623B9A.2050603@elischer.org>

next in thread | raw e-mail | index | archive | help
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.









Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47623B9A.2050603>