Broken DNS

Anyone have DNS issues after recent updates?
Running 15.2 and now can’t seem to get DNS running at all.
/etc/resolv.conf has no entries
Have tried wicked and network manager, DHCP and manual assignment, and have no luck at all.
Pinging anything by IP works fine, but any dns get “name or service not know”

Multi boot machine with Windows/Ubuntu, and they are working fine.

Help!

I use nslookup to troubleshoot DNS issues although you probably identified the main problem if there aren’t DNS entries in /etc/resolv.conf.

When running nslookup, you can test name resolution using any DNS server by running the following command (server followed by the DNS server IP address)

server *DNS)server_ipaddress */CODE]

If your machine is configured as a DHCP client,
You can try re-querying for your DHCP information by restarting your network service

systemctl restart network.service


If the above doesn't work, do the same with another machine if you can to verify the problem might be with your network's DHCP server and not your client machine.
Reboot your machine if necessary although restarting the network service should have been enough.

TSU

Try:

netconfig update -f

as root.

Hi,
Thanks for the replies.
nslookup cannot find ANY servers by DNS
Ping works fine for ip address (including DNS servers - 8.8.8.8, 1.1.1.1, etc + ISP DNS), won’t work at all for any DNS names (Name or service not known.)
Have also done netconfig update -f, no success.
Have rebooted many times.
Have restarted router several times.
As I said, this is a multiboot machine, with other OS’s (windows + Ubuntu) working fine.
Many other devices in the network all working fine…

Surely I don’t have to rebuild this partition to get it working??
Is there any way to totally uninstall DNS components/purge/reinstall??
Thanks.

Just checking a bit further…
Have absolutely no DNS, including internal:

~> nslookup fritz.box
;; connection timeout; no servers could be reached

Have added addresses to /etc/sysconfig/network/config under NETCONFIG_DNS_STATIC_SERVERS=“192.168.0.1 1.1.1.1 8.8.8.8”

No joy…

Check hosts entry in /etc/nsswitch.conf is as expected with respect to dns…

hosts:          files mdns_minimal [NOTFOUND=return] dns

Entries in nsswitch.conf:

passwd: compat
group:  compat
shadow: compat

hosts:  	files mdns_minimal [NOTFOUND=return] dns
networks:	files dns

services:	files
protocols:	files
rpc:		files
ethers:		files
netmasks:	files
netgroup:	files nis
publickey:	files

bootparams:	files
automount:	files nis
aliases:	files

Thanks.

A quick diagnostic check…for wicked do

sudo journalctl -fu wicked

or for NM

sudo journalctl -fu NetworkManager

then unplug and replug the ethernet connection and observe/capture the output for others to advise further.

Yes, that checks out as expected.

Results are here…

Ok, I note from that no domain name servers are parsed, unlike my sample output example below…

Nov 25 13:41:31 linux-4k1z NetworkManager[1072]: <info>  [1606264891.4491] device (eth1): Activation: starting connection 'DHCP' (a845233a-565e-39eb-b5a4-09fd41d7e581)
Nov 25 13:41:31 linux-4k1z NetworkManager[1072]: <info>  [1606264891.4507] audit: op="connection-activate" uuid="a845233a-565e-39eb-b5a4-09fd41d7e581" name="DHCP" pid=3122 uid=1000 result="success"
Nov 25 13:41:31 linux-4k1z NetworkManager[1072]: <info>  [1606264891.5340] dhcp4 (eth1): activation: beginning transaction (timeout in 45 seconds)
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5477] dhcp4 (eth1): option dhcp_lease_time      => '600'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5478] dhcp4 (eth1): option domain_name_servers  => '172.31.200.18 8.8.8.8'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5478] dhcp4 (eth1): option expiry               => '1606265493'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5478] dhcp4 (eth1): option ip_address           => '192.168.30.218'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5478] dhcp4 (eth1): option next_server          => '192.168.30.254'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5478] dhcp4 (eth1): option requested_broadcast_address => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5478] dhcp4 (eth1): option requested_domain_name => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5478] dhcp4 (eth1): option requested_domain_name_servers => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5478] dhcp4 (eth1): option requested_domain_search => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_host_name  => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_interface_mtu => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_ms_classless_static_routes => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_nis_domain => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_nis_servers => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_ntp_servers => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_rfc3442_classless_static_routes => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_root_path  => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_routers    => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_static_routes => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_subnet_mask => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5479] dhcp4 (eth1): option requested_time_offset => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5480] dhcp4 (eth1): option requested_wpad       => '1'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5480] dhcp4 (eth1): option routers              => '192.168.30.254'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5480] dhcp4 (eth1): option subnet_mask          => '255.255.255.0'
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5480] dhcp4 (eth1): state changed unknown -> bound
Nov 25 13:41:33 linux-4k1z NetworkManager[1072]: <info>  [1606264893.5921] policy: set 'DHCP' (eth1) as default for IPv4 routing and DNS

