1 / 22
文档名称:

ntp协议全称网络时间协议.doc

格式:doc   大小:261KB   页数:22页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

ntp协议全称网络时间协议.doc

上传人:dongmengguoji 2018/6/2 文件大小:261 KB

下载得到文件列表

ntp协议全称网络时间协议.doc

相关文档

文档介绍

文档介绍:work Time Procotol)。它的目的是在国际互联网上传递统一、标准的时间。具体的实现方案是在网络上指定若干时钟源网站,为用户提供授时服务,并且这些网站间应该能够相互比对,提高准确度。
NTP 最早是由美国Delaware大学的Mills教授设计实现的,从1982件最初提出到现在已发展了将近20年,2001年最新的NTPv4精确度已经达到了200毫秒。对于实际应用,又有确保秒级精度的SNTP(简单的网络时间协议)。
NTP是一个跨越广域网或局域网的复杂的同步时间协议,它通常可获得毫秒级的精度。RFC2030[Mills 1996]描述了SNTP(work Time Protocol),目的是为了那些不需要完整NTP实现复杂性的主机,它是NTP的一个子集。通常让局域网上的若干台主机通过因特网与其他的NTP主机同步时钟,接着再向局域网内其他客户端提供时间同步服务。
NTP协议是OSI参考模型的高层协议,符合UDP传输协议格式,拥有专用端口123。
随着时间的推移, 计算机的时钟会倾向于漂移。网络时间协议(NTP) 是一种确保您的时钟保持准确的方法。它为路由器、交换机、工作站和服务器之间提供了一种时间同步的机制。所以NTP Server经常应用于一些有时间同步要求的IT系统环境中。
一、服务端设置
Mac OS X Server似乎默认就有了,只说一下Linux下如何设置。
在Ubuntu Linux中应用NTP Server非常方便:
1. 安装
Java代码
sudo apt-get install ntp  sudo apt-get install ntp
2. 配置
配置文件是/etc/
a. 找到server一项,添加你喜欢的Time Server
Java代码
server .  iburst dynamic  server . iburst dynamic
b. 设置权限,我的所有restrict条目如下
Java代码
restrict -4 default kod notrap nomodify nopeer noquery   
restrict -6 default kod notrap nomodify nopeer noquery   
  
# Local users may interrogate the ntp server more closely.   
restrict   
restrict ::1  
  
# Clients from this (example!)  have unlimited access, but only if  
# cryptographically authenticated.   
#restrict  mask  notrust   
restrict  mask   restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery
# Local users may interrogate the ntp server more closely.
restrict
restrict ::1
# Clients from this (example!) have unlimited access, but only if
# cryptographically authenticated.
#restrict mask notrust
restrict mask
3. 重启ntp服务器
/etc/ restart
4. 查看服务器是否工作正常
在服务器运行
Java代码
ntpq -p  ntpq -p
二、工作站同步
好了,测试一下吧,。在客户端运行如下命令:
ntpdate -u
同步成功后,将会显示如下:
6 Mar 15:44:24 ntpdate[9921]: adjust time server offset - sec
三、交换机同步
Cisco