Subject: Re: Brasilian Guy in a silly BSD world
To: Bradley R. Smith <brad5903@pobox.com>
From: Jon Lindgren <jlindgren@espus.com>
List: port-mac68k
Date: 07/14/2000 12:00:47
On Fri, 14 Jul 2000, Bradley R. Smith wrote:

[snip]

> ifconfig sn0 inet 192.168.1.1 netmask 255.255.255.0 up
> 
> Replace sn0 with the name of your ethernet interface if it's
> different. It's one of the things that prints at boot.
> Replace 192.168.1.1 with your IP number.
> Replace 255.255.255.0 with the netmask for your network.
> 
> To set the path to the router:
> route add default 192.168.1.254
> 
> Replace 192.168.1.254 with the IP number of your router.
> 
> The /etc/netstart script will do all that for you on boot if
> you configure it right. I've never learned how to configure
> /etc/netstart. I just remove /etc/netstart from /etc/rc and
> put the necessary networking commands in /etc/rc.

Taking your above info as an example, you'd do this to use /etc/netstart:

1) create a file /etc/ifconfig.xxx, where xxx is the name of your ethernet
interface.  Put the "ifconfig" command (minus the interface name) into
this file.  As an example, /etc/ifconfig.sn0 would contain:

inet 192.168.1.1 netmask 255.255.255.0 up

for your example.

2) create a file /etc/defaultrouter, which contains the IP of the default
route.  Again, for your setup, it would contain:

192.168.1.254

3) Make sure /etc/rc.conf has the "auto configure network interfaces" line
set to YES - the netstart script will automatically determine the network
interfaces installed/configured on the machine, and do an
"ifconfig" taking the arguments from /etc/ifconfig.xxx (as described
above).

It works very well for most setups.

I'd expect "man netstart" to give lots of info on this, but I've never
actually tried to pull up netstart's man page... but given the wonderful
consistency with which NetBSD dances, I'd fully expect there to be some
info there.

Hope this helps,

-Jon
 --------------------------------------------------------------------
 "Hey - this old machine screams like a snail on acid!" - (a true
  comment by a fellow who recently installed NetBSD on an old server)