Friday, December 3, 2010

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 mental of the buildings of the Dns, fantasize an inverted tree. Each field of the tree is within a zone of authority; however, complicated branches of the tree can be within a singular zone.

Mail Server Host

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

Fun with Dns: Three useful Commands

If you query a name server not authoritative for a singular zone, that name server will most likely have new 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 description is to try each of the commands listed on a domain name, so you can see what the yield 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 deal with e-mail delivery; the priority (pri) amount indicates the order in which mail servers are used, with the bottom amount receiving the top 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 settle the Ip address of a hostname:

: host [http://www.your-domain-name.com]

The -a choice will return all of the Dns information in verbose format.

: host -a [http://www.your-domain-name.com]

Now that you know the Ip address for [http://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 swiftly settle 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 [http://www.your-domain-name.com] @ns.your-host.com

Dig can provide yield 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 beneficial 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 yield formatted for the zone file:

: dig -x Ip-Address

nslookup

You can use this tool as a singular 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 pick the server (name server) you want to query, and you can settle the type of Dns information on which to focus.

Just as you can issue commands to nslookup interactively, you can also turn the first defaults by beginning 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 description should provide you sufficient information to get started or offer a quick refresher if you already use these commands.

look out djia futures

No comments:

Post a Comment