How DNS Resolves Names and IP Address
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 “126.96.36.199” what is the actual address of the site.So we can say that hubpages.com=188.8.131.52. 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.
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.
The resolvers handle the process of mapping a symbolic name(e.g. hubpages.com) to an actual network address (184.108.40.206). 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.
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.
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 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:
Display all information about your DNS
Flushes and resets the DNS resolver cache.
Refreshes all DHCP leases and registers any related DNS names..
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.