温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

验证DNS的命令

发布时间:2020-06-11 21:52:33 来源:网络 阅读:455 作者:lujj45 栏目:系统运维

验证DNS的命令

试验环境
域名服务器: dns3sv.te 192.168.1.65
数据服务器1:bsdb1.te 192.168.15.1
数据服务器2:bsdb2.te 192.168.15.2

DNS检验命令有host,nslookup,dig,ping等。

1.host命令

[root@dns3sv named]# host dns3sv.te
dns3sv.te has address 192.168.1.65

[root@dns3sv named]# host 192.168.1.65
65.1.168.192.in-addr.arpa domain name pointer dns3sv.te.

[root@dns3sv named]# host bsdb1.te
bsdb1.te has address 192.168.15.1

[root@dns3sv named]# host 192.168.15.2
2.15.168.192.in-addr.arpa domain name pointer bsdb2.te.

2.nslookup命令

[root@dns3sv ~]# nslookup zsdb1.te
Server: 192.168.1.65
Address: 192.168.1.65#53

Name: zsdb1.te
Address: 192.168.15.5

[root@dns3sv ~]# nslookup zsdb1.ab
Server: 192.168.1.65
Address: 192.168.1.65#53

** server can't find zsdb1.ab: REFUSED

3.dig命令

[root@dns3sv ~]# dig zsdb2.te

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6 <<>> zsdb2.te
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24888
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;zsdb2.te. IN A

;; ANSWER SECTION:
zsdb2.te. 604800 IN A 192.168.15.6

;; AUTHORITY SECTION:
bj. 604800 IN NS dns3sv.te.

;; ADDITIONAL SECTION:
dns3sv.te. 604800 IN A 192.168.1.65

;; Query time: 0 msec
;; SERVER: 192.168.1.65#53(192.168.1.65)
;; WHEN: Thu Sep 11 09:48:06 2014
;; MSG SIZE rcvd: 81

// 604800秒=7天
// 259200秒=3天

[root@dns3sv ~]# dig .te
dig: '.te' is not a legal name (unexpected end of input)
[root@dns3sv ~]# dig A1.te

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6 <<>> A1.te
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 13154
;; flags: qr aa rd; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;A1.te. IN A

;; AUTHORITY SECTION:
bj. 259200 IN SOA dns3sv.te. root.te. 2014091001 21600 10800 604800 259200

;; Query time: 0 msec
;; SERVER: 192.168.1.65#53(192.168.1.65)
;; WHEN: Thu Sep 11 09:49:40 2014
;; MSG SIZE rcvd: 71

4.ping命令

[root@dns3sv ~]# ping dns3sv.te
PING dns3sv (192.168.1.65) 56(84) bytes of data.
64 bytes from dns3sv (192.168.1.65): icmp_seq=1 ttl=64 time=0.027 ms
64 bytes from dns3sv (192.168.1.65): icmp_seq=2 ttl=64 time=0.016 ms
64 bytes from dns3sv (192.168.1.65): icmp_seq=3 ttl=64 time=0.016 ms
64 bytes from dns3sv (192.168.1.65): icmp_seq=4 ttl=64 time=0.015 ms
^C

// Ok

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI