How does a DNS work?

I earlier wrote about OpenDns and how it can help you stay ahead while making a dns query. But interestingly, i met someone recently who quite didn’t understand the whole DNS and the resolution thing, for him and for all those of you who might be interested, this is the post.

Have you ever thought about how the website address you type in the browser address bar gets resolved to the IP address. This post describes the way Domain Name Servers resolve the web address to IP Address.

When you enter the address of a website into your web browser, the browser tries to identify the IP address of the server hosting this website. Follow the steps below to identify what happens behind the scenes.

1.) The user enters the web address for Technofriends ( ( URL –> Universal resource locater) in the browser’s address bar.

Structure of DNS

2.) The browser then contacts the local nameserver ( usually assigned in the IPCONFIG) and asks for the IP address of the webserver.

Name Servers through IPCONFIG

3.) If the local nameserver has this information in its cache, it passes this on to the client browser. If not, it sends back the reference to the Root DNS Servers.

4.) The client browser then gets in touch with the ROOT DNS Server and asks for the IP address of . The Root DNS server, then gives back a reference for .in DNS servers.


5.) The client then gets in touch with the .IN DNS servers for the IP of

6.) The .IN Server then returns a reference to the name server of TECHNOFRIENDS.IN

7.) Client then contacts the TECHNOFRIENDS.IN nameserver to get the IP of

8.) The TECHNOFRIENDS.IN nameserver returns the IP Address of

9.) Client browser then connects to the IP Address and gets the content.

You can get the DNS resolution steps of the website using DIG in Unix or NSLOOKUP in windows. You might even try out the web based dig tool available here.

Also read: What’s your IP Address?

Open DNS: A big DNS Cache

Do stay tuned to Technofriends for more, one of the best ways of doing so is by subscribing to our feeds. You can subscribe to Technofriends feed by clicking here.




4 Responses

  1. […] View post:How does a DNS work? […]

  2. Thank you for the information – great article!

  3. […] the recent Vulnerability? Posted on August 4, 2008 by Vaibhav Pandey I earlier wrote about What is DNS and how it works, also we read How OpenDNS works. Recently US-CERT ( United States Computer Emergency Readiness […]

  4. […] interesting article about HTTP Response Status Codes. The HTTP request response cycle begins with DNS Lookup and ends with the browser parsing the response after studying the Response headers. Response […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: