Understand DNS resolution from start to finish using dig +trace
The dig command is a powerful tool for troubleshooting queries and responses received from the Domain Name Service (DNS). It is installed by default on many operating systems, including Linux® and Mac OS X. It can be installed on Microsoft Windows as part of Cygwin.
One of the many things dig can do is perform a recursive DNS resolution and display all the steps taken in the terminal. This is very useful not only for understanding how DNS works, but also to determine if there is a problem somewhere in the resolution chain that is causing resolution failure for a zone or domain.
First, let’s briefly review how query recursion receives responses in a typical recursive DNS resolution scenario.
- As a DNS client (or stub resolver), you query the recursive resolver for www.example.com.
- The recursive resolver queries the root name servers for NS records for “com”.
- The root nameserver references the recursive resolver to the .com top-level domain (TLD) authoritative nameserver.
- The recursive resolver queries the .com TLD authority server for NS records for “example.com”.
- The .com TLD authoritative name server references the recursive server as the authoritative server for example.com.
- The recursive resolver queries the authoritative nameserver for example.com for an A record for “www.example.com” and receives 1.2.3.4 in response.
- A recursive resolver caches the answer for the time-to-live (TTL) period specified in the record and returns it to the user.
The above process is basically as follows:
Level 1
Step 2
Step 3
Step 4
Step 5
This process occurs every time you type a URL into your web browser or launch your email client. This shows why DNS response speed and accuracy are important. You may need to repeat this process several times if your response is incorrect. Slow replies will make everything you do online seem like it’s taking longer than it should.
Increasing both DNS response speed and accuracy is at the core of the IBM® NS1 Connect® value proposition.
Learn more at IBM NS1 Connect
Was this article helpful?
yesno