美文网首页
CentOS 查询 DNS 命令

CentOS 查询 DNS 命令

作者: 埃尔温薛定谔不养猫 | 来源:发表于2020-04-30 15:17 被阅读0次

有以下三种方法可以查询 DNS 服务器地址

# 要安装 bind-utils 才能使用 dig 和 nsloopup 命令
[root@master-node ~]# yum install bind-utils
......
[root@master-node ~]# cat /etc/resolv.conf 
options timeout:2 attempts:3 rotate single-request-reopen
; generated by /usr/sbin/dhclient-script
nameserver 100.100.2.136
nameserver 100.100.2.138
[root@master-node ~]# 
[root@master-node ~]# dig | grep SERVER
;; SERVER: 100.100.2.136#53(100.100.2.136)
[root@master-node ~]# 
[root@master-node ~]# nslookup www.baidu.com
Server:         100.100.2.136
Address:        100.100.2.136#53

Non-authoritative answer:
www.baidu.com   canonical name = www.a.shifen.com.
www.a.shifen.com        canonical name = www.wshifen.com.
Name:   www.wshifen.com
Address: 103.235.46.39

相关文章

网友评论

      本文标题:CentOS 查询 DNS 命令

      本文链接:https://www.haomeiwen.com/subject/dynzwhtx.html