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.
2.) The browser then contacts the local nameserver ( usually assigned in the IPCONFIG) and asks for the IP address of the webserver.
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.
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?
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
Related posts:
- [How-To] Enable OpenDNS SmartCache Feature for your Network
- Flush.M Trojan can fake DHCP Server
- How does a Blackberry device work?
- [Security] How a Distributed Denial of Service Attack on your DNS Server can bring down your Website
- How does Email Scanning Work?



[...] View post:How does a DNS work? [...]
Thank you for the information – great article!
[...] 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 [...]
[...] 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 [...]
HMMM. thamnks for the artcile.
[...] if you wish to understand how a compromised DNS can bring down you first need to understand What is a DNS and How does it work?. Once you have read about what a DNS is, you can also consider reading the effect of a DDos attack [...]
[...] In order to get a bigger picture of why OpenDNS needs to contact the authoritative nameservers, you must read my earlier article titled What is a DNS and how does it work?. [...]