Subject: Re: Setup up of named, hosts, myname, hostname
To: Jorge Ivan Rodriguez <yod@uclink4.berkeley.edu>
From: Colin Wood <ender@is.rice.edu>
List: port-mac68k
Date: 03/07/1996 17:30:08
> I am new to unix and bsd.  I have a couple of books on it and have managed
> to get netbsd up and running.  I installed the recently talked about ppp
> setup and my machine connects to my internet site (according to the lights
> on my modem), but returns "hosts unknown" whenever I try to connect to an
> outside machine via ftp, finger etc.
> 
> I suspect it is because I have not properly set up the named, hosts,
> myname, and/or hostname.
> 
> How do I do this?

First, just edit /etc/myname to be whatever you want your hostname to be, 
here's mine:

mycroft-holmes

Does your internet service provider do DNS for you?  If so, then you need 
to know the IP address of the DNS server.  If not, you need to next 
setup /etc/hosts (well, you should set it up anyway, just as a fall 
back).  Here is part of my hosts file:

#
# Host Database
# This file should contain the addresses and aliases
# for local hosts that share this file.
# It is used only for "ifconfig" and other operations
# before the nameserver is started.
#
#
# Internal loopback address
#
127.0.0.1       localhost loopback
#
# This machine, mycroft-holmes.brown.rice.edu
#
128.42.154.39   mycroft-holmes.brown.rice.edu mycroft-holmes mycroft mh mike
#
# Rice Domain Server and terminal servers
#
128.42.5.4      moe.rice.edu moe rice.edu rice domain.rice.edu domain
128.42.5.60     charon.rice.edu charon


Note that I have a static IP address.  If yours is dynamic, you might 
want to put your own hostname on the 127.0.0.1 line.

You probably need to know the IP address of the terminal server you'll be 
using as a gateway to the rest of the net.  Put this into /etc/mygate.  
Here's mine:

128.42.154.254

If your service provider does provide DNS, then you need to setup 
/etc/resolv.conf.  Here is mine:

search brown.rice.edu owlnet.rice.edu is.rice.edu 
nameserver 128.42.5.4
nameserver 128.42.42.24
nameserver 128.42.1.30


Do a "man 5 resolv.conf" to see what each keyword means.


The above should be enought to get you started.  Any more questions, just 
ask (it's quite possible I've forgotten something, since it's been 
several months since I set that up).

Later.

-- 
Colin Wood                                      ender@is.rice.edu
Consultant                                        Rice University
Information Technology Services                       Houston, TX