Linux.com offers a tutorial on "dig", a utility to harvest DNS information.
Have you ever wanted to query the Domain Name System (DNS) to discover what information it holds about your domain? Do you have some important changes to make to your DNS records and need a way to verify your changes? Here's how to check your DNS records with a tool called dig.
DNS is an Internet service that translates domain names into IP addresses. Each time you use a domain name, DNS translates the name into the corresponding IP address. In order to do the translation DNS holds records for each domain. The most important are the A, CNAME, and MX records. The A record stores the host IP address. The CNAME is an alias record, which is used to give multiple aliases to a single computer. The MX record is the mail exchange record, which tells mail servers how to route email for this domain.
For example, the DNS record for www.newsforge.com looks like this:
www.newsforge.com CNAME newsforge.com.
newsforge.com A 66.35.250.177
This says that www.newsforge.com is an alias for newsforge.com and that newsforge.com has the IP address 66.35.250.177. If you want to read newsforge.com with your Web browser, your computer will query DNS for the IP address and then make a connection over the Internet to the Web server at that address and start downloading the page.