From owner-freebsd-questions@FreeBSD.ORG Thu Jul 16 17:47:31 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 611801065673 for ; Thu, 16 Jul 2009 17:47:31 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mail.gmx.com (unknown [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id C24F98FC12 for ; Thu, 16 Jul 2009 17:47:30 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: (qmail invoked by alias); 16 Jul 2009 17:47:29 -0000 Received: from ipa160.22.107.79.tellas.gr (EHLO [169.254.0.10]) [79.107.22.160] by mail.gmx.com (mp-eu004) with SMTP; 16 Jul 2009 19:47:29 +0200 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX18LgtUBBHQLbsVcrmFL3J1JSW41fVpkxt7G7ra2pm c7dgdg0oArwcyC Message-ID: <4A5F679F.3000705@gmx.com> Date: Thu, 16 Jul 2009 20:47:11 +0300 From: Nikos Vassiliadis User-Agent: Thunderbird 2.0.0.22 (Windows/20090605) MIME-Version: 1.0 To: Brent Bloxam References: <4A5F3D48.608@beanfield.com> <4A5F61F6.8040906@gmx.com> <4A5F651D.9050205@beanfield.com> In-Reply-To: <4A5F651D.9050205@beanfield.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 Cc: "freebsd-questions@freebsd.org" 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 17:47:31 -0000 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. HTH, Nikos