From owner-freebsd-current Sun May 2 17: 5:10 1999 Delivered-To: freebsd-current@freebsd.org Received: from hugin.odin-corporation.com (fredriks-2.pr.mcs.net [205.164.50.242]) by hub.freebsd.org (Postfix) with ESMTP id 68E97151CA for ; Sun, 2 May 1999 17:05:05 -0700 (PDT) (envelope-from lars@odin-corporation.com) Received: from odin-corporation.com (localhost [127.0.0.1]) by hugin.odin-corporation.com (8.9.2/8.9.1) with ESMTP id MAA15550; Sun, 2 May 1999 12:44:16 -0500 (CDT) (envelope-from lars@odin-corporation.com) Message-ID: <372C8EF0.DCE3BD49@odin-corporation.com> Date: Sun, 02 May 1999 12:44:16 -0500 From: Lars Fredriksen Organization: Odin Corporation X-Mailer: Mozilla 4.5 [en] (X11; I; FreeBSD 4.0-CURRENT i386) X-Accept-Language: no, en MIME-Version: 1.0 To: Andreas Braukmann Cc: current@FreeBSD.ORG Subject: Re: default route not set up?? References: <372A1AE6.4E2738D4@odin-corporation.com> <372AF60B.E11A6989@newsguy.com> <19990502124500.K6095@paert.tse-online.de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi, There are two things going on with the route setup. if [ "x$defaultrouter" != "xNO" ] ; then static_routes="default ${static_routes}" route_default="default ${defaultrouter}" fi 1) since route_default is never used, it should be deleted, ignore that line above. 2) if you set defaultrouter to anything other than "NO", the static_route variable gets a "default" route route label added, and this label will get evaled later on. So rc.conf should read: (example from my setup) defaultrouter="YES" # Set to default gateway (or NO). static_routes="local" # Set to static route list (or leave empty). route_local=" -net " route_default=" default " So, two actions are needed. The route_default line from rc.network should get deleted, and the comment in rc.conf for the defaultrouter variable should be clearer. If others agree, I can go and commit the fixes for that .... Lars Andreas Braukmann wrote: > Hi, > > On Sat, May 01, 1999 at 03:18:23PM +0200, Dag-Erling Smorgrav wrote: > > "Daniel C. Sobral" writes: > > > Dag-Erling Smorgrav wrote: > > > > # Configure routing > interesting code deleted ... [..] > > > Looking there, it *does* seem that there is a problem. defaultrouter > > > is only used to set route_default, which is *not* used. At least on > > > the code you quoted. > > This is getting fun :) Look closer at the first line I commented, then > > at the loop, and especially the eval. > > since I've stumbled over the same 'what the the hell is going on > here?'-piece of shell script once upon a time, I've foreseen the > further development of this after having read the first two > messages. > I had to set a few static routes, saw the empty 'static_routes' > configuration variable and just didn't grasped "what to do know" > with that variable. > I considered, that there has to be some underlying 'magic' similar > to the method used for the interface configuration. > Despite of this cognition I had to jump head first into the > rc.network script to investigate on 'how to use' the core variable > (static_routes) and the supplementary variables the right way. > > It would be very nice, if 'somebody' (TM) would document the > various 'dark magic' parts of the rc scripts. > > But, ... a person priviledged to setup the routing for > a system (aka system administrator aka 'root') should really be > able to parse 'sh'-code, shouldn't he? > > -Andreas > > -- > : TSE TeleService GmbH : Gsf: Arne Reuter : : > : Hovestrasse 14 : Andreas Braukmann : We do it with : > : D-48351 Everswinkel : HRB: 1430, AG WAF : FreeBSD/SMP : > :--------------------------------------------------------------------: > : Anti-Spam Petition: http://www.politik-digital.de/spam/ : > : PGP-Key: http://www.tse-online.de/~ab/public-key : > : Key fingerprint: 12 13 EF BC 22 DD F4 B6 3C 25 C9 06 DC D3 45 9B : > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-current" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message