On a workstation, `ping 8.8.8.8` succeeds with normal round-trip times, but `ping www.example.com` fails immediately with a message that the name or service is not known. Which two causes are consistent with these symptoms? (Choose two.)
LPIC-1 Exam 102-500, objective 109. Networking fundamentals hard
Draft — not checked yet. This question was written from the published exam objectives and cites the clause it comes from, but nobody has yet read it against that clause and signed for it.
It is kept out of search results and out of mock exams until they have. Read the source below before you take the answer as settled.
The options
Choose 2.
Not correct The interface is administratively down
Wrong. A down interface could not have sent the successful pings to 8.8.8.8. Those replies prove layer 1 to layer 3 are working.
Correct /etc/resolv.conf lists no nameserver, or lists one that is unreachable
Correct. Without a usable name server the resolver cannot translate the name, and the failure is reported as a resolution error rather than as packet loss.
Not correct No default gateway is configured
Wrong. Without a default route the ping to the off-link address 8.8.8.8 would itself have failed with a network-unreachable error.
Correct The hosts line in /etc/nsswitch.conf has been edited so that it lists neither files nor dns
Correct. That line tells the C library which sources to consult for hostname lookups. With no usable source listed, every name lookup fails while traffic sent straight to an IP address is unaffected. (Note that deleting the line altogether would not do this: glibc falls back to a built-in default that still includes dns and files.)
Not correct A local firewall is dropping outbound ICMP echo requests
Wrong on two counts: the successful ping to 8.8.8.8 shows ICMP is getting through, and a blocked ICMP packet would produce a timeout, not a name-resolution error.
Why
The classic split diagnosis: pinging an IP address exercises the interface, the routing table and the path; pinging a name additionally exercises name resolution. When the address works and the name does not, the fault is above layer 3, in resolution. Check /etc/resolv.conf for nameserver entries, /etc/nsswitch.conf for the hosts line, and query directly with `dig @NAMESERVER www.example.com` and `getent hosts www.example.com` to see whether DNS or NSS is at fault.
Where this comes from
- Cited
- LPI exam objective 109.3
- What it says
- Diagnose common network problems by isolating which layer has failed.
Practise this
Reading one question is not practice. The trainer will draw a set from objective 109 and space the ones you get wrong.