XK0-006 Troubleshooting Practice Question
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?
⚠ Common exam trap
Many exam-takers 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.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
/etc/resolv.conf
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.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
/etc/nsswitch.conf
Why it's wrong here
nsswitch.conf controls lookup order but is less commonly misconfigured.
- ✗
/etc/hosts
Why it's wrong here
Hosts file is used for static mapping, not DNS resolution order.
- ✓
/etc/resolv.conf
Why this is correct
This file contains DNS server and search domain settings.
- ✗
/etc/sysconfig/network
Why it's wrong here
This file contains network settings but not DNS resolution directly.
Visual reference
Go deeper
Related to this question
Learn chapter
File Permissions and Ownership
Key term
User
A user is any person, system, or device that interacts with an IT service, resource, or identity system, typically authenticated through credentials and authorized to perform specific actions.
Key term
DNS
DNS is the system that translates human-friendly domain names like example.com into machine-readable IP addresses so computers can find each other on a network.
About these practice questions
One of 979 original XK0-006 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This XK0-006 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the XK0-006 exam.