ntp

NTP服务器搭建

五迷三道 提交于 2020-01-04 01:14:06
NTP的用途是把计算机的时钟同步到世界协调时UTC,NTP可以使计算机对其服务器或时钟源进行时间同步。 以下为NTP服务器搭建和客户端同步配置 一、服务端配置 1、安装NTP软件包 执行命令:yum install ntp ntpdate -y 2、修改NTP配置文件,修改前注意先备份。 执行命令:cp /etc/ntp.conf{,.bak}  #备份ntp配置文件      vim /etc/ntp.conf restrict 控制相关权限 ignore :关闭所有的 NTP 联机服务 nomodify:客户端不能更改服务端的时间参数,但是客户端可以通过服务端进行网络校时。 notrust :客户端除非通过认证,否则该客户端来源将被视为不信任子网 noquery :不提供客户端的时间查询:用户端不能使用ntpq,ntpc等命令来查询ntp服务器 notrap :,不提供trap远端登陆:拒绝为匹配的主机提供模式 6 控制消息陷阱服务。陷阱服务是 ntpdq 控制消息协议的子系统,用于远程事件日志记录程序。 nopeer :用于阻止主机尝试与服务器对等,并允许欺诈性服务器控制时钟 kod : 访问违规时发送 KoD 包。 restrict -6 表示IPV6地址的权限设置。 restrict default kod nomodify notrap nopeer noquery  

How to Programmatically Set GPO to Not Configured or Disabled

自作多情 提交于 2020-01-02 05:47:08
问题 I'm looking for a programmatic solution that has the same effect as setting the "Configure Windows NTP Client" state in GPOE Administrative Templates > System > Windows Time Service > Time Providers > Configure Windows NTP Client to Not Configured or Disabled , but I'll take any help I can get at this point. Is there a registry key I can modify using the .NET Registry class or a property I can modify using the RSoP WMI classes? I've been looking in both places for days, but haven't found

How can I access NTP clock in java

半腔热情 提交于 2020-01-01 05:03:30
问题 I have a distributed program written in java. I want my nodes access a synchronized physical clock. I know NTP is a protocol for physical clock synchronization. I know that I can install it on linux by sudo apt-get ntp. My question is when I install it, how can I access this synchronized clock in my java program? I mean what happens when I install ntp on my machine? my system clock will be sync? Thanks :) 回答1: When you setup ntp, System time will be synchronized with the ntp server time. When

PHP microtime() drift, External NTP service

我怕爱的太早我们不能终老 提交于 2019-12-30 12:53:37
问题 I am looking for a solution for an issue on my cloud-hosted server where the result returned from microtime(true); is very accurate between calls within a few minutes of each other, but drifts by nearly a second over the course of a day or two. I'm using this result to synchronize between asynchronously connected clients and I need the precision to be accurate to NIST by within <~10ms or so if at all possible. I know this could be considered off-topic, but the current best option I can think

What does the '\x1b' + 47 * '\0' message sent to an NTP server mean?

社会主义新天地 提交于 2019-12-30 07:21:08
问题 I am working on an NTP Client. A few other threads indicate that the a message containing "\x1b' + 47 * '\0" is sent to the NTP server, but none of these threads give an explanation about what this message actually means or why it is sent. I've tried looking at the NTP RFC but I was unable to find any information about it in there either. 回答1: "\x1b' + 47 * '\0" represents a data field of 48 bytes. 0x1B followed by 47 times 0 . 48 bytes is the size of an NTP UDP packet. The first byte (0x1B)

ntp时间同步,各种配置方法

ⅰ亾dé卋堺 提交于 2019-12-28 19:27:39
1 Windows xp NTP服务器的配置(2003配置方式一样) 1) 首先需要关闭作为NTP服务器的windows系统自带的防火墙,否则将同步不成功。 2) 单击“开始”,单击“运行”,键入 regedit,然后单击“确定”。 找到下面的注册表项然后单击它: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Config\ 在右窗格中,右键单击“AnnounceFlags”,然后单击“修改”。 在“编辑 DWORD 值”对话框中的“数值数据”下,键入 5,然后单击“确定”。 3) 启用 NTPServer。 a. 找到并单击下面的注册表子项: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpServer\ b. 在右窗格中,右键单击“Enabled”,然后单击“修改”。 c. 在“编辑 DWORD 值”对话框中的“数值数据”下,键入 1,然后单击“确定”。 4) 关闭NTP client 找到并单击下面的注册表子项: a) HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\Ntpclient\ b)

RTCP 包中的 NTP 时间

