From owner-freebsd-questions Fri Sep 22 14:12:49 2000 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (zoom3-028.telepath.com [216.14.3.28]) by hub.freebsd.org (Postfix) with SMTP id 9320C37B43C for ; Fri, 22 Sep 2000 14:12:45 -0700 (PDT) Received: (qmail 88743 invoked by uid 100); 22 Sep 2000 21:12:09 -0000 From: Mike Meyer MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14795.52008.992810.925224@guru.mired.org> Date: Fri, 22 Sep 2000 16:12:08 -0500 (CDT) To: "Deegan, Eddy" Cc: questions@freebsd.org Subject: Re: Static_routes in rc.conf In-Reply-To: <117276066@toto.iv> X-Mailer: VM 6.72 under 21.1 (patch 10) "Capitol Reef" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Deegan, Eddy writes: > I want to use static_routes in rc.conf on release 4 to configure two > predefined entries in the routing table autmatically on bootup. I tried > various combinations of "destination gateway" strings but it's not seeming > to work. Cutting and pasting the code out of rc.network reveals the eval > statement therein which, fankly seems bizarre. I can't make head nor tail of > what it's supposed to be doing. > > I cam completely unable to find any useful documentation on this feature on > the freeBSD site, only oblique references to it being a feature for routers > and multihomed machines (mine is neither but I want to configure a static > route to an IP behind a firewall). > > What I actually want to achieve is to have the system set an equivalent to > "route add 128.98.200.22 193.128.139.225" on bootup. Sure I could hack my > own entry into rc.network but I want to use the standard mechanism. I just > can't figure it out. You need to set "static_routes" in /etc/rc.conf. Basically, you add (replacing both occurences of 'local' with whatever name you want to use): static_routes="local" route_local="128.98.200.22 193.128.139.225" See /etc/defaults/rc.conf and /etc/rc.network for details.