Question

Difficulty: HardTroubleshooting DNS and Name Resolution Services

A network security analyst is troubleshooting an issue where a Linux workstation fails to resolve internal hostnames after a recent network migration, though IP-based routing functions normally. What is the correct logical sequence of diagnostic steps to systematically isolate and resolve this name resolution failure?

  1. 1Examine `/etc/resolv.conf` to verify the configured nameserver IP addresses and search domains.
  2. 2Run `dig @<configured_dns_ip> internal.example.com` to test DNS transport and resolver responsiveness.
  3. 3Check `/etc/hosts` for conflicting static IP-to-hostname mappings that take precedence over DNS.
  4. 4Flush the local resolver cache (`resolvectl flush-caches`) to clear negative or stale DNS entries.

Answer

The correct logical sequence starts with inspecting `/etc/resolv.conf`, followed by directly querying the configured DNS server using `dig`, checking `/etc/hosts` for conflicting static entries, and finally flushing the local resolver cache.
Methodological troubleshooting progresses from checking local system configuration (`/etc/resolv.conf`), to testing DNS server transport responsiveness via direct utility queries (`dig`), checking local resolution overrides (`/etc/hosts`), and lastly purging stale system cache (`resolvectl flush-caches`).

Step-by-Step Solution

1
Inspect local resolver configuration files.
Verifies that the workstation is configured with valid DNS server IP addresses.
According to the CompTIA troubleshooting methodology, you must verify the basic client configuration settings before initiating complex network queries.
2
Query the configured DNS server explicitly using `dig @<dns_ip>`.
Tests whether DNS queries reach the resolver over port 53 and receive valid responses.
Direct lookup bypasses local OS resolution mechanisms to isolate whether the root cause lies within network transport or DNS server performance.
3
Examine the local static host table (`/etc/hosts`).
Identifies any hardcoded IP-to-hostname mappings that override DNS lookups.
Operating systems process `/etc/hosts` prior to querying external DNS servers. A legacy entry will prevent proper DNS name resolution.
4
Flush the local OS DNS resolver cache.
Removes cached NXDOMAIN or outdated responses.
Flushing clears lingering stale records so that subsequent application requests pull fresh, authoritative records from the DNS infrastructure.

Key Concept

OS Name Resolution Troubleshooting Sequence
Rate this question