Subject: Re: thanks and network
To: =?X-UNKNOWN?Q?yuksel_em=FDnoglu?= <yuksele_80@hotmail.com>
From: Jon Lindgren <jlindgren@slk.com>
List: netbsd-help
Date: 07/31/2001 07:49:13
On Tue, 31 Jul 2001, yuksel em=FDnoglu wrote:
> Hello ;
> Thanks everybody , a few secconds ago I installed my first pakage (bash) =
it=20
> was such easy.
> My question is that with linux I used "netconfig" command to configure=
=20
> network.(IP adress ,gateway,DNS) is there anny command like that in netbs=
d.I=20
> read something about ifconfig and route but how can I ad primary name ser=
ver=20
> or dns ??
> Can somebody help me ??
In 1.5.1, there is no such command (to my knowledge). I believe future
releases may have such a tool (sushi), but I'm not sure.
To config the network:
You can use the 'ifconfig' command to do it immediately, for ex:
ifconfig le0 inet 192.168.1.1 netmask 255.255.255.0
However, if you want things to last across reboots, use this method (this
assumes your network interface is 'le0' - substitute as necessary):
1) create a file called /etc/ifconfig.le0 - put the argument piece of
'ifconfig' in here. For example, if I wanted to use the above 'ifconfig'
example perminantly, the file should contain '192.168.1.1 netmask
255.255.255.0'
2) put the IP of your default router into the file /etc/mygate
Check out /etc/rc.conf and /etc/defaults/rc.conf for more options. Note
that if you want to change any of the options in /etc/defaults/rc.conf,
you should put the modified lines into /etc/rc.conf (for example, if
/etc/defaults/rc.conf has ipfilter=3DNO, and you'd like to enable it, put
ipfilter=3DYES into /etc/rc.conf - it reads /etc/defaults/rc.conf, then
applies changes you've made in /etc/rc.conf - this makes upgrading easy).
DNS:
Edit /etc/resolv.conf - add "nameserver 1.2.3.4" (change IP as
necessary). You may also need to add the "domain my.domain" and "search
my.domain.1 my.domain.2...." as necessary. man resolv.conf should tell
you all about the options; you can get than man page on the web at:
http://www.tac.eu.org/cgi-bin/man-cgi?resolv.conf++NetBSD-1.5.1
Also, see rc.conf(5) - available on the web at:
http://www.tac.eu.org/cgi-bin/man-cgi?rc.conf++NetBSD-1.5.1
Hope this helps,
-
Jon
--------------------------------------------------------------------
"The problem is that it was devised by a bunch of hippie anarchists
who didn't have a strong profit motive." - Unnamed evil person