Create window Time server (NTP)

Source: Internet
Author: User
Tags constant net time

First, select the server base clock, you can select the internal hardware clock and external NTP timing server. (Make sure your time is accurate first)

A. Configuring the Windows Time service to use the server internal hardware clock

(1). Click Start, click Run, type regedit, and then click OK.

(2). Locate and then click the following registry subkey:

Program code

Hkey_local_machinesystemcurrentcontrolsetservicesw32timeconfigannounceflags

(3). Right-click AnnounceFlags in the right pane, and then click Modify.

(4). In edit DWORD value, type A in the Value data box, and then click OK.

B. Configuring the Windows Time service to use an external time source

(1). Specifies the time source. To do this, follow these steps:

A. Locate and click the following registry subkey:

Program code

Hkey_local_machinesystemcurrentcontrolsetservicesw32timeparametersntpserver

B. In the right pane, right-click NtpServer, and then click Modify.

C. Type peers in the Value data box of the edit value, and then click OK.

Note: Peers is a placeholder that should be replaced with a space-delimited list of peers from which your computer gets a timestamp. Each DNS name that is listed must be unique. Must be appended to each DNS name, 0x1. If you do not append to each DNS name, 0x1, the changes made in the following steps will not take effect.

(2). Select the polling interval. To do this, follow these steps:

A. Locate and click the following registry subkey:

Program code

Hkey_local_machinesystemcurrentcontrolsetservicesw32timetimeprovidersntpclient

SpecialPollInterval

B. In the right pane, right-click SpecialPollInterval, and then click Modify.

C. Type timeinseconds in the Value data box of edit DWORD value, and then click OK.

Note: TimeInSeconds is a placeholder and should be replaced by the number of seconds between polling times you want. The recommended value is 900 (decimal). This value configures the time server to poll once every 15 minutes.

(3). Configure time calibration settings. To do this, follow these steps:

A. Locate and click the following registry subkey:

Program code

Hkey_local_machinesystemcurrentcontrolsetservicesw32timeconfig

MaxPosPhaseCorrection

B. In the right pane, right-click MaxPosPhaseCorrection, and then click Modify.

C. Click in the Cardinality box of edit DWORD value to select Decimal.

D. Type timeinseconds in the Value data box of edit DWORD value, and then click OK.

Note: TimeInSeconds is a placeholder that should be replaced with the appropriate value, such as 1 hours (3600) or 30 minutes (1800). The value you select will vary depending on the polling interval, network condition, and external time source.

E. Locate and click the following registry subkey:

Program code

Hkey_local_machinesystemcurrentcontrolsetservicesw32timeconfig

MaxNegPhaseCorrection

F. In the right pane, right-click MaxNegPhaseCorrection, and then click Modify.

G. Click in the Cardinality box of edit DWORD value to select Decimal.

H. Type timeinseconds in the Value data box of edit DWORD value, and then click OK.

Note: TimeInSeconds is a placeholder that should be replaced with the appropriate value, such as 1 hours (3600) or 30 minutes (1800). The value you select will vary depending on the polling interval, network condition, and external time source.

Second, configure NTP timing server

(1). Change the server type to NTP. To do this, follow these steps:

A. Click Start, click Run, type regedit, and then click OK.

B. Locate and click the following registry subkey:

Program code

Hkey_local_machinesystemcurrentcontrolsetservicesw32timeparameterstype

C. In the right pane, right-click Type, and then click Modify.

D. Type NTP in the Value data box for edit values, and then click OK.

(2). Set the AnnounceFlags to 5. To do this, follow these steps:

A. Locate and click the following registry subkey:

Program code

Hkey_local_machinesystemcurrentcontrolsetservicesw32timeconfigannounceflags

B. In the right pane, right-click AnnounceFlags, and then click Modify.

C. Type 5 in the Value data box in edit DWORD value, and then click OK.

(3). Enable NTPServer. To do this, follow these steps:

A. Locate and click the following registry subkey:

Program code

Hkey_local_machinesystemcurrentcontrolsetservicesw32timetimeprovidersntpserver

B. In the right pane, right-click Enabled, and then click Modify.

C. Type 1 in the Value data box in edit DWORD value, and then click OK.

Third, to make the configuration immediately effective

1. Quit Registry Editor.

2. At the command prompt, type the following command to restart the Windows time service, and then press Enter:

Program code

net stop W32Time && net start W32Time

Four, configure the firewall to allow NTP access

If you need to access the server's NTP service outside the server area, you need to add permission on the firewall:

Program code

Name Port Protocol Direction

SNTP time Datum 123 UDP into

V. Relevant registry description

Registry key MaxPosPhaseCorrection

Path Hkey_local_machinesystemcurrentcontrolsetservicesw32timeconfig

Note: This item specifies the maximum amount of positive time calibration (in seconds) that the service can perform. If the service determines that a change is greater than the desired magnitude, it logs an event. (0xFFFFFFFF is a special case, which indicates a constant calibration time.) The default value for the domain member is 0xFFFFFFFF. The default value for stand-alone clients and servers is 54,000, or 15 hours.

Registry key MaxNegPhaseCorrection

Path Hkey_local_machinesystemcurrentcontrolsetservicesw32timeconfig

Note: This item specifies the maximum amount of negative time calibration (in seconds) that the service can perform. If the service determines that a change is greater than the desired magnitude, it will record an event instead. (-1 is a special case, which indicates a constant calibration time.) The default value for the domain member is 0xFFFFFFFF. The default value for stand-alone clients and servers is 54,000, or 15 hours.

Registry key Maxpollinterval

Path Hkey_local_machinesystemcurrentcontrolsetservicesw32timeconfig

Note: This entry specifies the maximum interval allowed for the system polling interval (in seconds in logarithmic notation). Although the system must poll at a predetermined interval, the provider can refuse to generate the sample based on the request. The default value for a domain member is 10. The default value for stand-alone clients and servers is 15.

Registry key SpecialPollInterval

Path hkey_local_machinesystemcurrentcontrolsetservicesw32timetimeprovidersntpclient

Note: This entry specifies the special polling interval (in seconds) for the manual peer. When the Specialinterval 0x1 flag is enabled, W32Time uses this polling interval rather than the polling interval determined by the operating system. The default value for a domain member is 3,600. The default value for stand-alone clients and servers is 604,800.

Registry key Maxallowedphaseoffset

Path Hkey_local_machinesystemcurrentcontrolsetservicesw32timeconfig

Note: This entry specifies the maximum offset (in seconds) that W32Time tries to adjust the computer clock using the clock rate. When the offset is greater than this rate, W32Time sets the computer clock directly. The default value for a domain member is 300. The default value for stand-alone clients and servers is 1.

Note notes:

1. General Operation:

1 Change the time server into the service center address (210.72.145.44)

NET time/setsntp:210.72.145.44

2 Start time Synchronization Service

SC start W32Time

3) Synchronization Time

W32tm/resync (in fact, in most cases, light is the third step.) ) 2, the starting premise:

DOS boot window Time service: net stop W32Time, net start W32Time

To start the Window time service, you must first start the Remote Access Connection Manager service.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.