How DNS Resolves Names and IP Address

DNS definition: DNS(domain name service) translates the computer name into an IP address. When a user make a request by typing the URL(www.hubpages.com) in the browser and get back the website on screen, actually a DNS server receive the request of the URL and translate is into an IP “66.111.109.13” what is the actual address of the site.So we can say that hubpages.com=66.111.109.13. Since it's much easier for human mind to remember a name rather than a long number that's why we use DNS to translate the name of a site into an IP address what Internet actually understand and can deal with.


How DNS Resolves Names

DNS can answer three types of queries that a user can make to a DNS server: recursive, iterative, and inverse. The client of a DNS server can be a resolver (what you’d normally call a client/user) or another DNS server.

Before knowing exactly how DNS works one need to be familiar with the following terms like resolvers, clients, root servers, DNS zones.

Clients

A DNS client is any machine issuing queries to a DNS server. The client hostname mayor may not be registered in a name server (DNS) database. Clients issue DNS requests (e.g hubpages.com)through processes called resolvers which resides in the client machines.

Resolvers

The resolvers handle the process of mapping a symbolic name(e.g. hubpages.com) to an actual network address (66.111.109.13). The resolver (which may reside on another machine) issues queries to name servers. When a resolver receives information from name servers, it caches that information locally(on your own computer) in case the same information is requested again.

Root servers

When a DNS server processes a recursive query and that query cannot be resolved from local zone files, the query must be escalated to a root DNS server. The root server is responsible for returning an authoritative answer for a particular domain or a referral to aserver that can provide an authoritative answer. Because each DNS server is supposed to havea full set of root hints (which point to root servers for various top-level domains), your DNSserver can refer queries recursively to other servers with the assistance of the root servers.

DNS Zones

All DNS servers work together to resolve hierarchical names. If they already have information about a name(e.g. cnn.com), they simply fulfill the query for the client; otherwise, they query other DNS servers for the appropriate information. The system works well because it distributes the authority of separate parts of the DNS structure to specific servers. A DNS zone is a portion of the DNS namespace over which a specific DNS server has authority.

Below figure shows an example of both recursive and iterative queries. In this example, a user within his office is querying its DNS server for the IP address for hubpages.com. Here’s what happens to resolve the request:


How Dns Resolves Names - Windows DNS Name Resolution - IP Address Resolution Process
How Dns Resolves Names - Windows DNS Name Resolution - IP Address Resolution Process

how to use ipconfig command line utility

What happens when DNS resolve the request

1. The resolver sends a recursive DNS query to its local DNS server asking for the IP address of hubpages.com. The local name server is responsible for resolving the name and cannot refer the resolver to another name server.

2. The local name server checks its zones and finds no zones corresponding to the requested domain name.

3. The root name server has authority for the root domain and will reply with the IP address of a name server for the Com top-level domain.

4. The local name server sends an iterative query for hubpages.com to the Com name server.

5. The Com name server replies with the IP address of the name server servicing the hubpages.com domain.

6. The local name server sends an iterative query for hubpages.com to the hubpages.com name server.

7. The hubpages.com name server replies with the IP address corresponding to hubpages.com

8. The local name server sends the IP address of hubpages.com back to the original resolver.

You can use the command-line tool ipconfig to view your DNS client settings.The commands are:

ipconfig/all
Display all information about your DNS
ipconfig/flushdns
Flushes and resets the DNS resolver cache.
ipconfig/registerdns
Refreshes all DHCP leases and registers any related DNS names..
ipconfig/displaydns
Displays the contents of the DNS resolver cache.

nslookup is a utility mostly used to troubleshoot DNS related problems. You can use nslookup for manual name resolution queries against DNS servers and get information about the DNS configuration of your computer or specify what kind of DNS record should be resolved.

To open nslookup go to your computer start menu,click Run and type 'cmd'.A command line window will pop up.In the command prompt type nslookup and press enter and type

set type=any  ,now type any site name you are interested in.For details please see the below picture.


More by this Author


Comments 9 comments

Waren E profile image

Waren E 6 years ago from HAS LEFT THE BUILDING............

Hey that's some high secrets your revealing there man,

thanks for sharing!


Lady_E profile image

Lady_E 6 years ago from London, UK

More important info. You know what they say - Knowledge is Power. Thanks for sharing. :)

Ps. I like that Table.


WebMag profile image

WebMag 6 years ago

This is excellent article with in depth information about the subject. I must say I'm amazed.


andromida profile image

andromida 6 years ago Author

Thanks Warren for stopping by,now DNS is not a secret to you.You can try the commands in your command prompt.It's fun.


andromida profile image

andromida 6 years ago Author

Lady_E thanks for visit,it's very true knowledge is power,I am getting free knowledge online everyday,wow,that's the beauty of 21st Century.


andromida profile image

andromida 6 years ago Author

Thanks gejindermaakan,you are already an IT boss.

WebMag-I am glad that you liked it.thanks for stopping by.


Dinesh Jain 5 years ago

Gr8 explaination of the concept. Thanks!


8 liner boards 3 years ago

I always had some confusion related to DNS and IP address but thanks to your write up, it has been solved. Thank you so much for sharing such a well written piece.


cracklight 19 months ago

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working