Saturday, March 22, 2008

dig Tool

Run on Unix

The simple syntax:dig @server domain query-type

server - Server being queried. May be either a domain name or an IP address. If this optional field is omitted, dig will attempt to use the default name server for your machine. @ does not need to be used when server is in the second position after the command dig. This server could be a nameserver. It can be useful to see if both nameservers give the same MX records.

domain - The domain name for which you are requesting information. To use IP in this position, use the switch -x, ex.: dig argus.more.net -x 150.199.101.1

query-type is the type of information (DNS query type) that you are requesting. If omitted, the default is ``a'' (T_A = address). The standard specified types are recognized: a, any, cname, mx, na, soa.

Example: Assume that ns2.com is the secondary nameserver. It should give the same results as the primary nameserver when a dig is done.

dig ns1.com mydomain.com mx
dig ns2.com mydomain.com mx