Subject: Re: Hostname Question
To: Jeff Flowers <jeffrey@jeffreyf.net>
From: Jeremy C. Reed <reed@reedmedia.net>
List: netbsd-help
Date: 12/12/2002 10:46:46
On Thu, 12 Dec 2002, Jeff Flowers wrote:

> When I do my initial setup of NetBSD, I like to set the hostname by
> creating the /etc/myname file. Is there any benefit to setting it in
> /etc/hosts as well? Or is just the "127.0.0.1 localhost" entry enough?

Some local software may do a reverse lookup. On my system that would fail
quick:

 $ gethost -t yourhostname
 Problem looking up "yourhostname": Unknown host
 gethostbyname2() took 0.218 seconds

And a second time:

 $ gethost -t yourhostname
 Problem looking up "yourhostname": Unknown host
 gethostbyname2() took 0.008 seconds

It is also used by some tools, like ping -- you do a lookup by IP, but it
also shows you the hostname too.

Also, if it does any connections to the outside world using that hostname
then it would be a good idea to have in regular DNS too. (For example,
some mail administrators configure their mail servers to reject sending
mail servers that don't have proper reverse DNS set up.)

   Jeremy C. Reed
   http://bsd.reedmedia.net/