220-1102 Question 273
Single answer/etc/resolv.confA Linux workstation can reach internal servers by IP address, but users cannot open websites by host name. You verify network connectivity with ping to a known IP address, and the issue appears to be DNS-related. The workstation is configured to use static DNS settings. Which file should the technician check first to confirm that the correct DNS server entries are configured?
- A
/etc/resolv.conf
- B
/etc/hosts
- C
/etc/fstab
- D
/etc/passwd
Show answer and explanation
Correct answer: A
Explanation
This scenario reflects a common real-world troubleshooting pattern: if a host can communicate by IP address but not by name, the problem is often DNS resolution rather than basic network connectivity. On Linux systems, /etc/resolv.conf is the file traditionally used to specify DNS resolver settings such as nameserver and search directives. A technician should verify that the nameserver entries are present and point to reachable, correct DNS servers. By contrast, /etc/hosts provides only local static mappings, /etc/fstab manages mounts, and /etc/passwd manages user account data. As a best practice, technicians should also be aware that on some modern distributions, /etc/resolv.conf may be generated automatically by NetworkManager, systemd-resolved, or DHCP clients, so manual changes may be overwritten unless the system's network management method is adjusted accordingly.
- A. Correct.
Correct. /etc/resolv.conf is the traditional Linux configuration file used to define DNS resolver settings, including nameserver entries and search domains. If a system can communicate by IP address but cannot resolve host names, checking this file is an appropriate first step to verify that valid DNS servers are configured.
- B. Incorrect.
Incorrect. /etc/hosts is used for local, static hostname-to-IP mappings on the machine itself. It can help resolve specific names manually, but it is not the primary file for configuring which DNS servers the system queries for general name resolution.
- C. Incorrect.
Incorrect. /etc/fstab controls how filesystems and storage devices are mounted at boot or on demand. It has no role in DNS name resolution, though it is a common Linux configuration file that technicians are expected to recognize.
- D. Incorrect.
Incorrect. /etc/passwd stores local user account information such as usernames, user IDs, home directories, and login shells. It is unrelated to DNS resolver configuration.