Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Use bat script to test the duration of DNS message failure

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Use the bat script to test the expiration time of the DNS message.

Configuration of named.xx.zone in CentOS6.4:

$TTL=7D

3D; minimum

Test results: stop the DNS service, do not reach the set minimum period of 3 days, DNS information will be invalid.

Or after the client windows2003 is restarted, the DNS information becomes invalid.

1. Restart the DNS service

[root@dns3sv named] # service named restart

Stopping named:. [OK]

Starting named: [OK]

two。 Edit the bat script and run it

Log in to the DNS client. 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

Parameter description:

-n 7199 units, about 2 hours to output the results.

-1000 milliseconds

3. Stop the DNS service

[root@dns3sv ~] # date; service named stop

Thu Sep 12 12:37:17 CST 2014

Stopping named:. [OK]

Results of 4.ping

The DNS information expires after 1 day, and the Windows2003 ping cannot communicate with the IP pointed to by the domain name.

E:\ > echo off

Friday 2019-09-13

12:36

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Friday 2019-09-13

14:36

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Friday 2019-09-13

16:36

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Friday 2019-09-13

18:36

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Friday 2019-09-13

20:36

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Friday 2019-09-13

22:36

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Saturday 2019-09-14

00:35

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Saturday 2019-09-14

02:35

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Saturday 2019-09-14

04:35

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Saturday 2019-09-14

06:35

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Saturday 2019-09-14

08:35

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Saturday 2019-09-14

10:35

Pinging usdb1.te [192.168.15.7] with 32 bytes of data:

Saturday 2019-09-14

12:35

Ping request could not find host usdb1.te. Please check the name and try again

.

Saturday 2019-09-14

14:35

Ping request could not find host usdb1.te. Please check the name and try again

.

[EOF]

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report