dig commonly used command interpreter

@ <Server address>: Specifies the DNS domain name server;
Example: dig @ 1.2.4.8 www.baidu.com

-b <ip-address>: When the host has multiple IP addresses, specify the IP address of the machine which sends a domain name query request to a domain name server;
-f <file name>: Specifies dig run in batch mode, the specified file task information stored in the DNS needs batch query;
-P: specify the domain name server port number;
-t <type>: Specifies the type of DNS data to be queried;
-x <IP address>: perform reverse domain Name Search;
- 4: using the IPv4;
-6: using the IPv6;
-H: displaying help information instruction.


Examples:

C: \ the Users \ FFHK> DIG @ 1.2.4.8 www.baidu.com

; <<>> DiG 9.15.3 <<>> @1.2.4.8 www.baidu.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 19403
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 5, ADDITIONAL: 6

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;www.baidu.com. IN A

;; ANSWER SECTION:
www.baidu.com. 229 IN CNAME www.a.shifen.com.
www.a.shifen.com. 216 IN A 61.135.169.125
www.a.shifen.com. 216 IN A 61.135.169.121

;; AUTHORITY SECTION:
a.shifen.com. 101 IN NS ns1.a.shifen.com.
a.shifen.com. 101 IN NS ns2.a.shifen.com.
a.shifen.com. 101 IN NS ns3.a.shifen.com.
a.shifen.com. 101 IN NS ns4.a.shifen.com.
a.shifen.com. 101 IN NS ns5.a.shifen.com.

;; ADDITIONAL SECTION:
ns1.a.shifen.com. 262 IN A 61.135.165.224
ns2.a.shifen.com. 200 IN A 220.181.33.32
ns3.a.shifen.com. 36 IN A 112.80.255.253
ns4.a.shifen.com. 516 IN A 14.215.177.229
ns5.a.shifen.com. 36 IN A 180.76.76.95

Query Time ;;: 27 msec
;; SERVER: 1.2.4.8 # 53 (1.2.4.8)
;; the WHEN: Wed Sep 04 20:12:48 China Standard Time 2019
;; the MSG SIZE RCVD: 271

Guess you like

Origin blog.51cto.com/63736/2435598