Re: /etc/resolv.conf changes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2008-03-24 at 16:09 -0600, Aaron Konstam wrote:
> On Mon, 2008-03-24 at 12:49 -0700, vincenzo romero wrote:
> > Hello all,
> > 
> > I'm getting frustrated attempting to understand; I googled and asked
> > folks and am unable to get a straight answer.
> > 
> > 1.  How is the /etc/resolv.conf file maintained ?  I do not seem to
> > get a consistent result when I save resolv.conf configuration from GUI
> > or by hand using vim /etc/resolv.conf.
> > 
> > a.  Sometimes I the entries toggles between the two entries:
> > 
> > # generated by NetworkManager, do not edit!
> > ; Use a local caching nameserver controlled by NetworkManager
> > nameserver 127.0.0.1
> > 
> > b.  then when I restart the network services some the /etc/resolv.conf
> > file appears like this:
> > # generated by NetworkManager, do not edit!
> > ; Use a local caching nameserver controlled by NetworkManager
> > search lab.mycompany.com
> > nameserver 192.168.17.2
> > 
> > This host is:
> > 
> > - a DNS server that is authoritative for its domain within the
> > 192.168.16/20 network
> > - I believe that even as DNS server, this host should have its
> > resolv.conf file configured to define itself as a DNS server, right?
> > 
> > I apologize for the naive questions, but I am a newbie and am unable
> > to gather a straightforward answer.
> > 
> > thanks in advance.
> You really can't edit /etc/resolv.conf when you are using a DNS server.
> When you are connected to the network it is the DNS nameserver that sets
> up the resolv.conf file. In the first case above:

This isn't quite correct.  

/etc/resolv.conf contains the IP addresses of your DNS servers.

If you connect to your network with a DHCP server, that server provides
your IP address and it *may* provide information about DNS servers,
which your dhcp client will put in /etc/resolv.conf.  It also may not,
or you may decline to use the provided information.  Or you may connect
statically.  In that case, you need to hand-edit /etc/resolv.conf or use
system-config-network to set static DNS servers.

> > # generated by NetworkManager, do not edit!
> > ; Use a local caching nameserver controlled by NetworkManager
> > nameserver 127.0.0.1
> 
> you has not yet made a connection to the internet.

Network manager uses a DHCP client to get your DNS info and places it
in /etc/resolv.conf.  If you decline to use that information, you
probably have installed a caching nameserver.  In that case, its IP
address is 127.0.0.1


> 
> 
-- 
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux