XK0-005 · Question #784
A systems administrator receives reports of issues in one of the Linux systems. The following output has been provided: # dig node.mycomptia.org ; <<>> DiG 9.11.36.x.x. <<>> node.mycomptia.org…
The correct answer is B. echo "nameserver 8.8.8.8" >> /run/systemd/resolve/resolv.conf F. systemetl restart NetworkManager. The error message "connection timed out; no servers could be reached" indicates that there is no DNS server configured, or the system is unable to reach the configured DNS server. Additionally, the output from /etc/resolv.conf shows that it lacks any nameserver entry, which…
Question
A systems administrator receives reports of issues in one of the Linux systems. The following output has been provided:
dig node.mycomptia.org ; <<>> DiG 9.11.36.x.x. <<>> node.mycomptia.org ;; global options: +cmd ;; connection timed out; no servers could be reached # cat /etc/resolv.cont search mycomptia.org Which of the following actions will best resolve this issue? (Choose two.)
Options
- Aecho "8.8.8.8 node.mycomptia.org" >> /etc/hosts
- Becho "nameserver 8.8.8.8" >> /run/systemd/resolve/resolv.conf
- Csystemctl restart networkd
- Decho "8.8.8.8" >> /etc/resolv.cont
- Eecho "DNS1=8.8.8.8" >> /etc/sysconfig/network-scripts/ifcfg-eth0
- Fsystemetl restart NetworkManager
- Gsystemctl restart named
How the community answered
(24 responses)- A4% (1)
- B54% (13)
- C25% (6)
- D4% (1)
- G13% (3)
Explanation
The error message "connection timed out; no servers could be reached" indicates that there is no DNS server configured, or the system is unable to reach the configured DNS server. Additionally, the output from /etc/resolv.conf shows that it lacks any nameserver entry, which means that there are no DNS servers defined to resolve the hostname. To resolve the issue, you need to do two things: 1. Add a valid nameserver to the appropriate configuration file. 2. Restart the network services to apply the new configuration. echo "nameserver 8.8.8.8" >> /run/systemd/resolve/resolv.conf: This command adds a nameserver entry (8.8.8.8 is a public DNS server by Google) to the system's resolv.conf file, making it possible for the system to perform DNS resolution. /run/systemd/resolve/resolv.conf is the correct file for many systemd-resolved systems, which manages DNS resolution. systemctl restart NetworkManager: After modifying the DNS configuration, it is important to restart NetworkManager to apply the changes. NetworkManager manages network settings and DNS configuration on many Linux Restarting NetworkManager will ensure that the system uses the new DNS server settings.
Topics
Community Discussion
No community discussion yet for this question.