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

Re: Can't find the DNS Servers



On Wed, Oct 04, 2017 at 08:24:16AM -0400, Greg Wooledge wrote:
On Wed, Oct 04, 2017 at 09:11:37AM +0300, Reco wrote:
Locate /etc/dhcp/dhclient.conf. Replace inside it:

request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, domain-search, host-name
        dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn…

with:

request subnet-mask, broadcast-address, time-offset, routers,
        domain-name,
        dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn…

See, this is exactly what works for me on one network but NOT on another.
It may work great for the OP of this thread.  It may not.

Yes, that change only causes the dhcp client to stop asking for a name server--it does not stop the dhcp server from sending a name server, or the client from parsing what the server sends.

If you are not using resolvconf, a reliable way to stop the isc dhcp client from updating resolv.conf is to create /etc/dhcp/dhclient-enter-hooks.d/xlocal-nodnsupdate containing

#!/bin/sh
make_resolv_conf(){ :; }

This overrides the default function. Make sure that file is executable (chmod +x /etc/dhcp/dhclient-enter-hooks.d/xlocal-nodnsupdate)

If you are using resolvconf there are other approaches. You might try looking at /etc/resolvconf/interface-order (man interface-order) and possibly adding something like @enp*([^.]).inet early in the list.

Mike Stone


Reply to: