Home | Site Map           
   
     

Fun with DNS: Three Useful Commands


The DNS is a distributed, hierarchical database where authority flows from the top (or root) of the hierarchy downward.

When thinking of the structure of the DNS, imagine an inverted tree. Each branch of the tree is within a zone of authority; however, multiple branches of the tree can be within a single zone.

The software (Bind being the most common) that stores domain name information is called a domain name server. A single name server can be authoritative for multiple zones. All zones have a primary master and a secondary master name server that provides authoritative responses for their zones.

If you query a name server not authoritative for a particular zone, that name server will most likely have up-to-date information. This is because zone information propagates throughout the Internet at regular intervals, and name servers cache zone information for which they are not authoritative.

DNS Commands

There are three crucial commands that can put all the DNS information you need at your fingertips. The way to use this article is to try each of the commands listed on a domain name, so you can see what the output looks like. Learn by doing!

Zone file database records divide DNS information into three primary types: NS (Name Server) records, MX (Mail Exchange) records, and A (Address) records. NS records indicate the name servers. MX records indicate the hosts that handle e-mail delivery; the priority (pri) number indicates the order in which mail servers are used, with the lowest number receiving the highest priority. The A (Address) records map hostnames to IP addresses, the real names of machines.

host

This is the simplest of the DNS commands. It is a quick way to determine the IP address of a hostname:

: host www.your-domain-name.com

The -a option will return all of the DNS information in verbose format.

: host -a www.your-domain-name.com

Now that you know the IP address for www.your-domain-name.com, try a reverse lookup.

: host IP-ADDRESS

dig (domain information groper)

This command gathers and returns DNS information in a format the name server can use directly. You will find it easy to query specific name servers with dig.

You can quickly determine the Name servers of your host or any other host:

: dig ns your-host.com

Then you check your (or another) website against the host's name servers:

: dig www.your-domain-name.com @ns.your-host.com

Dig can provide output that is in the same format as the zone file itself. Here is how to get the whole zone file:

: dig any your-domain-name.com

Here are the most useful dig query types: dig any (gathers all DNS information), dig ns (gathers name server information), dig mx (gathers mail exchanger information) and dig a (gathers network address information).

The dig command can also do reverse lookups with output formatted for the zone file:

: dig -x IP-Address

nslookup

You can use this tool as a single line command, or you can use it interactively, which distinguishes it from the other DNS commands. Once you have started nslookup, type set all to list the default options. As with dig you can choose the server (name server) you want to query, and you can decide the type of DNS information on which to focus.

Just as you can issue commands to nslookup interactively, you can also change the initial defaults by starting a .nslookuprc file. The format of the .nslookup is one command per line:

set type=NS
set domain=srvns.your-host.com
set timeout=10

Conclusion

These three commands can provide you with most of the information you need about your domain names. They are powerful tools, and this article should provide you enough information to get started or offer a quick refresher if you already use these commands.

About the Author:

Dan Forootan founded EZ Publishing, Inc. in 1998. EZ Publishing's Small Business Web Hosting provides the essential tools for using the Web as a marketing tool. The package includes web hosting, the StreamSend permission-based email marketing solution. Please email questions or comments about this article to articles@ezpublishing.com. Thank you.


MORE RESOURCES:

Yahoo! News Search Results for URL
Yahoo! News Search Results for URL

Happy New Year! Now Get a Divorce (Seattlest)
The above "dramatization" shows just how local attorney J. Michael Gallagher can help you get 2009 off to a good start: by dissolving your loveless marriage. We were so entranced by this low-tech, low-class advertisement (h/t Videogum ) that we just *had* to visit this sleazebag's website with the wonderful url DontBeAWeekendParent.com (pop-up alert). There we found out that ...
Open Office Documents from Gmail Without Google Docs [Gmail Tip] (Lifehacker)
A simple URL edit can open attached Office docs from Gmail in a sleek viewer, rather than the sometimes funky HTML option. The Google Operating System blog points out that Google's...
Kakuteru: A Blogging and Lifestreaming Mashup (+Invites) (ReadWriteWeb)
What do you get when you combine blogging and lifestreaming? You get Kakuteru , a semantic blogging mashup with funny name. The service imports your activity streams from FriendFeed and combines them with longer articles you write yourself. After you set up your Kakuteru site, its URL can then be hidden behind a domain name of your choosing so it appears as if it's your own blog. ...
Kankuteru: A Blogging and Lifestreaming Mashup (+Invites) (ReadWriteWeb)
What do you get when you combine blogging and lifestreaming? You get Kankuteru , a semantic blogging mashup with funny name. The service imports your activity streams from FriendFeed and combines them with longer articles you write yourself. After you set up your Kakuteru site, its URL can then be hidden behind a domain name of your choosing so it appears as if it's your own blog. ...
Minoru 3D Webcam ships this week, still looks freaky (Engadget)
digg_url = 'http://digg.com/gadgets/Minoru_3D_Webcam_ships_this_week_still_looks_freaky'; In case you haven't noticed, 3D is the topic of this year's CES. And we're not talking about 3D HDTVs exclusively -- we're talking about 3D figurines that double as webcams. To be quite honest, the USB 2.0 Minoru 3D Webcam is ripe for a Billy Mays plug, but considering that he's charging ...
The Ridgefield Symphony (Fairfield County Weekly)
Normal 0 MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:"";...
Hype Machine Zeitgeist: Listen in Full to the 50 Most Blogged Albums of 2008,...
Music mashup site shows how User Experience is done. digg_url = 'http://digg.com/music/Hype_Machine_Listen_in_Full_to_the_50_Most_Blogged_Albums';digg_bgcolor = '#ffffff';digg_skin = 'normal'; MP3 blog aggregator Hype Machine launched a new microsite today called the Music Blog Zeitgeist . There you can listen, for free, to entire albums from the most blogged-about musicians of ...
Atlanta Councilmen: Down With Sagging Pants (Georgia Public Broadcasting News)
Normal 0 false false false MicrosoftInternetExplorer4 st1\:*{behavior:url(#ieooui) } /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; ...
Twitter Hack: How It Happened and What's Being Done (PC World via Yahoo! News)
Twitter is tackling a series of security issues, starting with a hack that hit some well-known celebrity accounts. Someone broke into Twitter accounts belonging to President-elect Barack Obama, CNN anchor Rick Sanchez, and Britney Spears over the weekend. At the same time, a phishing scam is trying to trick regular users into handing over their passwords and compromising their profiles.
10 Free Music Based Games for the iPhone & iPod Touch (Mashable)
digg_url = 'http://mashable.com/2009/01/05/free-iphone-music-games/'; digg_title = '10 Free Music Based Games for the iPhone & iPod Touch'; digg_bodytext = 'Music-based games like Guitar Hero and Rock Band have become wildly popular, so it only makes sense that similar games are being created for the iPhone and iPod Touch. Both devices have a plethora of gaming apps, but only a ...

 

 

Foto Log | Perfect Laptop | Webdesign Place

Copyright © 2008 All Rights Reserved URLMaster.com