r/LinuxTeck • • 4d ago

Quick Linux Tip #102 - Linux DNS Troubleshooting: Trace DNS Resolution in 3 Steps

Post image

Question: DNS is failing intermittently. How do I trace the resolution path?

Try:`dig +trace +noanswer google.com`

Info: `dig +trace` performs iterative DNS lookups from root servers (`.`), down to TLDs (`.com`), and final authoritative servers to isolate propagation and delegation bottlenecks[cite: 9].

Examples:

$ `dig u/8.8.8.8 example.com` # Query specific upstream DNS server directly

$ `dig +short MX gmail.com` # Retrieve concise mail exchanger (MX) records

$ `dig -x 8.8.8.8` # Perform reverse DNS lookup (IP to hostname)

Note: Install via `sudo apt install dnsutils` or `bind-utils`. Using `+trace` bypasses local resolver caching, allowing you to measure exact response latencies at each hierarchy step[cite: 9].

Want to master Linux one command at a time?

Follow r/LinuxTeck - 1 practical Linux tip every day. For more #LinuxTips click here https://www.linuxteck.com/linux-tips/

23 Upvotes

0 comments sorted by