[systemd-devel] systemd-resolved service ignores UseDNS=false

Lennart Poettering lennart at poettering.net
Thu Apr 9 02:21:53 PDT 2015


On Thu, 09.04.15 11:09, Mikhail Morfikov (mmorfikov at gmail.com) wrote:

> And in the /etc/systemd/resolved.conf file I set DNS=127.0.2.1 only,
> and the two interfaces looks like this:
> # networkctl status -a
> ...
> ● 6: br_lxc
>    Link File: n/a
> Network File: /etc/systemd/network/30-br_lxc-static.network
>         Type: ether
>        State: no-carrier (configured)
>       Driver: bridge
>   HW Address: 6e:7d:a5:7f:d6:06
>          MTU: 1500
>      Address: 192.168.10.100
>               fe80::6c7d:a5ff:fe7f:d606
> 
> ● 7: bond0
>    Link File: n/a
> Network File: /etc/systemd/network/50-bond0-dhcp.network
>         Type: ether
>        State: routable (configured)
>       Driver: bonding
>   HW Address: 3c:4a:92:00:4c:5b (Hewlett-Packard Company)
>          MTU: 1500
>      Address: 192.168.1.150
>               fe80::3e4a:92ff:fe00:4c5b
>      Gateway: 192.168.1.1 (TP-LINK TECHNOLOGIES CO.,LTD)
>       Domain: mhouse.lh
>       
> I'm not sure, but shouldn't there be a DNS field pointing to the local
> 127.0.2.1 address that was set in /etc/systemd/resolved.conf file? It
> looks like the DNS line in the above log shows only if the DNS= option
> is set in a corresponding interface config file.

networkctl only shows data from networkd.

If you configure the DNS server in resolved.conf, that's a file only
resolved reads, and hence is not known to networkd or shown by
networkctl.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list