现在的位置: 首页 > 综合 > 正文

局域网内计算机时间同步

2017年12月24日 ⁄ 综合 ⁄ 共 2658字 ⁄ 字号 评论关闭

正好领导要求总结,就把总结的内容一起放在这里分享下吧,不过因为总结的时候要求英文的,就不高兴再换成中文放这儿了。(英语水平不高,不懂的可以留言)

On server PC:

1.      Set its time sync with the Internet service. click(doubleclick) the time bar then show the “Date and Time” window. Click “Internet Time”label, and then click “change settings”.

Then ,you will see the “InternetTime Settings” window. Hook on “Synchronize with an Internet time server”, chooseone and click “OK”. Now it will synchronize its time with the time server.(youcan also set this in the regedit)

2.      Start the NTP server on it. Go into regedit setting window. Find  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time.

a.      Click “parameter”, then you will find “Type” inthe right window, set its value to “NTP”. And it the right window, the “NtpServer”value is “time.windows.com,0x9”, the server we chose in the last step. So you can also set it here, but don’t forgot
to end the value with “0x9”.

b.     Click “Config”, set “Announce Flags” to 5

c.      Enable NTP Server. Go to “TimeProviders” folder,you will find folder “NTP Server”, set “Enabled” value to 1.

 3. Restart the w32time service, use command:

net start w32time

net stop w32time

On client PC(windows):

1.      You need to start w32time service, otherwise it will report error when you do the follow steps. 

2.      Use command to sync its time with the server PC(192.168.10.1)(ifthe time changes according to the server pc after this command, you can go directly to step 4, else please go to step 3 to confirm or get the error message):

w32tm /config/manualpeerlist:192.168.10.1 /syncfromflags:manual /update

3.      Sync manually to see if it works(errors andsolution can be found in the last part of the document):

w32tm /resync

if it passes you will see the successful message as below:

4.      Restart w32time service. Then it will sync withthe server pc.

5.      Set it through regedit. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\Paramter,set the “NtpServer” value to “192.168.10.1”. Then restart w32time service.

6.      The default sync interval is a week –604800 sec.you can modify the
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient
—SpecialPollIntervalvalue.

On client PC(linux):

1.      Use command “ntpdate 192.168.10.1”

Errors and solution:

1.      On windows client PC, when sync manually(w32tm/resync), it reports error 

computer access denied

solution: check if the NTP service hasstarted on the control PC.

2.      On windows client PC, when sync manually(w32tm/resync), it reports error:

The data is too large to sync

Solution: check if the time zone of it isdifferent from the server PC, correct it and modify the date and hour to the same as the control PC to reduce the distance between them.

3.      On linux system, it reports error:

no server suitable for syncronization found

solution: a. Check if NTP server has started on the server PC

                b. check if port 123 is being used by other process

                 c. check if the firewall has been closed on the client pc

                 d. if after trying all thebelow methods it still fails, you need to research by yourself :(

 

抱歉!评论已关闭.