网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

用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://bjjierui.cn/article/ghihdh.html

其他资讯