欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  科技

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

程序员文章站 2023-02-26 11:52:19
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.... ......
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