别来无恙 提交于 2019-12-26 12:21:04
RTP/RTCP的时间同步机制 转自:http://blog.csdn.net/leesphone/article/details/5571972 RTP支持传送不同codec的steaming,不同codec的clock rate的也不一样,不同的media之间需要依靠RTCP进行同步。这里简单介绍一下他们的机制。 在每个RTCP SR包中对应有一个RTP时间和一个NTP时间,它表达的意思很明确,那就是这个RTP时间对应的绝对时间, 不同media的RTP时间尽管不同,但可以通过NTP时间映射到同一个时间轴上,从而实现同步。 如下图所示,RTP session 1 send H264 使用90,000HZ,而RTP session 2 send G.711 使用8,000HZ: 最近遇到进行视频流播放时间戳的匹配问题。学到了一些新方法,记录一下。 运行播放IP camera的软件,用wireshark抓包软件,可看到RTSP数据包的传输过程。 因为抓到的数据包是用UDP传输的,需要选择特定协议进行详细解析,具体步骤为: 选择一行UDP数据包数据; 右击 -> 选择Decode As -> 针对所需端口号,选择相应的应用层协议,此处是RTSP。 这样之后就能看到详细的RTSP包数据传输过程,由下图可见。 观察RTCP的Send Report包,可以发现其包含两个时间

Windows2012R2 NTP时间同步

你离开我真会死。 提交于 2019-12-26 11:52:39
Windows2012R2 NTP时间同步 Windows2012R2里没有了internet时间,需要使用另外的方式去做时间同步 下面分两个情况 两个情况,两个情况都需要用修改组策略的方式来做 情况一 没有Windows域环境 集群中的每个服务器都要能上网,每个服务器都要执行下面的操作 开启 NTP Client 服务 1、打开 powershell 终端, 输入:gpedit.msc,打开组策略管理器 2、执行上述命令后,计算机策略对话框打开,按照如下路径 计算机配置\管理模板\系统\windows 时间服务\时间提供程序 找到服务器设置文件 3、双击 配置 Windows NTP 客户端,显示 配置 Windows NTP 客户端 4、将 Ntp Server项,输入将要同步到的时间服务器IP地址(这里输入阿里云的ntp服务器地址: time.pool.aliyun.com),注意 0x9 或 0x1 必须要有;在 类型 项, 选择 NTP;点击 应用、确定 按钮; 5、启动 NTP 客户端;启用NTP客户端;点击 应用、确定 按钮; 6、执行下面命令更新组策略 gpupdate /force 7、检查W32Time服务是否启动,启动类型是否是 自动启动 (1)服务器不能上网,当前环境有ntpd服务器 在第4步里把ntp server的地址改为内网ntpd服务器的地址即可

Windows2012R2 NTP时间同步

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-26 11:52:23
转: Windows2012R2 NTP时间同步 下面分两个情况 两个情况,两个情况都需要用修改组策略的方式来做 情况一 没有Windows域环境 集群中的每个服务器都要能上网,每个服务器都要执行下面的操作 开启 NTP Client 服务 1、打开 powershell 终端, 输入:gpedit.msc,打开组策略管理器 2、执行上述命令后,计算机策略对话框打开,按照如下路径 计算机配置\管理模板\系统\windows 时间服务\时间提供程序 找到服务器设置文件 3、双击 配置 Windows NTP 客户端,显示 配置 Windows NTP 客户端 4、将 Ntp Server项,输入将要同步到的时间服务器IP地址(这里输入阿里云的ntp服务器地址: time.pool.aliyun.com),注意 0x9 或 0x1 必须要有;在 类型 项, 选择 NTP;点击 应用、确定 按钮; 5、启动 NTP 客户端;启用NTP客户端;点击 应用、确定 按钮; 6、执行下面命令更新组策略 gpupdate /force 7、检查W32Time服务是否启动,启动类型是否是 自动启动 (1)服务器不能上网,当前环境有ntpd服务器 在第4步里把ntp server的地址改为内网ntpd服务器的地址即可 (2)服务器必须要能上网,使用公网上的ntpd服务器,例如阿里云的ntpd服务器

Windows2012R2 时间同步设置

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-26 11:51:57
Windows2012R2里没有了internet时间,或者Internet时间无法同步成功,都可以尝试使用如下方法。 1、打开命令提示符, 输入:gpedit.msc,打开组策略管理器 2、执行上述命令后,计算机策略对话框打开,按照如下路径 计算机配置\管理模板\系统\windows 时间服务\时间提供程序 找到服务器设置文件 3、双击 配置 Windows NTP 客户端,显示 配置 Windows NTP 客户端 4、将 Ntp Server项,输入将要同步到的时间服务器IP地址(这里输入阿里云的ntp服务器地址: time.pool.aliyun.com),注意 0x9 或 0x1 必须要有;在 类型 项, 选择 NTP;点击 应用、确定 按钮; 5、启动 NTP 客户端;启用NTP客户端;点击 应用、确定 按钮; 6、执行下面命令更新组策略 gpupdate /force 7、检查W32Time服务是否启动,启动类型是否是 自动启动 手动在点击同步时间一次,问题就解决了。 参考博客:http://www.cnblogs.com/lyhabc/p/6270448.html 来源: https://www.cnblogs.com/helloworldPC/p/6889003.html