How DNS Work

February 11, 2007 by hejian

What are Name servers doing

Naver servers do two things all day long:

  • The accept requests from programs to convert domain names into IP addresses.
  • They accept requests from other name servers to convert domain names into IP addresses.

When a request comes in, the name server can do one of four things with it:

  • It can answer the request with an IP address because it already knows the IP address for the domain.
  • It can contact another name server and try to find the IP address for the name requested. It may have to do this multiple times.
  • It can say, “I don’t know the IP address for the domain you requested, but here’s the IP address for a name server that knows more than I do.
  • I can return an error message because the requested domain name is invalid or does not exist.

Authoritative DNS Servers

Authoritative servers provide the definitive information for your DNS domain, such as the names of servers and Web sites in it. They are the last word in information related to your domain.

How DNS Servers Find Out Your Site Information

There are 13 root authoritative DNS servers (super duper authorities) that all DNS servers query first. These root servers know all the authoritative DNS servers for all the main domains - .com, .net, and the rest. This layer of servers keep track of all the DNS servers that Web site systems administrators have assigned for their sub domains.

For example, when you register your domain my-site.com, you are actually inserting a record on the .com DNS servers that point to the authoritative DNS servers you assigned for your domain. (More on how to register your site later.).

Create a New Domain Name

When someone wants to create a new domain, he or she has to do two things:

  • Find a name server for the domain name to live on.
  • Register the domain name.

Get a name server for a domain

There are two ways to get a name server for a domain:

  • You can create and administrater it yourself.
  • You can pay an ISP or hosting company to handle it for you.

Most larget companies have their own domain name servers. Most smaller companies pay someone.

Own or register a DNS

You do not need to own or register your own DNS (domain name servers) in order to register a domain name or to sign up for email or Web hosting services.

In the same way that a domain name must be registered with a central registry to be recognized on the Internet, DNS (domain name servers) must also be registered with a central registry.

You must actually have a DNS in operation at a dedicated and unique IP Address (that is not yet registered as a DNS server) in order for the DNS server registration to be completed.

When To Use A DNS Caching Name Server

Most servers don’t ask authoritative servers for DNS directly, they usually ask a caching DNS server to do it on their behalf. These servers, through a process called recursion, sequentially query the authoritative servers at the root, main domain and sub domain levels to get eventually get the specific information requested. The most frequently requested information is then stored (or cached) to reduce the lookup overhead of subsequent queries.

If you want to advertise your Web site www.my-site.com to the rest of the world, then a regular DNS server is what you require. Setting up a caching DNS server is fairly straightforward and works whether or not your ISP provides you with a static or dynamic Internet IP address.

After you set up your caching DNS server, you must configure each of your home network PCs to use it as their DNS server. If your home PCs get their IP addresses using DHCP, then you have to configure your DHCP server to make it aware of the IP address of your new DNS server, so that the DHCP server can advertise the DNS server to its PC clients. Off-the-shelf router/firewall appliances used in most home networks usually can act as both the caching DNS and DHCP server, rendering a separate DNS server is unnecessary.

When To Use A Static DNS Server

If your ISP provides you with a fixed or static IP address, and you want to host your own Web site, then a regular authoritative DNS server would be the way to go. A caching DNS name server is used as a reference only, regular name servers are used as the authoritative source of information for your Web site’s domain.

Note: Regular name servers are also caching name servers by default.

Leave a Reply

You must be logged in to post a comment.

Wordpress template made by HeJian