From owner-freebsd-questions@FreeBSD.ORG Sun Jan 18 23:53:15 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52F3116A4CE for ; Sun, 18 Jan 2004 23:53:15 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 29F7143D2F for ; Sun, 18 Jan 2004 23:53:12 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) i0J7r8se008826 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Jan 2004 07:53:08 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i0J7r8uB008825; Mon, 19 Jan 2004 07:53:08 GMT (envelope-from matthew) Date: Mon, 19 Jan 2004 07:53:08 +0000 From: Matthew Seaman To: Michael Hollmann Message-ID: <20040119075308.GC8185@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Michael Hollmann , freebsd-questions@freebsd.org References: <400B8A71.9060100@jawa.at> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="kfjH4zxOES6UT95V" Content-Disposition: inline In-Reply-To: <400B8A71.9060100@jawa.at> User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.61 X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: can?t set default router in rc.conf FreeBSD 5.2 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2004 07:53:15 -0000 --kfjH4zxOES6UT95V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jan 19, 2004 at 08:42:41AM +0100, Michael Hollmann wrote: >=20 > i tried to set the default router in /etc/rc.conf: >=20 > defaultrouter=3D"192.168.xxx.xxx" >=20 > but this doesn?t work. why. >=20 > it does only work after following command: route add default 192.168.xxx.= xxx >=20 > could anybody help me? please The settings you make in /etc/rc.conf are what the system refers to when it reboots, and only when it reboots. The clue is in the name -- all those scripts in /etc called 'rc.something' and the /etc/rc.d directory (if you're running 5.x) are exactly what is run to boot up the system. 'rc.conf' is a configuration file for those scripts. If you delve into the workings of the rc scripts, you will find that setting defaultrouter=3D"192.168.0.1" in rc.conf ultimately results in the command: route add default 192.168.0.1 being run. This command is, as you have observed, what is required to set the default route for the system and you can run it whenever it is necessary, not just at boot time. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --kfjH4zxOES6UT95V Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAC4zkdtESqEQa7a0RAnGDAJwM5xKHMI4vwm+DMyGSPOjvt3jqfwCffbbF HUAIgCkirWm+LWD+96Hi+Uk= =EroS -----END PGP SIGNATURE----- --kfjH4zxOES6UT95V--