A user reports that they cannot reach a remote server by hostname but can reach it by IP address. Which file should be checked first for possible misconfiguration?
This file contains DNS server and search domain settings.
Why this answer
Option C is correct because the /etc/resolv.conf file configures the system's DNS resolver, specifying the nameservers to query for hostname-to-IP resolution. Since the user can reach the remote server by IP but not by hostname, the issue is likely with DNS resolution, and /etc/resolv.conf is the first file to check for misconfigured or missing nameserver entries.
Exam trap
The trap here is that candidates often confuse /etc/hosts with DNS resolution, thinking a missing static entry is the cause, when the real issue is the absence or misconfiguration of DNS servers in /etc/resolv.conf.
How to eliminate wrong answers
Option A is wrong because /etc/nsswitch.conf controls the order of name service lookups (e.g., files, dns, mdns), but it does not contain DNS server addresses; a misconfiguration here would affect the lookup order, not the ability to resolve hostnames entirely if DNS servers are correct. Option B is wrong because /etc/hosts provides static hostname-to-IP mappings; if the remote server's hostname were listed there with a wrong IP, the user might reach the wrong server, but since they cannot reach it by hostname at all, the issue is not a static mapping. Option D is wrong because /etc/sysconfig/network is a Red Hat-based configuration file for network-wide settings like hostname and default gateway, not for DNS resolver configuration; it does not contain nameserver entries.