Sunday, 22 March 2015

DNS : Its working

 
In Network, the hosts primarily communicate between each other through IP addresses.
 
 For example, google search from your local PC, your computer is actually communicating with the IP address of one of the web servers of google.com. However, even if the computer is efficient with numbers, humans on the other hand work better with names. For this reason, the TCP/IP protocol includes the Domain Name System (DNS)  to link between IPs and computer names i.e. hostnames.
 
 The DNS is a distributed database of computers that is responsible for resolving hostnames against IP addresses and vice-versa.
Any DNS query involves two parts.
  1. The Resolver: The resolver forms up or initiates the query. The resolver itself does not run as a program. /etc/resolv.conf is an example of a resolver.
  2. Name Server: The Name Server is the service running in the server that responds to the DNS query generated by the resolver i.e. answers to the question of the resolver.
     =========
    1. nslookup
        >> nslookup followed by the domain name will display the “A Record” ( IP Address ) of the domain.

    Eg: nslookup redhat.com
    2. Query the MX Record using -query=mx
    nslookup -query=mx redhat.com

    nslookup -type=ns redhat.com
    nslookup -type=soa redhat.com
    nslookup -type=any google.com
    nslookup 209.132.183.181
    nslookup redhat.com ns1.redhat.com
    nslookup -port 56 redhat.com
    nslookup -timeout=10 redhat.com


    dig Hostname
    dig DomaiNameHere
    dig @DNS-server-name Hostname
    dig @DNS-server-name IPAddress
    dig @DNS-server-name Hostname|IPAddress type

    For more info
    Please visit

    http://www.cyberciti.biz/faq/linux-unix-dig-command-examples-usage-syntax/
     

No comments:

Post a Comment