A quick examination of that looks as expected…


Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.6804] device (p2p-dev-wlan0): supplicant management interface state: 4-way handshake -> completed
Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.6877] device (wlan0): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.6879] dhcp4 (wlan0): activation: beginning transaction (timeout in 45 seconds)
Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.7110] dhcp4 (wlan0): option dhcp_lease_time      => '864000'
Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.7110] dhcp4 (wlan0): option domain_name          => 'fritz.box'
Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.7111] dhcp4 (wlan0): option domain_name_servers  => '192.168.0.1'
Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.7111] dhcp4 (wlan0): option expiry               => '1607091075'
Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.7111] dhcp4 (wlan0): option ip_address           => '192.168.0.50'
Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.7111] dhcp4 (wlan0): option next_server          => '192.168.0.1'
Nov 25 00:11:15 boss NetworkManager[1213]: <info>  [1606227075.7111] dhcp4 (wlan0): option ntp_servers          => '192.168.0.1'

What does strace return?

sudo strace -e trace=open -f resolveip google.com

Results:

:~> sudo strace -e trace=open -f resolveip google.com
[sudo] password for root: 
open("/etc/host.conf", O_RDONLY|O_CLOEXEC) = 3
open("/etc/resolv.conf", O_RDONLY|O_CLOEXEC) = 3
resolveip: Unable to find hostid for 'google.com': host not found
+++ exited with 2 +++
 

What happens if you delete the existing /etc/resolv.conf, then run (as root)

netconfig -f update

Ran that, then ran:

:/etc> sudo netconfig -v update
<13>Nov 25 01:43:31 netconfig: Executing '-v update' for pid 4060
debug: lockfile created (/var/run/netconfig.pid) for PID 4061
debug: lockfile created
debug: Module order: dns-resolver dns-bind dns-dnsmasq nis ntp-runtime
debug: dns-resolver module called
debug: Resolved dns-policy 'default' for service 'NetworkManager' to 'default'
debug: Other: default
debug: write_resolv_conf: '  ' '  '
debug: dns settings written to /var/run/netconfig/resolv.conf
debug: /etc/resolv.conf is already a link to /var/run/netconfig/resolv.conf
debug: dns-bind Module called
debug: dns-dnsmasq Module called
debug: nis Module called
debug: Resolved nis-policy 'auto' for service 'NetworkManager' to 'STATIC_FALLBACK * NetworkManager'
debug: Static Fallback
debug: Other: *
debug: Use NetworkManager policy merged settings
debug: exec get_nis_settings: /var/run/netconfig/NetworkManager.netconfig
debug: exit get_nis_settings: /var/run/netconfig/NetworkManager.netconfig
debug: set_nisdomainname:  NetworkManager 40
debug: set_nisdomainname: => yes
debug: set_nisdomainname: old]=, new[40]=
debug: format_yp_conf called with :
debug: Using static fallback
debug: format_static[0] called
debug: write_yp_conf
debug: nis settings written to /var/run/netconfig/yp.conf
debug: /etc/yp.conf is already a link to /var/run/netconfig/yp.conf
debug: nis domainname '' is up to date
debug: ntp-runtime Module called
debug: Resolved ntp-policy 'auto' for service 'NetworkManager' to 'STATIC_FALLBACK * NetworkManager'
debug: Static Fallback
debug: Other: *
debug: Use NetworkManager policy merged settings
debug: exec get_ntp_settings: /var/run/netconfig/NetworkManager.netconfig
debug:      get_ntp_settings: NTP_SERVER_LIST=''
debug: exit get_ntp_settings: /var/run/netconfig/NetworkManager.netconfig
debug: write_chrony_servers: 
debug: ntp servers written to /var/run/netconfig/chrony.servers

