Question

  Asked: Dec 20 2004   10:54 PM GMT
  Asked by: xevier


how DNS works


Tech support, Hardware, Servers, Intel servers, Linux, Unix, Unix servers, Backup & recovery, Installation, Toubleshooting, Networking, Networking services, DNS, Active Directory, Bind, DHCP, Lotus Domino, LDAP, Microsoft Windows, Storage

hello everybody,
can you tell me ,how DNS works? i know the theorotical aspects that it is a large database distributed on a no. of servers etc. but i don't know how practically it is implemented,what softwares are used to implement it and how can i access it ,if i have it implemented.i have heard of BIND.can you throw some light on that?what else besides BIND.
thanks
xevier

Subscribe to Alerts! Get questions and answers delivered to your Inbox.


E-mail me updates on this question



   SUBSCRIBE

hidden modal window

Answer Wiki (Improve, edit or add to this answer)


 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0



OK - another deep hole - just love these.
Simplest answer is that there is a server (arbitrarily chosen by the appropriate admins) which is THE authority for example.com, and its associated address range 168.192.in-addr.arpa (which covers all of 192.168.x.y).
note the reversing of the byte ordering for the address range.
Other servers can get to know the data by one of two (or three) basic methods.

Assume that example.com is known by the TLD (Top Level Domain) name servers (.COM in this case) as being the SOA (Start Of Authority) for example.com. If nobody has any data for example.com, then their query will go all the way up to the root name servers for the internet.

So, let's imagine a query for www.example.com. Nobody's name server originally has the data for that value - it's just been created. But the root name servers DO know who's responsible for all information about example.com - so they query it.

It comes back and says that the IP address for www.example.com is 192.168.1.1

At that point, every name server along the original query route now gets that answer, and caches it for some period of time (minutes, hours, days, it depends on how it was set up - not important for the moment).

Now when the next query comes up for example.com, there are a number of name servers that have that data cached, and can answer - but with the proviso that it's non-authoritative - meaning that it (the answer to the query) was retrieved using cached data. It's non-authoritative because during the lapsed time, the real answer COULD have changed. Probably not, but it could have.

So, if you're running example.com, and it's getting popular, you might want to have some other name servers keep copies of your data - and keep it current.

Now you're getting into defining other servers as being authoritative for your domain - or zone. Bear in mind - a zone is an arbitrary division. It can be an entire domain, or just a chunk of it. Up to the administrators exactly how they have divided it up.

