How to get the systemd resolver to resolve local (i.e. unqalified) names?

Tom H tomh0665 at gmail.com
Sun Jun 4 08:53:30 UTC 2017


On Sat, Jun 3, 2017 at 10:54 AM, Chris Green <cl at isbd.net> wrote:
> On Sat, Jun 03, 2017 at 09:48:26AM -0400, Tom H wrote:
>> On Sat, Jun 3, 2017 at 9:30 AM, Chris Green <cl at isbd.net> wrote:
>>>
>>> Before the systemd-resolved came along my systems resolved local (i.e.
>>> unqualifed) names quite happily, e.g. on my older xubuntu 16.04
>>> systems I can do:-
>>>
>>> There is a local DNS server running on the LAN which provides DHCP and
>>> DNS to all systems. As can be seen from above the older systems (not
>>> using systemd-resolver) seem to send the unqualified name requests to
>>> the DNS system and get the right result. How can I configure
>>> systemd-resolved to do the same thing?
>>
>> # mkdir -p /etc/systemd/resolved.conf.d
>>
>> # vi /etc/systemd/resolved.conf.d/local-server.conf
>> [Resolve]
>> DNS=ip_address_of_local_dns_server other_dns_server_if_needed
>
> It already has these (from DHCP):-
>
>         chris at t470$ systemd-resolve --status
>         Global
>                   DNSSEC NTA: 10.in-addr.arpa
>                               16.172.in-addr.arpa
>                               168.192.in-addr.arpa
>                               17.172.in-addr.arpa
>                               18.172.in-addr.arpa
>                               19.172.in-addr.arpa
>                               20.172.in-addr.arpa
>                               21.172.in-addr.arpa
>                               22.172.in-addr.arpa
>                               23.172.in-addr.arpa
>                               24.172.in-addr.arpa
>                               25.172.in-addr.arpa
>                               26.172.in-addr.arpa
>                               27.172.in-addr.arpa
>                               28.172.in-addr.arpa
>                               29.172.in-addr.arpa
>                               30.172.in-addr.arpa
>                               31.172.in-addr.arpa
>                               corp
>                               d.f.ip6.arpa
>                               home
>                               internal
>                               intranet
>                               lan
>                               local
>                               private
>                               test
>
>         Link 3 (wlp4s0)
>               Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
>                LLMNR setting: yes
>         MulticastDNS setting: no
>               DNSSEC setting: no
>             DNSSEC supported: no
>                  DNS Servers: 192.168.1.2
>                               8.8.8.8
>                   DNS Domain: zbmc.eu
>
>         Link 2 (enp0s31f6)
>               Current Scopes: none
>                LLMNR setting: yes
>         MulticastDNS setting: no
>               DNSSEC setting: no
>             DNSSEC supported: no
>         chris at t470$
>
> Note that the DNS Domain is set too.  Still doesn't work.

Where is the DNS domain set? In "/etc/systemd/resolved.conf" or in
"/etc/systemd/resolved.conf.d/domain.conf"?

You should set "LLMNR=no" because, IIRC, a "short" name'll be resolved
via llmnr by default.

What does "grep hosts /etc/nsswitch.conf" give?




More information about the ubuntu-users mailing list