Resulting resolv.conf (from either…):

### /etc/resolv.conf is a symlink to /var/run/netconfig/resolv.conf
### autogenerated by netconfig!
#
# Before you change this file manually, consider to define the
# static DNS configuration using the following variables in the
# /etc/sysconfig/network/config file:
#     NETCONFIG_DNS_STATIC_SEARCHLIST
#     NETCONFIG_DNS_STATIC_SERVERS
#     NETCONFIG_DNS_FORWARDER
# or disable DNS configuration updates via netconfig by setting:
#     NETCONFIG_DNS_POLICY=''
#
# See also the netconfig(8) manual page and other documentation.
#
### Call "netconfig update -f" to force adjusting of /etc/resolv.conf.

Share the output of

grep "NETCONFIG_DNS" /etc/sysconfig/network/config

I don’t know if you understood what I posted about using nslookup.

After running nslookup to get into the app,
You can test a connection to any DNS server anywhere.
If for instance the following doesn’t return a non-authoritative result, then you know it’s your own machine.
But, if you get a result, then you know it’s your DHCP server handing you a valid DNS server address.

When you first launch nslookup, you’ll see a special cursor.
Then you can type in any address on the Internet to do your initial test, I suggested “www.stanford.edu” as an address you likely haven’t resolved within the last week or more to avoid possibly resolving to an address in your name cache.
Then with the “server ip_address” the DNS resolver is reset to a Google DNS server. Assuming that your ISP isn’t blocking, you should be able to connect.
Then you type in the address that didn’t resolve before, and see whether you can return a valid result.

nslookup
www.stanford.edu

server 8.8.8.8
www.stanford.edu

After this test, you will know for sure if the problem is your machine or your DHCP server and know whether you should be spending your time looking further at either.

TSU

Result:

:~> grep "NETCONFIG_DNS" /etc/sysconfig/network/config
NETCONFIG_DNS_POLICY="default"
NETCONFIG_DNS_FORWARDER="resolver"
NETCONFIG_DNS_FORWARDER_FALLBACK="yes"
NETCONFIG_DNS_STATIC_SEARCHLIST="192.168.0.1 1.1.1.1 8.8.8.8"
# When the NETCONFIG_DNS_FORWARDER variable is set to "resolver",
NETCONFIG_DNS_STATIC_SERVERS="192.168.0.1 1.1.1.1 8.8.8.8"
NETCONFIG_DNS_RANKING="auto"
NETCONFIG_DNS_RESOLVER_OPTIONS=""
NETCONFIG_DNS_RESOLVER_SORTLIST=""




Also, results of nslookup:

:~> nslookup
> www.stanford.edu
;; connection timed out; no servers could be reached


> server 8.8.8.8
Default server: 8.8.8.8
Address: 8.8.8.8#53
> www.stanford.edu
Server:         8.8.8.8
Address:        8.8.8.8#53


Non-authoritative answer:
www.stanford.edu        canonical name = 89wyd637cdel.wpeproxy.com.
Name:   89wyd637cdel.wpeproxy.com
Address: 141.193.213.20
Name:   89wyd637cdel.wpeproxy.com
Address: 141.193.213.21
> 

Thanks for all your persistence!! :wink:

Also, have manually added the DNS servers : 192.168.0.1,1.1.1.1,8.8.8.8 manually to my Network Manager config, in “Other DNS Servers”
Again, everything else in the network is fine, including the other 2x OS’s multibooting off this machine.

BTW, this is obviously a WiFi setup, and the card is: Intel Corporation Wi-Fi 6 AX200
Thanks.