Thursday, November 29, 2007

DNS Server Tutorial ( How Tos)

Domain name servers translate domain names to IP addresses. Because domain names are alphabetic, they're easier to remember. The Internet however, is really based on IP addresses. Every time you use a domain name, therefore, a DNS service must translate the name into the corresponding IP address. For example, the domain name www.example.com might translate to 198.105.232.4.

The DNS system is, in fact, its own network. If one DNS server doesn't know how to translate a particular domain name, it asks another one, and so on, until the correct IP address is returned.

Let's dig into the process of how that works. Let's use the example that Scott types "www.onlyonecreations.com" into his web browser. How does his PC find the web server that has the page he's looking for, among the thousands of web servers?

Scott types in www.onlyonecreations.com to his browser.

Scott's PC looks at it's configuration. It will find something called "DNS Server" or "name server" and there will be an IP address associated with that. Let's say it is 198.6.1.1. Scott's PC sends a message to 198.6.1.1 and asks "I am looking for the IP address of www.onlyonecreations.com, can you tell me what it is?"


The DNS Server (198.6.1.1) gets the message, and assuming that the server already knows what the IP address of www.onlyonecreations.com is, it tells Scott's PC that the IP address is 64.17.143.84. I will get into considerable more depth about the DNS server, how it works, and why it is important to a web site owner, a little later.


Scott's PC gets the message that the IP address of www.onlyonecreations.com is 64.17.143.84. So his PC sends a message to 64.17.143.84 and asks "send me the default web page at 64.17.143.84".


The web server (whose IP address is 64.17.143.84) sends the web page to your browser. That is a simplistic example of how your PC finds a particular web-server and web page. The process of matching a domain name to a IP address is called resolving. So your PC resolves the IP address from the domain name. Let's get into a little more detail.

For step 1, how does Scott's PC know that the IP address of the DNS Server is? There are 2 ways it learns what the address is. The first is that Scott asked his ISP what the address was, and entered it himself. There are times manually entering (also known as statically entering) the address is necessary or desirable, but usually the ISP automatically tells your PC what the IP address of the DNS server is.

This process is called "DHCP" or Dynamic Host Configuration Protocol. When you select "Obtain IP address automatically" in your windows Network connections page, you are telling your PC to use DHCP and to ask the ISP to give you the DNS Server address (among a bunch of other things).

In step 3, we assumed that the DNS server already knew what the IP address of www.onlyonecreations.com was.


What if it didn't already know?


Let's assume that the DNS server Scott's PC sent a request to, doesn't know where www.onlyonecreations.com is.

Have you ever noticed that there are only so many variations of the end of the domain name? There are .com, .gov, .net, .org, .us, .biz, among others. When a DNS server receives a request to resolve an IP address (translate from a domain name to a IP address) for a domain that it doesn't know the answer to, it sends a message to any one of a small number of servers. That small number of servers are responsible for knowing what the "authoritative server" is for EVERY domain name. A realm would be .com, or .org for example, and is properly called a top-level domain.

What is an authoritative server? An authoritative server is a DNS server that has a Statement of Authority configured for a particular domain name. That means that the server has absolute and total knowledge of the domain, any information that contradicts the information that the server has is wrong, it is the final word.

This becomes more important a little later. For purposes of this discussion, let's ignore backup authoritative servers.

The message that Scott's DNS server sends to the top-level domain server "what is the authoritative server for onlyonecreations.com?". It is important to understand, that Scott's DNS Server is NOT asking "what is the IP address of the web server for onlyonecreations?". It is only asking "where do I go to find out where the web server for onlyonecreations.com is?"

Once Scott's DNS server knows where to go to get the answer for Scott's request, it sends a message to the authoritative server asking "what is the IP address of the web server for onlyonecreations.com?". The authoritative server responds, and Scott's DNS Server tells Scott's PC the IP address it needs to connect Scott to the webpage he is looking for.

To summarize the past few paragraphs, Scott's DNS server receives a request for an IP address that it doesn't know. That server makes a request of a top-level domain server, and gets a response with where to go to get the information that Scott is requesting. The DNS server then makes a request of the authoritative server, and forwards the answer it receives to the PC that made the first request.

It sounds long and complex, but it happens very quickly. One way to speed up the process is called caching. Caching is where the DNS server remembers the response from the authoritative server for a period of time. So if Bob makes the same request 5 minutes after Scott did, the DNS server doesn't have to repeat the whole process. Caching will be brought up again in a bit.

So we learned how your PC finds out where it needs to go to get to specific web page.

Ref: http://www.gnc-web-creations.com/dns-tutorial.htm

For Other Tutorials Please visit my profile:

Good Sites :

http://ccna2ccna.googlepages.com/

http://networkingtutorial.googlepages.com/

















 


























No comments: