Domain Name System - Servers
How does Internet work? How are the web pages fetched from some site to my PC?
What is DNS and how it works.
Explanation
Domain Name System:
As a internet user what we know are names of the web sites. But what happens when you type the domain name?
On the backyard everything happens with ipaddress and data packets. Any thing that is connected via Internet should have a ip-address based on which communications are done. When ever you connect to internet, an ip address is assigned to your machine. Ip Address is a number system which will look like "192.167.11.222". This ip address is assigned to your PC by your ISP (Internet Service Provider). ISP is the company from which you have purchased the internet package.
Name Server Every ISP and servers (hosting company) will have a server called name server where the ip address to domain name mapping is done.
To explain in detail, we will assume that you are typing a website say hioxindia.com in a browser. The following process takes place one by one.
Domain Name System - Name Server's
a) Your PC contacts your ISP name server (e.g: NS-A) and request for any detail of the ip-Address of hioxindia.com
b) NS-A gets in touch with the root servers and gets the address of the .com TLD server. There are totally around 13 root server located in different parts of the world. They give the information of TLD Name servers.
c) NS-B is the name server that has ip-address info for hioxindia.com
d) Each TLDs (e.g: .com, .net, .org,..) servers have the information of all the lower hierarchy Name Servers (e.g NS-B). Thus the .com TLD server fetches the hioxindia.com's ip-address from the NS-B to NS-A. e) Now the request data (called as packet) for required details is send from your PC with the from ip and destination ip (hioxindia.com).
f) The data travels thro the network and reaches the destination ip.
g) There the data if verified and it sends back the details with its ip-address as source and our PC's ip-address as destination
h) The data travels thro the dense network and reaches you.
Once the ip of a destination website is fetched it will remain in a cache for some period of time. So when ever the name server details is required it will be searched first in cache. Name Server will be requested for details only in the cache does not contain the required details. The name that does not follow the above criteria will not be accepted for