Documente Academic
Documente Profesional
Documente Cultură
Search
HOME PAGE ABOUT US CONTACT US ARCHIVE ARCHIVES SECURITY NOTES TECHNICAL NEWS
NETWORKING
Home Archives how does DNS server work how does DNS server work
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Hi all ...in this post we will be discussing
the most important and inevitable resource in
the world of internet, which each and
everyone of us uses knowingly or
unknowingly.
initially the concept of host file was born to solve the problem, each and every machine in the network used to
have a host file, /etc/hosts where the name to address mapping was done.. But with the passage of
time,problems like the below emerged.
1.each and every machine needed to update the the newly added entries themselves.
2.there was no kind of notification available for clients to know a new entry has been added.
3.by the passage of time, a single file became large and very large, making it difficult to handle.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
During the mid 1970's the concept of name servers came into place. the basic idea behind this name servers
was that, people find it easy to remember names rather than numbers, especially when that name describes
some attributes of a resource.
This main problem of converting names to numbers in networking is as old as computer networking itself.
When a name server is present in a network the machines in the network only needed to know, the numerical
address of the name server and the name of the destination machine or a website. With these information in
hand the machines in the network can ask the name server in the network for the numerical address (IP
address) of the destination.
a centralized server for the name server was much better than /etc/hosts file solution. because now with a
central server dedicated for name to address mapping, the machines in the network only needed to know the
numerical address of the name server, and the name server will return the numerical address of a name,
whenever asked by the clients.
the major advantage of having a central name server was that the numerical address or the IP address of the
server, can be changed without the clients being aware of the change. In such situations the name server just
needed to be updated or modified with the new IP address.
But there were some drawbacks of a central name server also, like what if the central name server is not
available? Hence came the idea of multiple name servers, in the network, one acted like a master or primary,
and the other a slave or secondary. If master is not available then the secondary name server of the slave
name server, is queried for the answer.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
There were some main drawbacks of even this kind of an implementation (primary and secondary name
servers). they are as follows.
1.As the names in the network goes on increasing, it becomes too much difficult for a name server to retrieve
an information from millions of entries. So we needed a method to organize the names.
2.Imagine a single name server getting lot and lots of queries per second, in such cases the load on the
name server increases. So we need to find a method to spread the load.
3.We needed a mechanism to separate the administration of the entries in the name server, as many
different administrators used to add entires.
RFC 1034
RFC 1035
The domain name system of the internet works in a inverted tree structure.At the top of the tree is the root
name server(don't worry, i will explain whats a root server).The root server is followed by TLD's or Top Level
Domains,and then TLD's are followed by SLD's or Second Level Domains. All of these are seperated by
dots.
Understanding the above explained thing which is underlined is very much important in understanding the
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
concept of DNS.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Country Code Top Level Domains are domains such as .in,.us,.uk etc.
Now when we call www.slashroot.in a domain name, this domain name is a combination of
gTLD,SLD(Secondry Level Domain) and the host name.We will come back to this in some time.
When we normally call a domain like google.com its the combination of TLD,SLD.
Each and every node in this Domain Name system is assigned to an authority or organization for its
administration. And that organization resposible for a particular node is authoritative for that node.The term
authoritative will be used many times in DNS system.
Now the authority of the .(root name server) which is at the top of the heirarchy lies with an organization
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
named ICANN(Internet Corporation for Assigned Names And Numbers.).
gTLD's like (.com,.net) and others are also administered by ICANN and are also delegated to ICANN
accredited registrars. ccTLD's are accredited to different countries for administration by ICANN.
Delegation in DNS is an important concept...I will keep another dedicated post only for delegation.
It is very much important to understand the fact that, the left most part (www) in any address, like for example
www.slashroot.in, is the hostname. WWW is used by websites only by convention, there is no rule to use www
for a website. A web site can also be named xyz.example.com.
what happens when I type www.example.com in the address bar of the browser?
the root name server(.) is the most important resource in the name server heirarchy. when any name server is
asked for an information which it does not have, the first thing that name server does is asking one of the
(.)root name server.
a.root-servers.net.
b.root-servers.net.
c.root-servers.net.
d.root-servers.net.
e.root-servers.net.
f.root-servers.net.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
g.root-servers.net.
h.root-servers.net.
i.root-servers.net.
j.root-servers.net.
k.root-servers.net.
l.root-servers.net.
m.root-servers.net.
Now the ip address of all the root servers mentioned above are known to all the DNS software packages, by
default. Which means all the DNS servers can reach these root servers without any other DNS server.
Step2: the operating system looks at /etc/host file,first for the ip address of www.example.com(this can be
changed from /etc/nsswitch), then looks /etc/resolv.conf for the DNS server IP for that machine
Step3: the dns server will search its database for the name www.example.com, if it finds it will give that back,
if not it will query the root server(.) for the information.
Step4: root server will return a referral to the .com TLD name server(these TLD name servers knows the
address of name servers of all SLD's).In our case we searched for www.example.com so root server will give
us referral to .com TLD servers.
If it was www.example.net then root server will give, .net TLD servers refferal.
Step5: Now One of the TLD servers of .com will give us the referral to the DNS server resposible for
example.com domain.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Step6: the dns server for example.com domain will now give the client the ip address of www host(www is
the host name.)
Now you can clearly see from the dig with trace output that, the request first went to root servers. a.root-
servers.net replied me with the addresses of all .com gtld servers, and b.gtld-servers.net gave me the name
servers for google.com and finally ns2.google.com replied me with the ip address of www.google.com
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Rate this article:
Average: 4.9 (719 votes)
21 Comments
Add a comment...
Cag Hal
Very nice writeup.
Like Reply 2 Feb 14, 2013 9:57am
Amir Reza
tanx for this useful post
Like Reply Oct 3, 2013 10:44pm
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Glenn Huang
Thank you VERY much. Well done.
Like Reply Feb 21, 2014 2:21pm
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Comments
oops
Permalink Submitted by sajan samuel on Wed, 10/01/2014 - 10:34
reply
Good job
Permalink Submitted by Sonu on Wed, 01/14/2015 - 11:07
reply
Superb
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
reply
If dns package has the ip addresses of root name servers, then what exactly is the use of resolv.conf ?
Can they directly contact the root level name servers for dns resolution ?? sorry for being stupid..
reply
Use of resolve.conf
Permalink Submitted by Ajith PG on Sat, 07/09/2016 - 19:04
Hello,
The resolve.conf file is used to specify your own name servers. You may have your own server or you
can use public name servers like 4.2.2.2/8.8.8.8 etc. You need any of these servers to contact the root
name servers. Without the name servers your system won't be knowing where to look for a DNS
resolution. That's the use of resolve.conf.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
reply
Sys Admin.
Permalink Submitted by Arnoldjacko on Thu, 02/05/2015 - 20:16
reply
Hi dear,
Is there any another URL of yours for DNS records, so please let me know.
My email id is Nkhan0608@hotmail.com
reply
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Thanks
Permalink Submitted by Toji K Dominic on Wed, 07/22/2015 - 09:31
reply
Now when we call www.slashroot.in a domain name, this domain name is a combination of
gTLD,SLD(Secondry Level Domain) and the host name.We will come back to this in some time.
gTLD =>ccTLD
-----
thanks for your post :)
reply
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
dig output shows google.com where as you refererred example.com
Permalink Submitted by Muthukumar on Sun, 12/13/2015 - 18:27
one thing I just want to notify you so that you can update this fourms
# dig output shows reverse lookup zone details of google.com whereas you mentioned example.com in all
explanation.
Thanks
reply
reply
Excellent explanation.
reply
Excellent explanation
Permalink Submitted by Vijay Sakpal on Fri, 10/14/2016 - 13:25
Excellent explanation
reply
reply
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Very Good
Permalink Submitted by Anonymous on Wed, 02/01/2017 - 10:10
reply
You said TLD are split into two types - THIS IS WRONG
Permalink Submitted by gary on Fri, 03/17/2017 - 11:38
hi,
please read the following from Top level domain article of wikipedia..
TLD is not split into 2 types. gtld and cctld are groups of top level domains.
infrastructure top-level domain (ARPA): This group consists of one domain, the Address and Routing
Parameter Area. It is managed by IANA on behalf of the Internet Engineering Task Force for various
purposes specified in the Request for Comments publications.
generic top-level domains (gTLD): Top-level domains with three or more characters
restricted generic top-level domains (grTLD): These domains are managed under official ICANN accredited
registrars.
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
sponsored top-level domains (sTLD): These domains are proposed and sponsored by private agencies or
organizations that establish and enforce rules restricting the eligibility to use the TLD. Use is based on
community theme concepts; these domains are managed under official ICANN accredited registrars.
country-code top-level domains (ccTLD): Two-letter domains established for countries or territories. With
some historical exceptions, the code for any territory is the same as its two-letter ISO 3166 code.
internationalized country code top-level domains (IDN ccTLD): ccTLDs in non-Latin character sets (e.g.,
Arabic, Cyrillic, Hebrew, or Chinese).
test top-level domains (tTLD): These domains were installed under .test for testing purposes in the IDN
development process; these domains are not present in the root zone
reply
Your name
Subject
Comment *
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
No HTML tags allow ed. More information about text formats
Web page addresses and e-mail addresses turn into links automatically.
Lines and paragraphs break automatically.
Word verification *
Type the charac ters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.
Save Preview
*
First Name
Last Name
Subscribe
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Most Commented Top Rated Articles
How Does Traceroute Work and Example's of using EIGRP (Enhanced Interior Gateway Routing Protocol)
traceroute command
Networking - 69 comment(s)
Average: 5 (5 votes)
Average: 5 (3 votes)
difference between iterative and recursive dns query
Arc hives - 42 comment(s) Netstat command examples and its usage
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Arc hives - 37 comment(s)
how to install and configure kerberos server
Average: 5 (2 votes)
Average: 5 (2 votes)
Average: 5 (9 votes)
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
Get in touch with The Authors Follow Us
Sarath Pillai
Subscribe to our RSS Feed
Ph: +917303074400
Follow us on Twitter
Email: sarath@slashroot.in
Be a fan on Facebook
*
Subscribe
Difference Between Segments, Packets and Frames inode and its structure in linux
Netw orking - 3 days 7 hours ago Archives - last view 16 sec ago
How is TCP & UDP Checksum Calculated? What is a DNS ZONE file: A Complete Tutorial on
zone file and its contents
Netw orking - 4 days 9 hours ago
Archives - last view 38 sec ago
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com
How Does UDP Work ?
Encrypting a Linux Partition Using LUKS
Netw orking - 5 days 10 hours ago
Security Notes - last view 42 sec ago
open in browser PRO version Are you a developer? Try out the HTML to PDF API pdfcrowd.com