Resolving DNS names to IP addresses | working of dns server

In this tutorial, we learn how the resolving dns names to ip addresses takes place. We will see how a dns query actually traverse from your computer for name resolution.

Resolving dns names to ip addresses

When you type www.yahoo.com into a web browser, the application has to find out IP address associated with www.yahoo.com. Each part of network has DNS server or name servers. Each application send a request called dns lookup to DNS server. Each DNS server has limited information about host names and ip address. Almost all DNS server constantly query each other to get information using root servers.

Each computer is configured to query specific name server. Usually home computers are configure to query ISP name servers or free dns name servers. Here is a typical UNIX / Linux /etc/resolv.conf file with nameserver IP address.

$ cat /etc/resolv.conf 

Sample output: 
nameserver 208.67.222.222 
nameserver 208.67.220.220


Each application can find www.yahoo.com IP address by sending a request to 208.67.222.222 or 208.67.220.220 IP address. This procedure is called hostname resolution and the algorithm that performs this operation is called the resolver. Let us see how to find out IP address for www.useoflinux.com hostname:

1. The TXR web browser will check local cache database to find out answer. If it can get an answer directly from these, it proceeds no further.

2. Otherwise request will be sent to nameserver IP 208.67.222.222 to find IP address for www.useoflinux.com host.

3. 208.67.222.222 server will decide if that IP has been recently looked up before. If it has, there is no need to ask further, since the result would be stored in a local cache.

4. 208.67.222.222 will see if the domain is local. I.e. if it is a computer that it has direct information about. In this case this would only be true if the 208.67.222.222 were Obsidian’s very own name server.

5. 208.67.222.222 will strip out the TLD (Top Level Domain) .in It will query a root name server, asking what name server is responsible for .IN. Depend upon the answer 208.67.222.222 will query authoritative server for IP address.

6. 208.67.222.222 will return the result to the application.

7. 208.67.222.222 will store each of these results in a local cache with an expiry date. To avoid having to look them up a second time. Please note that end users generally do not communicate directly with a DNS resolver. Instead DNS-resolution takes place transparently in client-applications such as web-browsers, mail-clients, and other Internet applications. When an application makes a request which requires a DNS lookup, such programs send a resolution request to the local DNS resolver in the local operating system, which in turn handles the communications required. All you have to do is configure your system for Resolving dns names to ip addresses.

Conclusion

 This is the detailed explanation for resolving dns name to ip addresses whenever you do a dns query while browsing on the internet.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments