Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5380216
  • 博文数量: 890
  • 博客积分: 12876
  • 博客等级: 上将
  • 技术积分: 10760
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-04 14:18
个人简介

猝然临之而不惊,无故加之而不怒。

文章分类

全部博文(890)

文章存档

2016年(1)

2014年(18)

2013年(41)

2012年(48)

2011年(65)

2010年(84)

2009年(121)

2008年(101)

2007年(129)

2006年(95)

2005年(118)

2004年(69)

分类: WINDOWS

2009-08-27 12:24:33

来源:网络

如何在 Windows Server 2003 中配置权威时间服务器


在 Windows Server 2003 中尝试与非 Windows NTP 服务器同步时,时间同步可能失败




二个命令:(windows 2k pro sp4的帮助)


NET TIME [\\computername | /DOMAIN[:domainname] | /RTSDOMAIN[:domainname]] [/SET]
         [\\computername] /QUERYSNTP
         [\\computername] /SETSNTP[:ntp server list]

w32tm [ -tz | -s [computer] | -adj | -adjoff | -source | -once ]
      [-test] [-v] [-p ] [-period ]

    Primary options:
    -tz       print the local time zone info and exit.
    -s [] force the given computer (or the local computer if
              none is given) to resynchronize, then exit.
    -adj      set the computer's system clock frequency to the last
              frequency determined during synchronization, then exit.
    -adjoff   set the computer's system clock frequency the system
              default, then exit
    -source   choose a synchronization source, then exit. Note that a
              source is chosen before each synchronization, so this is
              useful only in showing that a source could be found.
              Remember to use -v to see the output.
    -once     do only one synchronization, then exit.
    Otherwise, run continuously as a client, synchronizing the local
              clock until ctrl-c is pressed.

    The program will also run as a server any time the service
    would (when it is on a DC, or when the registry flag is set).

    The following options can be used in conjunction with the above:
    -test     prevent the time on the local system from actually
              being modified.
    -v        print out a verbose description of what the program is
              doing. This is usually needed since otherwise the
              program produces no output. The exceptions are -s and -tz.
    -p set the server port.
    -period set the sync period just as in the registry. That is:
              0 == once a day
              65535 == once every 2 days
              65534 == once every 3 days
              65533 == once every week (7 days)
              65532 == once every 45 min until we get 3 good syncs, then
                           once every 8 hrs (3/day)
              65531 == once every 45 min until we get 1 good sync, then
                           once every day
              Otherwise, times per day.


如何在 Windows 2000 中配置权威时间服务器:
如何在 Windows XP 中配置权威时间服务器:
如何在 Windows Server 2003 中配置权威时间服务器:

配置 Windows 时间服务以防出现大的时间偏移:

W32Time 服务的注册表项:


net time /setsntp:clock.via.net
windows自己的服务器为:time.windows.com


时钟服务器|时间服务器[ntp:123]



级   域名     地理位置
1 s1a.time.edu.cn 北京邮电大学
1 s1b.time.edu.cn 清华大学
1 s1c.time.edu.cn 北京大学
1 s1d.time.edu.cn 东南大学
1 s1e.time.edu.cn 清华大学
2 s2a.time.edu.cn 清华大学
2 s2b.time.edu.cn 清华大学
2 s2c.time.edu.cn 北京邮电大学
2 s2d.time.edu.cn 西南地区网络中心
2 s2e.time.edu.cn 西北地区网络中心
2 s2f.time.edu.cn 东北地区网络中心
2 s2g.time.edu.cn 华东南地区网络中心
2 s2h.time.edu.cn 四川大学网络管理中心
2 s2j.time.edu.cn 大连理工大学网络中心
2 s2k.time.edu.cn CERNET桂林主节点
2 s2m.time.edu.cn 北京大学


速度很快复旦大学的服务器:ntp.fudan.edu.cn


2003本身就可以,在时间设置里就有,加入域以后默认和域服务器时间同步,当然这也是可以改的。
2000在界面上找不到,但也仅仅是界面上没有而已,功能和xp、2003是一样的

2000以上操作系统:(在命令行下输入)

设置ntp服务器:
net time /SETSNTP[:ntp server list]
查看你当前的ntp服务器:
net time /QUERYSNTP

net time \\server /set /yes

立即同步:
2000下可以使用
w32tm /once
2003、XP下可以使用
w32tm /resync

另外如果需要自动同步的话,就将服务里的Windows Time服务设置成自动。

 系统日志W32Time错误-NtpClient 配置

时间提供程序 NtpClient: 此机器配置为用域层级确定它的时间源,但它已经是在林的根目录域的 PDC 仿真,因此在域层级没有机器在它上面以用作时间源。建议您在根域上配置一个可靠的时间服务,或者手动配置 PDC 与外部时间源同步。否则,此机器将在域层级中作为权威的时间源。如果没有为此计算机配置或使用外部时间源,您可以选择禁用 NtpClient。



解决方法:

方法一:停掉ntpclient服务

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient
Enabled,把值改成0。

方法二:禁止写日志

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient
EventLogFlags,把值改成0。

设置完成后重启Windows Time服务(命令行:net stop w32time && net start w32time),到系统日志中验证。


对“Windows 时间”进行配置,使它在与时间服务器同步时使用客户端模式。为此,请按照下列步骤操作:

在命令提示符处,按给出的顺序键入以下命令。键入每个命令后,按 Enter 键。
w32tm /config /manualpeerlist:NTP_server_IP_Address,0x8 /syncfromflags:MANUAL
net stop w32time
net start w32time
w32tm /resync

w32tm /config /manualpeerlist:ntp.fudan.edu.cn,0x8 /syncfromflags:MANUAL

系统默认是0x0
0x8 标志强制 W32time 发送普通的客户端请求
0x4 标志是以对称模式活动数据包发送请求

系统日志中出错或警告时,也可以看到这些代码(0x0/0x4/0x8)的。

阅读(6815) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~