Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Dec 1995 03:13:50 -0500
From:      Benjamin Lewis <blewis@vet.vet.purdue.edu>
To:        questions@freebsd.org
Cc:        nik@blueberry.co.uk (Nik Clayton)
Subject:   Re: resolv.conf and Linux compatability 
Message-ID:  <199512080813.DAA15693@localhost>

next in thread | raw e-mail | index | archive | help
msmith@atrad.adelaide.edu.au said:
> Nik Clayton stands accused of saying:

> > 
> > Anyone know what a Linux /etc/resolv.conf file looks like? I'm playing
> > around with the Linux port of Netscape 2.0b3 on FreeBSD, and it's
> > expecting resolv.conf to be different. This is, of course, making it
> > impossible to use names when referring to web servers.
> 
> There was a post about this a while ago, describing the required format.
> I'd check with the mailing archive on www.freebsd.org; I'm trying to think
> of the name of the resolver they use (becuase that'd make it easier for
> you to find the message), but I can't, sorry.
> 


Looking through my /etc, and sifting through my rapidly deteriorating 
memory, I don't think the problem was with resolv.conf, but with host.conf.

The solution given was basically to erase host.conf (actually, rename it
to host.conf.bsd, which accomplishes the same thing, I think).  

If you're actually interested in the format that Linux uses for host.conf,
I found it in the NET-2 HowTo document at sunsite.unc.edu.  Actually, I've
still got it handy, so I'll put the relevant parts below (any lousy 
formatting is 'cuz I just pasted it from Netscape):

/etc/host.conf

The system has some library functions called the resolver library. This file 
specifies how your system will
lookup host names. It should contain at least the following two lines:

    order hosts,bind
    multi on

These two lines tell the resolve libraries to first check the /etc/hosts file 
and then to ask the nameserver
(if one is present). The multi entry allows you to have multiple IP addresses 
for a given machine name in
/etc/hosts.

This file comes from the implementation of the resolv+ bind library for Linux. 
You can find further
documentation in the resolv+(8) man page if you have it. If you don't, it can 
be obtained from:

sunsite.doc.ic.ac.uk 

    /computing/comms/tcpip/nameserver/resolv+/resolv+2.1.1.tar.Z

This file contains the resolv+.8 man page for the resolver library.




/etc/resolv.conf

This file actually configures the system name resolver and contains two types 
of entries: The addresses of
your nameservers (if any) and the name of your domain, if you have one. If 
you're running your own
nameserver (i.e running named on your Linux machine), then the address of your 
nameserver is
127.0.0.1, the loopback address.

Your domain name is your fully qualified hostname (if you're a registered 
machine on the Internet, for
example), with the hostname component removed. That is, if your full hostname 
is loomer.vpizza.com,
then your domain name is vpizza.com, without the hostname loomer.

For example, if you machine is goober.norelco.com and has a nameserver at the 
address
128.253.154.5, then your /etc/resolv.conf file would look like:

    domain norelco.com
    nameserver 128.253.154.5

You can specify more than one nameserver. Each one must have a nameserver 
entry in the resolv.conf
file.

Remember, if you're running on loopback, you don't need a nameserver.



-- 
Benjamin Lewis (blewis@vet.vet.purdue.edu)





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199512080813.DAA15693>