How to get the systemd resolver to resolve local (i.e. unqalified) names?
Yubin Ruan
ablacktshirt at gmail.com
Mon Jun 5 21:09:56 UTC 2017
On Sun, Jun 04, 2017 at 08:54:03PM +0200, Xen wrote:
> Tom H schreef op 04-06-2017 20:03:
> >On Sun, Jun 4, 2017 at 11:02 AM, Chris Green <cl at isbd.net> wrote:
> >>On Sun, Jun 04, 2017 at 04:42:41PM +0200, Xen wrote:
> >>>Chris Green schreef op 04-06-2017 16:22:
> >>>>
> >>>>In practice it doesn't though, my 16.04 systems work OK, 'host xxxx'
> >>>>works where xxxx is an unqualified name.
> >>>
> >>>Because of the search directive.
> >>
> >>Yes, of course, but in 16.04 the search directive is correctly written
> >>into resolv.conf, it doesn't get put there in 17.04.
> >
> >On 16.04, "/etc/resolv.conf" was a symlink to
> >"/run/resolvconf/resolv.conf" and the latter was generated from the
> >"dns-*" values in "/etc/network/interfaces".
>
> In my case ... oh. I probably have NetworkManager removed. I'm not sure. I
> think I have just set it manually? Or DHCP does it for me.
>
> I am pretty sure it might be dhclient doing it?
>
> I have no dns-* values in my /etc/network/interfaces.
>
> Yes I am confident dhclient does it.
>
> >On 17.04, "/etc/resolv.conf" is a symlink to
> >"/run/systemd/resolve/resolv.conf" and the latter is generated by a
> >systemd drop-in that only sets up a "nameverser ..." entry.
>
> You showed this in your mail. It appeared it was a single line on
> ExecPostStart in a systemd unit file.
Ah, a very long and interesting discussion...I am wondering whether there is
any de facto standard for DNS setting under Linux. I ask this because this
afternoon I was trying to figure out the right DNS configuration for one of my
Android phone. I can ping with a IP address, but cannot resolve hosts. Clearly
there are some problems with the DNS, and it is very hard to work that out
because you don't have "apt-get install" in Android ...
It seems that many system use the /etc/network/interfaces and
/etc/network/interfaces.d/ for configuration, while other use only
/etc/resolv.conf ... so it would be very good if we can have a default DNS
setting for Linux.
--
Yubin
More information about the ubuntu-users
mailing list