linux poison RSS
linux poison Email

How to test DNS server for host Resolution

The Domain Name System (DNS) is a standard technology for managing the names of Web sites and other Internet domains. DNS is an Internet service that translates domain names into IP addresses. Because domain names (example - google.com) are alphabetic, they're easier to remember. The Internet however, is really based on IP addresses. Every time you use a domain name, therefore, a DNS service must translate the name into the corresponding IP address. For example, the domain name www.google.com.com might translate to 209.85.153.104.

The DNS system is, in fact, its own network. If one DNS server doesn't know how to translate a particular domain name, it asks another one, and so on, until the correct IP address is returned.

There are a number of commands you can use do test the DNS server resolution.

The Host Command
host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments or options are given, host prints a short summary of its command line arguments and options.
# host www.google.com
google.com has address 209.85.153.104
To perform a reverse lookup
# host 209.85.153.104
104.153.85.209.in-addr.arpa domain name pointer bom01s01-in-f104.1e100.net.
As you can see, the forward and reverse entries don't match. The reverse entry matches the entry of the ISP.

The nslookup Command
Nslookup is a program to query Internet domain name servers. Nslookup has two modes: interactive and non-interactive. Interactive mode allows the user to query name servers for information about various hosts and domains or to print a list of hosts in a domain. Non-interactive mode is used to print just the name and requested information for a host or domain
#nslookup www.google.com
Server:         172.19.12.12
Address:        172.19.12.12#53

Non-authoritative answer:
www.google.com  canonical name = www.l.google.com.
Name:   www.l.google.com
Address: 209.85.153.104
To perform a reverse lookup
#nslookup 209.85.153.104
Server:         172.19.12.12
Address:        172.19.12.12#53

Non-authoritative answer:
104.153.85.209.in-addr.arpa     name = bom01s01-in-f104.1e100.net.
dig:
dig (domain information groper) is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than dig.
# dig www.google.com

; <<>> DiG 9.5.0-P2 <<>> www.google.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 22795
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.com.                        IN      A

;; ANSWER SECTION:
www.google.com.         85097   IN      CNAME   www.l.google.com.
www.l.google.com.       259     IN      A       209.85.153.104

;; Query time: 1 msec
;; SERVER: 172.19.12.12#53(172.19.12.12)
;; WHEN: Mon Jan 24 16:33:29 2011
;; MSG SIZE  rcvd: 68

Integrate Microsoft hosted Exchange for your business through Sherweb.



0 comments:

Post a Comment

Related Posts with Thumbnails