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 (www.technofriends.in) ( 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 www.technofriends.in . The Root DNS server, then gives back a reference for .in DNS servers.

DNS

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

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 www.technofriends.in.

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

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.

Cheers

Vaibhav

You have already tagged this post. Your tags:

Origianl story:

Valid XHTML 1.0 Strict