服务简介
NTP(Network Time Protocol)服务器是用于同步计算机网络中各设备时间的服务器。它通过网络协议与标准时间源(如原子钟、GPS系统等)进行时间同步,确保不同设备在网络中的时间保持一致。
问题描述
在完全离线的环境中,内网主机时间的不一致往往会引发一系列问题,面对这样的挑战,我们应当如何应对,确保时间的精确同步呢?
解决方法
将一台服务器配置为NTP服务端为内网的其他主机提供对时服务,确保时间保持一致。(Linux可参考:Rocky_Linux配置内网NTP服务器)
环境准备
1.windows server一台,配置为NTP服务器;
2.win11客户端
配置方法
1.在服务端上打开组策略管理
2.以此顺序启动NTP服务端,计算机配置=>策略=>windows设置=>管理模版=>系统=>windows时间服务=>启用NTP服务器


修改完成后,别忘记更新策略使其立即生效:gpupdate /force
4.配置客户端ntp服务器
如果是windows server则需要先启用客户端,再进行配置

5.填写NTP服务器IP,服务类型选择NTP,其他值根据实际需要调整即可

6.最后,使用命令立即同步时间
w32tm /resync

查看同步状态
w32tm /query /status

7.windows 11中同步时间
在控制面板中找到时间和日期设置

填写内网NTP服务器地址,点击立即更新即可完成同步
