Dig Command Options and Examples
+ [No] query using TCP or without TCP
+ [No] VC provides options for compatibility with earlier versions. The same role as TCP options. VC stands for "virtual circuit"
+ [No] Ignore ignores the truncated UDP return package, instead of using a TCP connection to retry. By default, TCP connections are used for retry.
+ [No] nssearch queries the authorization resolution server records containing the domain name information, and displays the SOA record items in the domain name records of each server.
+ [No] Trace enables domain name authorization chain tracking. Disabled by default. After the DNS is enabled, the parser starts from the root domain name and initiates a domain name resolution query step by step based on the returned domain name NS record information and displays the results.
Example:
Query in TCP mode:
Dig oschina.net + TCP
Query SOA records:
Dig oschina.net + nssearch
Step-by-Step query from the root domain name:
Dig oschina.net + trace
Specify query record items:
Dig oschina.net type
Type can be a, AAAA, any, MX, NS, SOA, and other standard record items. If not specified, a record is queried by default.
Example:
Query a records:
Dig oschina.net
Query any records:
Dig oschina.net any
Query MX records:
Dig oschina.net MX
DNS server used for query
Dig @ server name
Example: Dig @ 114.114.114.114 oschina.net
Dig @ ns1.dnsv2.com oschina.net
Reverse DNS query
Dig-x 202.108.22.220
Reference: http://linux.die.net/man/1/dig
Dig Command Options and Examples