LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   about resolv.conf (https://www.linuxquestions.org/questions/linux-newbie-8/about-resolv-conf-625413/)

kpachopoulos 03-03-2008 12:19 PM

about resolv.conf
 
Hi,
let's say i have an /etc/resol.conf, that looks like this:
Code:

nameserver ip1
nameserver ip2
...

(case 1) What does this mean? "If you cannot ping nameserver with ip1, resolve the hostnames by using ip2 -given that the DNS server is running?"
or
(case 2) "If you cannot resolve an address by ip1, use ip2?"

If it is the first case, is there a way to achieve the second one? How?


Thanks

Poetics 03-03-2008 12:26 PM

My understanding is that both are correct -- your resolv.conf performs the same duty as a traditional DNS server, it just happens to be located on the local machine. If the file's not empty, it's always running, as it were (in that it can be read).

'man resolv.conf' should help you out, as well as the numerous number of threads about resolv.conf on these forums. Are you seeing any specific problems that would make you think one way or another?

onebuck 03-03-2008 02:26 PM

Hi,
Quote:

Originally Posted by nocturna_gr (Post 3076805)
Hi,
let's say i have an /etc/resol.conf, that looks like this:
Code:

nameserver ip1
nameserver ip2
...

(case 1) What does this mean? "If you cannot ping nameserver with ip1, resolve the hostnames by using ip2 -given that the DNS server is running?"
or
(case 2) "If you cannot resolve an address by ip1, use ip2?"

If it is the first case, is there a way to achieve the second one? How?


Thanks

You should look at the 'man resolv.conf' to get a complete understanding;

Quote:

excerpt from 'man resolv.conf';

RESOLV.CONF(5) Linux Programmer's Manual RESOLV.CONF(5)

NAME
resolv.conf - resolver configuration file

SYNOPSIS
/etc/resolv.conf

DESCRIPTION
The resolver is a set of routines in the C library that provide access
to the Internet Domain Name System (DNS). The resolver configuration
file contains information that is read by the resolver routines the
first time they are invoked by a process.
The file is designed to be
human readable and contains a list of keywords with values that provide
various types of resolver information.

On a normally configured system this file should not be necessary. The
only name server to be queried will be on the local machine; the domain
name is determined from the host name and the domain search path is
constructed from the domain name.
Notice the underlined material.


All times are GMT -5. The time now is 06:16 AM.