On Mon, Jan 19, 2004 at 08:42:41AM +0100, Michael Hollmann wrote: > > i tried to set the default router in /etc/rc.conf: > > defaultrouter="192.168.xxx.xxx" > > but this doesn?t work. why. > > it does only work after following command: route add default 192.168.xxx.xxx > > 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="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
--
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
pgp00000.pgp
Description: PGP signature
