Re: [SOLVED] Re: Why does resolv.conf keep changing?
- Date: Sat, 28 Oct 2017 12:21:29 -0400
- From: Roberto C. Sánchez <roberto@xxxxxxxxxx>
- Subject: Re: [SOLVED] Re: Why does resolv.conf keep changing?
On Sat, Oct 28, 2017 at 09:45:18AM +0000, Bonno Bloksma wrote:
> Hi Roberto,
> I am glad you have things resolved and discovered some things that could be improved.
> I do have one question about your solution.
> You write:
> >> This is clearly evidence that the problem is with dhclient
> >> (isc-dhcp-client in my case). I am taking another look at the
> >> supersede directives in /etc/dhcp/dhclient.conf to make sure that I am
> >> specifying them correctly.
> > OK. I was able to dig into this I resolved the problem by telling dhclient to not request the bits of information that would trigger a change to /etc/resolv.conf.
> So that was one way to resolve the problem.
> But then you write:
> > Another approach which worked equally well was to specify the supersede directive with the values I preferred for domain-name, domain-search, and domain-name-servers.
> And this seems weird as the very first thing you wrote a week ago was:
> >>> The second thing I tried was adding to /etc/dhcp/dhclient.conf:
> >>> supersede domain-name example.com;
> >>> supersede domain-search example.com.;
> >>> supersede domain-name-servers 127.0.0.1;
> >>> This similarly has no lasting effect, which is really surprising to me.
> So does the supersede directive work after all, as it is supposed to do?
> I have been using the prepend directive for years to make sure my own
> dns servers got listed before the ISP one. That way if my internal dns
> server would ever fail I would have a fallback to the ISP dns server.
> Maybe not perfect but it would leave me with at least some dns
> I now have a fixed ip address on the ISP connection so I can no longer
> test this, which is why I did not respond before when you stated the
> supersede directive did not work.
> But could you clear up whether the supersede still works if properly
> listed in /etc/dhcp/dhclient.conf ?
Yes, the supersede directive works. I believe that the error I had in
my configuration was that the supersede lines were listed after the
request line, but they needed to occur prior to the request line. This
seemed rather unintuitive to me.
Roberto C. Sánchez