When troubleshooting name resolution issues in Linux, /etc/hosts entries take precedence over DNS lookups. The workstation’s /etc/hosts file contains the line:
CopyEdit
104.18.99.101 www.comptia.org
This means any attempt to access www.comptia.org will resolve to 104.18.99.101, regardless of the real DNS response. However, both dig and nslookup show the correct IP as 104.18.16.29. Because the local /etc/hosts entry overrides DNS, and the hardcoded IP is either incorrect or unreachable, all network traffic to www.comptia.org will fail or not reach the intended destination, resulting in the observed connectivity issue (Destination Host Unreachable).
Other options:
B. The lack of IPv6 support is irrelevant since the host is using IPv4 and the DNS queries for IPv4 (A record) are successful.
C. The firewall would block all HTTP/HTTPS connections, but the error shown is a host unreachable, not a port-specific issue.
D. The nameserver is working; both dig and nslookup queries succeed and return the correct A record.
[Reference:, CompTIA Linux+ Study Guide: Exam XK0-006, Sybex, Chapter 8: "Networking Fundamentals", Section: "Troubleshooting Name Resolution", CompTIA Linux+ XK0-006 Objectives, Domain 2.0: Networking, , , ]
Submit