当前位置: 代码迷 >> 综合 >> DNS 解析调试(dig nslookup)
  详细解决方案

DNS 解析调试(dig nslookup)

热度:59   发布时间:2023-12-28 04:19:36.0

DNS类型

A:查看主机的IPv4地址
AAAA:查看主机的IPv6地址
ANY:查看关于主机域的所有信息
CNAME:查找与别名对应的正式名字
HINFO:查找主机的CPU与操作系统类型
MINFO:查找邮箱信息
MX:查找邮件交换信息 
NS:查找主机域的域名服务器
PTR:查找与给定IP地址匹配的主机名
RP:查找域负责人记录
SOA:查找域内的SOA地址
UINFO:查找用户信息

工具

nslookup

└─# nslookup www.baidu.com 114.114.114.114
Server:		114.114.114.114
Address:	114.114.114.114#53Non-authoritative answer:
www.baidu.com	canonical name = www.a.shifen.com.
Name:	www.a.shifen.com
Address: 14.215.177.38
Name:	www.a.shifen.com
Address: 14.215.177.39

dig

└─# dig  baidu.com @114.114.114.114 ; <<>> DiG 9.16.15-Debian <<>> baidu.com @114.114.114.114
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 23333
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;baidu.com.			IN	A;; ANSWER SECTION:
baidu.com.		177	IN	A	39.156.69.79
baidu.com.		177	IN	A	220.181.38.148└─# dig +trace baidu.com @114.114.114.114; <<>> DiG 9.16.15-Debian <<>> +trace baidu.com @114.114.114.114
;; global options: +cmd
.			45	IN	NS	m.root-servers.net.
.			45	IN	NS	c.root-servers.ne
***
***
***3kT+1x X9PsETUrS85JYpkLRNRaYmsaFG1zcZbtuJNncnVNIVKy3U+v6lQ54Y3M s2aTx3WSaF42XTSVIvAUyNGPR9PbbK3+rt8vaIO0YIoHyThS/ElaXoQP /jRn+vZCuqO/gsy725yzksdscYHqGXGdXp0WA+YK8OW/aQ==
;; Received 757 bytes from 192.55.83.30#53(m.gtld-servers.net) in 212 msbaidu.com.		600	IN	A	220.181.38.148
baidu.com.		600	IN	A	39.156.69.79
baidu.com.		86400	IN	NS	ns7.baidu.com.
baidu.com.		86400	IN	NS	ns4.baidu.com.
baidu.com.		86400	IN	NS	ns3.baidu.com.
baidu.com.		86400	IN	NS	dns.baidu.com.
baidu.com.		86400	IN	NS	ns2.baidu.com.
;; Received 240 bytes from 220.181.33.31#53(ns2.baidu.com) in 40 ms