Local network hosts not resolved since Mint 19
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Local network hosts not resolved since Mint 19
I have a local network of (currently) six computers. One is running dnsmasq in Ubuntu Server 16.04 to provide static addresses and host names for the network client computers. Client computers running Linux Mint 18.3 XFCE resolve local host names perfectly without any manual configuration required.
I performed a clean install of Linux Mint 19 XFCE on one client. It gets the correct static IP address, but it is unable to resolve any other local client host names. For example, the server's host name is 'emachine', aka 192.168.0.10. In Mint 18.3 'ping emachine' works as expected. In Mint 19, however, the response is 'ping: emachine: Name or service not known'.
If I run 'dig @192.168.0.10 emachine', the correct address is returned. This also works for any other client on the network.
If I insert '192.168.0.10 emachine' into '/etc/hosts' the name resolution works, but I would prefer not to have to edit the 'etc/hosts' file on every computer each time the network changes.
From what I have read this seems to be an issue with Ubuntu 18.04 using systemd for name resolution. Unfortunately I have not found any simple solutions to fix this problem.
Is there any way to make Linux Mint 19 work with my dnsmasq server as easily as it did in Linux Mint 18.3 and previous versions?
I performed a clean install of Linux Mint 19 XFCE on one client. It gets the correct static IP address, but it is unable to resolve any other local client host names. For example, the server's host name is 'emachine', aka 192.168.0.10. In Mint 18.3 'ping emachine' works as expected. In Mint 19, however, the response is 'ping: emachine: Name or service not known'.
If I run 'dig @192.168.0.10 emachine', the correct address is returned. This also works for any other client on the network.
If I insert '192.168.0.10 emachine' into '/etc/hosts' the name resolution works, but I would prefer not to have to edit the 'etc/hosts' file on every computer each time the network changes.
From what I have read this seems to be an issue with Ubuntu 18.04 using systemd for name resolution. Unfortunately I have not found any simple solutions to fix this problem.
Is there any way to make Linux Mint 19 work with my dnsmasq server as easily as it did in Linux Mint 18.3 and previous versions?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Local network hosts not resolved since Mint 19
Ok, it seems that systemd-resolved creates two files each with different nameserver info, /run/systemd/resolve/stub-resolv.conf and /run/systemd/resolve/resolv.conf, the contents of which are as follows:
/run/systemd/resolve/stub-resolv.conf lists a nameserver 127.0.0.53. Why? No idea. It's obviously wrong for my network.
/run/systemd/resolve/resolv.conf contains the correct nameserver address, presumably obtained from my dnsmasq server.
The problem seems to be that systemd-resolved creates the file /etc/resolv.conf that is a symlink to /run/systemd/resolve/stub-resolv.conf.
I deleted /etc/resolv.conf and then recreated it as a new symlink pointing to /run/systemd/resolve/resolv.conf. Hey presto, name resolution suddenly works:
Solution summary:
/run/systemd/resolve/stub-resolv.conf lists a nameserver 127.0.0.53. Why? No idea. It's obviously wrong for my network.
Code: Select all
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
search lan
Code: Select all
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 192.168.0.10
nameserver fe80::e2b9:e5ff:feda:a5a8%2
search lan
I deleted /etc/resolv.conf and then recreated it as a new symlink pointing to /run/systemd/resolve/resolv.conf. Hey presto, name resolution suddenly works:
Code: Select all
ping -c 1 emachine
PING emachine (192.168.0.10) 56(84) bytes of data.
64 bytes from emachine (192.168.0.10): icmp_seq=1 ttl=64 time=0.079 ms
--- emachine ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.079/0.079/0.079/0.000 ms
Code: Select all
sudo rm /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
Last edited by Pheeble on Sat Nov 03, 2018 7:21 pm, edited 1 time in total.
Re: Local network hosts not resolved since Mint 19
127.0.0.53 is used by systemd-resolved; mine shows the same thing. What does
nmcli device show
return?Re: Local network hosts not resolved since Mint 19
Exactly the same whether name resolution is working or not.ajgringo619 wrote: ⤴Sat Nov 03, 2018 2:16 am 127.0.0.53 is used by systemd-resolved; mine shows the same thing. What doesnmcli device show
return?
Before changing the /etc/resolv.conf symlink (name resolution not working):
Code: Select all
ll /etc/resolv.conf
lrwxrwxrwx 1 root root 37 Nov 3 16:32 /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
nmcli device show
GENERAL.DEVICE: enp7s0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 1C:6F:65:93:00:9D
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: Wired connection 1
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 192.168.0.43/24
IP4.GATEWAY: 192.168.0.1
IP4.ROUTE[1]: dst = 0.0.0.0/0, nh = 192.168.0.1, mt = 100
IP4.ROUTE[2]: dst = 192.168.0.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[3]: dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]: 192.168.0.10
IP6.ADDRESS[1]: fdb7:41c3:578b:0:e8a8:2ac9:c32e:6a4e/64
IP6.ADDRESS[2]: fdb7:41c3:578b:0:ae00:4b10:efd5:b2f4/64
IP6.ADDRESS[3]: fe80::c832:3330:12c6:1371/64
IP6.GATEWAY: --
IP6.ROUTE[1]: dst = fdb7:41c3:578b::/48, nh = fe80::e2b9:e5ff:feda:a5a8, mt = 100
IP6.ROUTE[2]: dst = fdb7:41c3:578b::/64, nh = ::, mt = 100
IP6.ROUTE[3]: dst = ff00::/8, nh = ::, mt = 256, table=255
IP6.ROUTE[4]: dst = fe80::/64, nh = ::, mt = 256
IP6.ROUTE[5]: dst = fe80::/64, nh = ::, mt = 100
IP6.DNS[1]: fe80::e2b9:e5ff:feda:a5a8
GENERAL.DEVICE: lo
GENERAL.TYPE: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
IP4.ADDRESS[1]: 127.0.0.1/8
IP4.GATEWAY: --
IP6.ADDRESS[1]: ::1/128
IP6.GATEWAY: --
ping -c 1 emachine
ping: emachine: Name or service not known
Code: Select all
ll /etc/resolv.conf
lrwxrwxrwx 1 root root 32 Nov 3 16:37 /etc/resolv.conf -> /run/systemd/resolve/resolv.conf
nmcli device show
GENERAL.DEVICE: enp7s0
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 1C:6F:65:93:00:9D
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: Wired connection 1
GENERAL.CON-PATH: /org/freedesktop/NetworkManager/ActiveConnection/1
WIRED-PROPERTIES.CARRIER: on
IP4.ADDRESS[1]: 192.168.0.43/24
IP4.GATEWAY: 192.168.0.1
IP4.ROUTE[1]: dst = 0.0.0.0/0, nh = 192.168.0.1, mt = 100
IP4.ROUTE[2]: dst = 192.168.0.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[3]: dst = 169.254.0.0/16, nh = 0.0.0.0, mt = 1000
IP4.DNS[1]: 192.168.0.10
IP6.ADDRESS[1]: fdb7:41c3:578b:0:e8a8:2ac9:c32e:6a4e/64
IP6.ADDRESS[2]: fdb7:41c3:578b:0:ae00:4b10:efd5:b2f4/64
IP6.ADDRESS[3]: fe80::c832:3330:12c6:1371/64
IP6.GATEWAY: --
IP6.ROUTE[1]: dst = fdb7:41c3:578b::/48, nh = fe80::e2b9:e5ff:feda:a5a8, mt = 100
IP6.ROUTE[2]: dst = fdb7:41c3:578b::/64, nh = ::, mt = 100
IP6.ROUTE[3]: dst = ff00::/8, nh = ::, mt = 256, table=255
IP6.ROUTE[4]: dst = fe80::/64, nh = ::, mt = 256
IP6.ROUTE[5]: dst = fe80::/64, nh = ::, mt = 100
IP6.DNS[1]: fe80::e2b9:e5ff:feda:a5a8
GENERAL.DEVICE: lo
GENERAL.TYPE: loopback
GENERAL.HWADDR: 00:00:00:00:00:00
GENERAL.MTU: 65536
GENERAL.STATE: 10 (unmanaged)
GENERAL.CONNECTION: --
GENERAL.CON-PATH: --
IP4.ADDRESS[1]: 127.0.0.1/8
IP4.GATEWAY: --
IP6.ADDRESS[1]: ::1/128
IP6.GATEWAY: --
ping -c 1 emachine
PING emachine (192.168.0.10) 56(84) bytes of data.
64 bytes from emachine (192.168.0.10): icmp_seq=1 ttl=64 time=0.167 ms
--- emachine ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.167/0.167/0.167/0.000 ms
Re: Local network hosts not resolved since Mint 19
I believe that systemd-resolved will change the link to /etc/resolv.conf on the next restart. If you're going to use Network Manager, you need to make the DNS changes there.
Re: Local network hosts not resolved since Mint 19
I've restarted the computer several times since changing /etc/resolv.conf to point to /etc/systemd/resolve/resolv.conf, and the change has persisted.ajgringo619 wrote: ⤴Sat Nov 03, 2018 11:55 am I believe that systemd-resolved will change the link to /etc/resolv.conf on the next restart. If you're going to use Network Manager, you need to make the DNS changes there.
Also, the DNS in Network Manager has been correct from the beginning, ie. 192.168.0.10. Given that the correct DNS was saved in /run/systemd/resolve/resolv.conf, my guess is that systemd-resolved had the correct DNS address but for some reason it ignored it and continued to use 127.0.0.53 anyway.
Re: Local network hosts not resolved since Mint 19
I have the similar problem with DNS after upgrade from 18.3 to 19 (LM 19 Cinnamon).
I must note that upgrade was problematic. It crashed and I must finish it manually to call dpkg-reconfigure and apt-get upgrade several times..
Now I see that Network manager is ignoring name servers provided by my WIFI Router via DHCP and DNS server is set to 8.8.8.8 (Google).
May be some configuration rests from LM18.3 are causing problems...
/etc/resolv.conf is a link (it is normal):
Content of stub-resolv.conf and resolv.conf:
systemd-resolve status:
NetworkManager debug log when connecting to wifi is attached.
What else I need to check?
How can I set the all DNS related settings to defaults? (what packages I need to reconfigure?)
I must note that upgrade was problematic. It crashed and I must finish it manually to call dpkg-reconfigure and apt-get upgrade several times..
Now I see that Network manager is ignoring name servers provided by my WIFI Router via DHCP and DNS server is set to 8.8.8.8 (Google).
May be some configuration rests from LM18.3 are causing problems...
/etc/resolv.conf is a link (it is normal):
Code: Select all
#ls -l /etc/resolv.conf
lrwxrwxrwx 1 root root 37 nov 5 19:41 /etc/resolv.conf -> /run/systemd/resolve/stub-resolv.conf
Code: Select all
#cat /run/systemd/resolve/stub-resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
#cat /run/systemd/resolve/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients directly to
# all known uplink DNS servers. This file lists all configured search domains.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 8.8.8.8
Code: Select all
root@t470:/home/lucky62# 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 4 (vboxnet0)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
Link 3 (wlp4s0)
Current Scopes: DNS
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
DNS Servers: 8.8.8.8
Link 2 (enp0s31f6)
Current Scopes: none
LLMNR setting: yes
MulticastDNS setting: no
DNSSEC setting: no
DNSSEC supported: no
How can I set the all DNS related settings to defaults? (what packages I need to reconfigure?)
Re: Local network hosts not resolved since Mint 19
@lucky62
Have you tried changing the symlink '/etc/resolv.conf' from '/run/systemd/resolve/stub-resolv.conf' to '/run/systemd/resolve/resolv.conf'?
This worked for me:
Have you tried changing the symlink '/etc/resolv.conf' from '/run/systemd/resolve/stub-resolv.conf' to '/run/systemd/resolve/resolv.conf'?
This worked for me:
Code: Select all
sudo rm /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
Re: Local network hosts not resolved since Mint 19
This is not working, beause /run/systemd/resolve/resolv.conf is refering to the google DNS (8.8.8..
So /etc/resolv.conf is a link to the /run/systemd/resolve/stub-resolv.conf which is refering to the local DNS (127.0.0.53).
Which is ok. What is not ok, is the fact, that systemd (or NetworkManager or whatever else) is ignoring DNS provided by router via DHCP...
So /etc/resolv.conf is a link to the /run/systemd/resolve/stub-resolv.conf which is refering to the local DNS (127.0.0.53).
Which is ok. What is not ok, is the fact, that systemd (or NetworkManager or whatever else) is ignoring DNS provided by router via DHCP...