Courseiva
Network Client ManagementmediumMultiple ChoiceObjective-mapped

LPIC-2 Network Client Management Practice Question

A Linux client is unable to resolve hostnames for external domains but can ping internal hosts by IP. The /etc/resolv.conf file is correctly configured with a valid DNS server. What is the most likely cause?

⚠ Common exam trap

Many candidates assume a misconfigured /etc/resolv.conf means the DNS server is wrong or unreachable, but the question explicitly states it is correctly configured with a valid server, so the issue must be in how the resolver processes queries, specifically the search domain or ndots behavior.

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

The search domain in /etc/resolv.conf is incorrect, causing the resolver to append an inappropriate domain to queries.

When a search domain is incorrectly configured in /etc/resolv.conf, the resolver appends that domain to single-label hostnames before querying the DNS server. For external fully qualified domain names (FQDNs), this can cause the resolver to send queries like 'externaldomain.com.incorrect.domain' instead of the intended domain, leading to resolution failures. Since internal IPs are reachable (bypassing DNS) and the DNS server itself is valid, the issue is most likely the resolver's domain search behavior.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • The /etc/hosts file contains an entry that overrides the DNS resolution for external domains.

    Why it's wrong here

    An override in hosts would affect all resolution for that hostname, not just external.

  • The nmblookup service is not running.

    Why it's wrong here

    nmblookup is for NetBIOS name resolution, not DNS.

  • The search domain in /etc/resolv.conf is incorrect, causing the resolver to append an inappropriate domain to queries.

    Why this is correct

    An incorrect search domain can cause the resolver to try invalid fully qualified domain names, leading to resolution failures for external hosts.

  • The /etc/nsswitch.conf file is missing the 'dns' service in the 'hosts' line.

    Why it's wrong here

    Missing dns would prevent any DNS resolution, but the question states ping to internal IPs works, so DNS is partially working.

Visual reference

Client Recursive Resolver Root DNS (13 root servers) TLD DNS (.com, .org, …) Authoritative example.com query IP addr answer

About these practice questions

This LPIC-2 question is part of Courseiva's 507-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This LPIC-2 practice question is part of Courseiva's free LPI 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 LPIC-2 exam.