Re: why are there 2 resolv.conf files?

From: Rick (rick_at_none.com)
Date: 07/01/04


Date: Thu, 01 Jul 2004 20:57:40 GMT

On Thu, 01 Jul 2004 20:21:37 +0000, Bill Unruh wrote:

> Clifford Kite <kite@see.signature.id> writes:
>
> ]Rick <rick@none.com> wrote:
>
> ]> On my Fedora Core 1, there are 2 resolv.conf files. One is in /etc/ppp/,
> ]> which will get written to if usepeerdns in in options, and one in /etc,
> ]> which gets written to by dhcp-client script. PPP only seems to read the
> ]> /etc/resolv.conf.
>
> ]The one in /etc/ppp/resolv.conf is written by pppd. It's up to you or
> ]your distribution to do anything else.
>
> The system ONLY uses /etc/resolv.conf to do all of its internet dns lookup.
> That is the only file you need.
>
> pppd puts its msdns stuff into /etc/ppp/resolv.conf, because most people
> would get very upset to have their /etc/resolv.conf messed up by pppd.
> You thus have the info you need in /etc/ppp/resolv.conf if you want to use it.
> If you only ever use ppp to connect to any network, you could make
> /etc/resolv.conf a link to /etc/ppp/resolv.conf.
>
> Or you could put a program into /etc/ppp/ip-up to transfer the info from
> /etc/ppp/resolv.conf to /etc/resolv.conf when ppp comes up, and put another
> into /etc/ppp/ip-down to replace the old resolv.conf when ppp finishes.
> (This can leave things in a bad state if pppd gets killed for some reason--
> by a kill -9 for example)
>
>
>
> ]> Can anyone tell me why this is, or how to get usepeerdns to write to
> ]> /etc/resolv.conf?
>
> ]You can't, pppd only writes to /etc/ppp/resolv.conf.
>
> ]You could script a workaround in /etc/ppp/ip-up, assuming the format
> ]of /etc/ppp/resolv.conf is compatible with /etc/resolv.conf, by mv'ing
> ]/etc/ppp/resolv.conf to /etc/resolv.conf, or otherwise script to modify
> ]/etc/resolv.conf according to what's in the one pppd writes.
>
> ]You might also just sym-link /etc/resolv.conf to /etc/ppp/resolv.conf.
> ]But I don't know whether the format of the second is compatible with
> ]the first - I've never used usepeerdns.
>
> ]You don't need to change /etc/resolv.conf unless you have more than
> ]one ISP. Or if you do, then it should be very, very, very seldom.
>
> AGreed. Ie, the best idea is probably to take the info in
> /etc/ppp/resolv.conf, transfer it to /etc/resolv.conf and forget about it.
> Or just forget about using msdns at all, since you seem to already have a
> dhcp link anyway.

The computer that is having this problem is a latop. I use wifi with it at
home, but I have to dial on the road. I think I am just going to copy the
/etc/ppp/resolv over the /etc/resolv.conf either manually or by script
when I use ppp. The DHCP-client script will overwrite it by itself.

Thanks for the help, all.

-- 
Rick


Relevant Pages

  • Re: why are there 2 resolv.conf files?
    ... >]your distribution to do anything else. ... > If you only ever use ppp to connect to any network, ... I use wifi with it at ... The DHCP-client script will overwrite it by itself. ...
    (linux.redhat.misc)
  • Re: Statistical Anomaly Analysis?
    ... > traffics or the total amounts of network traffics. ... > the recent short term distribution should be close to the long term ... of anomaly detection is typically vulnerable to data set poisoning. ...
    (Focus-IDS)
  • NHL Network to grow with U-Verse deal
    ... NHL Network is about to announce a distribution deal with AT&T’s U- ... Part of the discussions are centering on a revamped programming lineup ...
    (rec.sport.hockey)
  • Re: Classic FM tests
    ... New enhanced distribution network for Classic FM ... NTL Broadcast has delivered a comprehensive new programme distribution ... This relationship was upgraded to a fully managed transmission service ...
    (uk.tech.broadcast)
  • Re: 400 remote sites connected via DSL
    ... The network admin wasn't monitoring the same network. ... distribution point server share. ... If the SMS server is getting hit by all the clients at once, ...
    (microsoft.public.sms.swdist)