Quick Linux Tip #102:
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.
Examples:
- $
dig @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.
Leave a Reply