用bat脚本,测试DNS信息失效时长-成都创新互联网站建设

关于创新互联

多方位宣传企业产品与服务 突出企业形象

公司简介 公司的服务 荣誉资质 新闻动态 联系我们

用bat脚本,测试DNS信息失效时长

用bat脚本,测试DNS信息失效时长。

CentOS6.4中named.xx.zone的配置:
$TTL=7D
3D ; minimum

我们提供的服务有:成都网站设计、成都网站制作、微信公众号开发、网站优化、网站认证、梅列ssl等。为上千家企事业单位解决了网站和推广的问题。提供周到的售前咨询和贴心的售后服务,是有科学管理、有技术的梅列网站制作公司

测试结果:停止DNS服务,未达到设定的3天的最小期限,DNS信息就失效了。
或者客户端windows2003重启后,DNS信息失效。

1.重启DNS服务
[root@dns3sv named]# service named restart
Stopping named: .[ OK ]
Starting named: [ OK ]

2.编辑bat脚本,并运行

登录DNS客户端。edit wping2h.bat

echo off
:while1
date /t & time /t & ping usdb1.te -n 1 | find "usdb1" & @ping 127.0.0.1 -n 7199 -w 1000 > nul
goto while1

参数说明:
-n 7199个单位,约2小时输出一次结果。
-w 1000毫秒

3.停止DNS服务
[root@dns3sv ~]# date ; service named stop
Thu Sep 12 12:37:17 CST 2014
Stopping named: .[ OK ]

4.ping的结果
1天后DNS信息失效,Windows2003 ping不通域名指向的IP。

E:\>echo off
星期五 2019-09-13
12:36
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期五 2019-09-13
14:36
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期五 2019-09-13
16:36
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期五 2019-09-13
18:36
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期五 2019-09-13
20:36
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期五 2019-09-13
22:36
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期六 2019-09-14
00:35
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期六 2019-09-14
02:35
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期六 2019-09-14
04:35
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期六 2019-09-14
06:35
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期六 2019-09-14
08:35
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期六 2019-09-14
10:35
Pinging usdb1.te [192.168.15.7] with 32 bytes of data:
星期六 2019-09-14
12:35
Ping request could not find host usdb1.te. Please check the name and try again
.
星期六 2019-09-14
14:35
Ping request could not find host usdb1.te. Please check the name and try again
.

[EOF]


新闻标题:用bat脚本,测试DNS信息失效时长
文章转载:http://kswsj.cn/article/ghihdh.html

其他资讯