If xyz.com agrees to do so (at example.com's request), then they can become authoritative for example.com.

Similarly, other servers (if allowed by example.com) can also carry copies of the entire zone (or domain if set up that way). Now example.com is "populating" a number of servers.

Commonly, there are caching-only servers which simply keep copies of frequently queried values (www.google.com, www.yahoo.com, www.espn.com, etc.) for fast reference, since most people don't need authoritative data.

If this is not enough, send me a private message and we can talk by phone.

I also recommend the book DNS and BIND by Paul Albitz and Cricket Liu. They go into much more detail than I want to typing.

Bob
  • AddThis Social Bookmark Button

Browse more Questions and Answers on DataCenter, Linux and Storage.

Looking for relevant DataCenter Whitepapers? Visit the SearchDataCenter.com Research Library.


Discuss This Answer


You must be logged-in to discuss a question. Log-in/Register

duduspace  |   Dec 21 2004  3:10AM GMT

DNS is one of the backbone services without which the internet would not work.
I will not try to explain DNS whithin this reply because you seem to want a detailed explanation of the service along with implementation and configuration issues.
I will however try to give you what I consider to be a roadmap towards approaching the service.
You can start with any study material on Network + i.e. Sybex, Coriolis e.t.c.(any good book will definitely have a chapter covering the basics of DNS)
You can from there learn more about Windows 2000 DNS (which comes with virtually all Windows Servers I know) by picking up any study material covering Windows Network infrastructure Implementation and Administration (They will definitely have one or more chapters on the Windows DNS service. I used Windows 2000 but you might want to consider Windows 2003 to be current)
There are other advanced study guides dealing with DNS as a topic which you might also want to drill down into Any Linux +/RHCE study guide should also discuss BIND though I have not really followed that route.
Basically DNS is a name resolving service that transparently converts names like <a href="http://www.hotmail.com" rel="nofollow">www.hotmail.com</a> to ip addresses.

 

PeterMac  |   Dec 21 2004  7:25AM GMT

Last part of your question - How to use.
Not sure how complex an answer you want, but simple details as follows.
Two normal methods are :- Automatic discovery - default on all windows systems, requires a DHCP server supplying details of the DNS server to use - This is method used by all dialup ISP connections, and also by most systems running under a windows domain. The IP address of the DNS server is supplied at the same time as the IP address for your system.
You can also set your default DNS servers manually in the TCP properties settings along with the IP address. Remember your system must be able to route to this server, and vice versa.

 

Freejack  |   Dec 21 2004  12:06PM GMT

O’Reilly has an excellent book that not only explains DNS operation but also how to configure DNS servers, and a wealth of other information besides. The book is DNS and BIND, 4th Edition, ISBN number 0-596-00158-4. I’d recommend checking bookpool.com for the best price.

 

drmikec  |   Dec 21 2004  6:10PM GMT

Xevier,

I’m going to go a little simpler than the previous responses, although they were accurate. DNS is a very simple concept that is very complex in execution.

The internet doesn’t work with names, it works with numbers (IP addresses). DNS is a system to translate names to numbers. It begins when you register a domain name. You have to declare an authoritative name server (AS) for that domain. It will be responsible for knowing the IP addresses of all the named machines in that domain. The AS information is provided by the domain registrar to the root name servers, so, at last resort, a DNS request can go to the root servers and find an AS reference.

A domain name server is a machine on your network running BIND (named) or another name service or daemon. It is configured to know the IP address of all the named machines on your network, along with reverse lookups and root server information. When they are going out of your network, all the machines on your network will ask this machine for a name->address translation, and it will go out as far as necessary (even to the root servers) to find an authoritative source and return the IP address to the requesting machine. Also, it will be available to machines outside your network for when they need a name->address translation for one of your machines. As it collects the information, it will cache it in memory so it doesn’t have to ask every time. The configuration files include information about how long a lookup is valid, so it will only keep the info in the cache for that amount of time.

That, in a nutshell, is DNS. It is really much more complex than this explanation, but the concept is simple.

HTH.

-Mike

 

xevier  |   Dec 21 2004  11:20PM GMT

thanks to all of you for your kind replies,
but this much i knew .what i mean is that if suppose i wish to configure a DNS server of my own where should i start from.and after configuration how can i access and maintain my server.can you please help me?

 

PeterMac  |   Dec 22 2004  9:06AM GMT

You will need to configure your server to run DNS, done from the network settings (Advanced), Once DNS is installed you will have option to manage in Administrative tools. If you only want to run Internal DNS this is all that is required. If you want to support external DNS queries you will need an external IP address for the server, and will need to have a registered Domain Name where the DNS SOA entry is pointed to this IP address.
Is this sort of information you are looking for, can clarify if it is.

 

dwiebesick  |   Dec 22 2004  9:55AM GMT

DNS is too complex for a simple answer. Try some of these training llinks.

<a href="http://www.microsoft.com/windows2000/techinfo/training/w2kdnsts.asp" rel="nofollow">http://www.microsoft.com/windows2000/techinfo/training/w2kdnsts.asp</a>
<a href="http://www.microsoft.com/Windows2000/technologies/communications/dns/default.asp" rel="nofollow">http://www.microsoft.com/Windows2000/technologies/communications/dns/default.asp</a>
I especially recommend the following for someone new to DNS as it is a full training course on CD that you can build from an ISO image.
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;330511" rel="nofollow">http://support.microsoft.com/default.aspx?scid=kb;en-us;330511</a>
Just download and build the CD.

If you are thinking of hosting or developing a DNS that is exposed to the public internet, DON’t, you do not have the knowledge, experience and skills required. This information is for setting up a DNS for an internal (intranet) network.

Let us know more what your exact enviroment you are trying to create.

 

drmikec  |   Dec 22 2004  10:24AM GMT

There was good advice in a previous reply - if you don’t know exactly what you’re doing, you can get in over your head really quickly. Buy the O’Reilly book and study it. There really are no shortcuts.

There have been pointers for you on how to do DNS on Windows; if you’re considering Linux, check out this link: <a href="http://www.tldp.org/HOWTO/DNS-HOWTO.html" rel="nofollow">http://www.tldp.org/HOWTO/DNS-HOWTO.html</a>.
This describes implementing BIND (named), which is the defacto standard for the internet.

More specific information about exactly what you are trying to do will allow us to give more specific answers.