From owner-freebsd-questions@FreeBSD.ORG Thu Jul 16 18:00:20 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6733106564A for ; Thu, 16 Jul 2009 18:00:20 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from mailhub.rachie.is-a-geek.net (rachie.is-a-geek.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id 7F10A8FC19 for ; Thu, 16 Jul 2009 18:00:20 +0000 (UTC) (envelope-from mel.flynn+fbsd.questions@mailing.thruhere.net) Received: from smoochies.rachie.is-a-geek.net (mailhub.rachie.is-a-geek.net [192.168.2.11]) by mailhub.rachie.is-a-geek.net (Postfix) with ESMTP id 7A1587E818; Thu, 16 Jul 2009 10:00:19 -0800 (AKDT) From: Mel Flynn To: freebsd-questions@freebsd.org Date: Thu, 16 Jul 2009 10:00:18 -0800 User-Agent: KMail/1.11.4 (FreeBSD/8.0-BETA1; KDE/4.2.4; i386; ; ) References: <4A5F3D48.608@beanfield.com> <4A5F651D.9050205@beanfield.com> <4A5F679F.3000705@gmx.com> In-Reply-To: <4A5F679F.3000705@gmx.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200907161000.18544.mel.flynn+fbsd.questions@mailing.thruhere.net> Cc: Brent Bloxam , Nikos Vassiliadis Subject: Re: FreeBSD & FIBs (setfib) - How to modify? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jul 2009 18:00:21 -0000 On Thursday 16 July 2009 09:47:11 Nikos Vassiliadis wrote: > Brent Bloxam wrote: > > Nikos Vassiliadis wrote: > >> Brent Bloxam wrote: > >>> The documentation on FIBs is pretty slim unless I've been looking in > >>> the wrong places, all I've seen are a few mentions in errata and > >>> release notes. setfib(1) doesn't offer much in the way of associated > >>> commands, and definitely doesn't explain how to actually work with a > >>> FIB. I'm curious if there's a command to specifically modify a FIB > >>> beyond 0, besides something like > >>> > >>> setfib 1 route add ... > >> > >> setfib selects the routing table for locally originated > >> outgoing packets. Besides locally originated packets, there > >> are packets arriving from the network and need to be forwarded. > >> These packets can be classified in a specific routing table > >> with the aid of ipfw. That's all there is. I can't think > >> of something else that needs to be thought with regard to > >> multiple routing tables. > >> > >> HTH, Nikos > > > > Sorry, perhaps I wasn't clear. What I'm interested in is if there's a > > way to deal with *modifying* those other routing tables, besides using > > setfib as I described (e.g., you want to have a different default > > gateway). There would be no reason to have multiple routing tables if > > they're carbon copies of one another. > > setfib has no internal commands. setfib runs the command you tell it > to in a specific routing table. You modify/inspect the routing tables > with the standard tools, that is route, netstat, some dynamic routing > daemon(quagga, etc) and in general everything that's related to the > routing table. > > Just start a shell in FIB 10 and every command forked from > that shell will be bound to FIB 10. > setfib 10 csh > ... do some work > exit > you're back in FIB 0. I guess the main question here is "what is 10?" or what is an FIB?. How does one create such an FIB id (which I can't find in docs either). For example, on my system if I do: % setfib 2 fetch http://www.freebsd.org/docs.html setfib: 2: invalid FIB (max 0) I would expect to see some info in http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-routing.html Naturally there's some info here: http://en.wikipedia.org/wiki/Forwarding_information_base but that doesn't have any practical information on how to create one. -- Mel