[Linux] host dig nslookup查询域名的DNS解析

时间:2024-08-12 15:35:44
root@VM-38-204-ubuntu:~# host baidu.com
baidu.com has address 220.181.57.216
baidu.com has address 123.125.114.144
baidu.com mail is handled by 15 mx.n.shifen.com.
baidu.com mail is handled by 20 mx1.baidu.com.
baidu.com mail is handled by 20 jpmx.baidu.com.
baidu.com mail is handled by 20 mx50.baidu.com.
baidu.com mail is handled by 10 mx.maillb.baidu.com.
root@VM-38-204-ubuntu:~# dig baidu.com

; <<>> DiG 9.10.3-P4-Ubuntu <<>> baidu.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 12243
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;baidu.com. IN A ;; ANSWER SECTION:
baidu.com. 547 IN A 220.181.57.216
baidu.com. 547 IN A 123.125.114.144 ;; Query time: 0 msec
;; SERVER: 10.236.158.106#53(10.236.158.106)
;; WHEN: Wed Apr 17 11:19:07 CST 2019
;; MSG SIZE rcvd: 70
root@VM-38-204-ubuntu:~# nslookup baidu.com
Server: 10.236.158.106
Address: 10.236.158.106#53 Non-authoritative answer:
Name: baidu.com
Address: 220.181.57.216
Name: baidu.com
Address: 123.125.114.144