DNS Resolution

What is DNS resolution ?
(DNS = Phone book of internet)
The Problem is computer do not understand the names like
nitishkumar.cloud
cahicode.com
Computers only understand Ip address
Then DNS comes to picture
imagine you have to remember phone number of all your friend it is pain !na
DNS came to picture and simpified like remembering all phone number now you have to only
friends name
analogy:
| Real Life | Internet |
| Name: Nitish kuar | Domain: nitishkumar.cloud |
| Phone number | IP address:192.168.137.1 |
| Contacts app | DNS |
What is DIG and When it used ?
DIG stands for Domain information Groper
It is command used to :
Debug the DNS
To see which server is responding
To understand full rsolution path
To check records A , MX , TXT ,etc
Why engineers use dig:
Website not opening
DNS misconfigured
Checking propagation
Cloud / DevOps debugging
Security analysis
Example:
dig nitishkumar.cloud

This shows:
Which server answered
What IP you got
How long it took
DNS flags
DNS Hierarchy
DNS woks in layer
Root (.)
↓
TLD (.com, .org, .in)
↓
Authoritative (google.com servers)

dig . NS → Root Name Servers
Root = Top boss
dig . NS
This asks:
Who controls the ROOT of DNS?
Output gives:
These are root name servers.
What they do:
They do not know google.com
for .com it go to .com TLD servers
Real-life analogy:
Root = Country-level office
They don’t know your house, they only know:
Ask the Karnataka office
dig com NS → TLD Name Servers
TLD = .com managers
dig com NS
This asks:
Who manages .com domains?
They reply with:
What they do:
They Told
For google.com, go talk to Google’s name servers
dig google.com NS → Authoritative Servers
Authoritative = Final Truth Source
dig google.com NS
This gives:
These are Google’s own DNS servers.
What they do:
They store:
A records (IP)
MX (mail)
TXT (verification)
CNAME etc.
They are the final source of truth for google.com.
dig google.com → Full Resolution Result
This is what browser want
dig google.com
That gives:
google.com. A 142.250.xxx.xxx
This is the actual IP your browser connects to.

(Cheat Sheet)
| Command | DNS Layer |
dig . NS | Root |
dig com NS | TLD |
dig google.com NS | Authoritative |
dig google.com | Final IP |
| Browser request | Uses IP |
credits:
https://www.geeksforgeeks.org/computer-networks/domain-name-system-dns-in-application-layer/
Comments
Join the discussionNo comments yet. Be the first to comment.



