Domain Name System (DNS) issues are among the most persistent challenges for network engineers. Whether a client cannot resolve an IP address due to propagation delays or receives an immediate NXDOMAIN error, the root cause often lies in subtle misconfigurations within the resolver chain or authoritative server responses. While basic ping tests can indicate connectivity, they rarely reveal the specific DNS transaction failures. This guide provides a practical, hands-on approach to diagnosing these issues using Wireshark, focusing on analyzing UDP port 53 traffic, interpreting TTL values, and validating response codes.
Understanding Propagation Delays and NXDOMAIN Fundamentals
Before diving into packet captures, it is essential to understand the mechanics of the errors you are troubleshooting. An A-Record propagation delay occurs when a change made to an authoritative DNS server (e.g., updating example.com to point to a new IP) has not yet been replicated across all recursive resolvers globally. This is governed by the Time To Live (TTL) set on the record; if the TTL was high, existing caches will serve the old IP for several hours.
Conversely, an NXDOMAIN error (RCODE 3 in DNS responses) indicates that the authoritative name server explicitly states the domain name does not exist. However, junior engineers often mistake this for a propagation issue when it is actually caused by a typo in the query, a missing glue record, or a misconfigured zone transfer preventing the secondary server from learning the update.
Prerequisites and Lab Environment Setup
To effectively diagnose these issues, you need a controlled environment to capture traffic without disrupting production services. If you are using Cisco Packet Tracer or GNS3 for simulation, ensure your DNS topology includes:
1. A recursive resolver (e.g., BIND or Windows DNS) configured on your client machine.
2. An authoritative server hosting the zone file.
3. A client machine capable of running Wireshark.
Safety Note: Always perform DNS testing in a segregated VLAN or a lab network. Do not attempt to capture traffic on a production internet connection without explicit permission, as this can violate privacy policies and introduce latency. Ensure your Wireshark interface is set to the correct LAN adapter before starting captures.
Step-by-Step: Capturing and Analyzing A-Record Queries
The first step in troubleshooting is isolating the specific DNS transaction. Follow these steps to generate a clean capture file for analysis:
- Start the Capture: Open Wireshark on your client machine. Select the network interface connected to your lab network. Click the shark fin icon to start capturing packets.
- Generate Traffic: Open a terminal or command prompt on the client and run a query:
bash
nslookup example.com <your_recursive_server_ip>
Illustrative Output:
text
Server: <your_recursive_server_ip>
Address: <your_recursive_server_ip>#53
Non-authoritative answer:
Name: example.com
Address 1: 93.184.216.34 - Stop the Capture: Immediately stop the capture in Wireshark once the response is received.
Analyzing the Packet Flow
With the capture running or a .pcap file loaded, apply the following display filter to isolate DNS traffic:
dns.flags.response == 1
Click on any packet in the list. In the “Packet Details” pane, expand the DNS section. Look for the Question Section and Answer Section.
- Query ID Match: Ensure the
IDin the Query matches theIDin the Response. This confirms you are analyzing the correct transaction. - Response Code (RCODE): In the DNS header, check the RCODE field. A value of
0indicates success (NOERROR). A value of3indicatesNXDOMAIN.
Diagnosing Propagation Delays via TTL Inspection
When investigating why a user still sees an old IP address after an update, the key metric is the TTL (Time To Live). In Wireshark, expand the DNS section and look at the “Answer Section.” You will see entries like:
Name example.com
Type A
TTL 300
Class IN
Address 93.184.216.34
If the TTL is set to 300 (5 minutes), that is the maximum time a recursive resolver will cache this record. If you see a lower value, such as 60, it suggests the administrator intentionally lowered the TTL before making changes—a best practice for faster propagation. However, if the TTL was previously set to 86400 (24 hours), caches globally may still be serving the old data even after the record is updated on the authoritative server.
To verify propagation, use the command:
dig example.com +trace
This command forces your resolver to query root servers and follow the chain up to the authoritative server, bypassing local caches. Compare the IP address returned here with the one seen in a standard nslookup. If they differ, you have confirmed a cache poisoning or a propagation delay issue.
Investigating NXDOMAIN Errors with Wireshark Filters
An NXDOMAIN error can be tricky because it might appear as a simple “site not found” to the user. In Wireshark, filter for the error:
dns.qry.name == "nonexistent-domain.com" && dns.flags.response == 1
Inspect the response packet. Look at the Authority Section. If present and contains an SOA (Start of Authority) record but no A record in the Answer Section, combined with RCODE 3, it confirms a definitive non-existence declaration by the authoritative server.
Common Cause: A frequent cause of false NXDOMAIN errors during propagation is that the secondary DNS server has not successfully received the zone transfer (AXFR/IXFR). If the primary server updates the record but the secondary hasn’t synced, queries to the secondary will return NXDOMAIN. Verify this by checking the logs on your authoritative servers for successful zone transfers.
Verification Steps and Common Mistakes
When troubleshooting these issues, avoid common pitfalls that lead to wasted time:
* Mistaking Cache Poisoning for Propagation: If a malicious actor injects bad data into a resolver, it may return an incorrect IP or NXDOMAIN. Always verify by querying multiple recursive resolvers (e.g., Google’s 8.8.8.8 and Cloudflare’s 1.1.1.1) to see if they all agree.
* Ignoring Port 53 Blocking: If your firewall blocks UDP port 53, DNS queries will time out. Wireshark will show a “No Answer” or RCODE 4 (SERVFAIL). Ensure your security policies allow DNS traffic.
* Misinterpreting Truncated Responses: Sometimes a response is truncated (TC bit set). This usually means the answer section was too large for a single UDP packet, and the server expects a TCP retry. Ensure your analysis includes both UDP and TCP DNS queries if truncation occurs.
Student Practice Task: Simulating a Zone Update
To solidify these skills, complete the following lab exercise in your Packet Tracer or GNS3 environment:
1. Configure a zone file on Server A with an A record for test.local pointing to 192.168.10.5.
2. Set the TTL to 300.
3. Update the zone file to point test.local to 192.168.10.99.
4. Restart the named service on Server A.
5. On a client machine, use Wireshark to capture traffic while running nslookup test.local.
6. Observe the response. If you see 192.168.10.5 immediately, it is coming from your local cache or a nearby recursive server.
7. Flush the DNS cache on the client (ipconfig /flushdns on Windows or sudo systemd-resolve --flush-caches on Linux) and re-run the lookup.
Conclusion
Diagnosing A-Record propagation delays and NXDOMAIN errors requires moving beyond simple connectivity tests to deep packet inspection. By leveraging Wireshark to analyze TTL values, response codes, and authority sections, network engineers can distinguish between legitimate propagation lags, cache issues, and authoritative server misconfigurations. Remember that DNS resolution is a distributed system; what works on one resolver may fail on another due to caching policies or zone synchronization states. Always validate findings against multiple resolvers and review your authoritative server logs for zone transfer status.
Educational-use notice: This tutorial is for learning and controlled lab use only. Test carefully, use backups, and obtain authorization before making changes. Do not run unfamiliar commands on production systems. We accept no responsibility for misuse, damage, data loss, or production issues.

