How does ntp time synchronization work




















All operations on the network requiring high accuracy in operations are typically time-stamped in the order of milliseconds. By using NTP sync to synchronize the NTP server, one can use its common built-in time-base to record time accurately and hence avoid expensive downtime problems. An example of a transaction needing accurate time processing on an NTP server port is network recovery and fault diagnosis in software development. When selecting a service or product, one must understand what is NTP server and look into the network time servers critical features allowing what is NTP to make a huge difference.

They are:. Japan, many European countries provide such dial-up services. NTP being a protocol needs separate server and client applications for its implementation. In conclusion, the accuracy, security, ease of use and reliability of the dedicated network time server is very important to what is NTP and the NTP time server.

If you are interested in making a career in the Data Science domain, our month in-person Postgraduate Certificate Diploma in Data Science course can help you immensely in becoming a successful Data Science professional. What is NTP? Ajay Ohri 2 Mar What is NTP Server? In addition to the client-server model and the peer to peer model, a server may broadcast time to a broadcast or multicast IP addresses and clients may be configured to synchronise to these broadcast time signals. Check the -c command line option.

Once the NTP daemon is up and running, it will operate by exchanging packets time and sanity check exchanges with its configured servers at poll intervals and its behaviour will depend on the delay between the local time and its reference servers.

Basically, the process starts when the NTP client sends a packet containing its timestamp to a server. When the server receives such a packet, it will in turn store its own timestamp and a transmit timestamp into the packet and send it back to the client. When the client receives the packet it will log its receipt time in order to estimate the travelling time of the packet.

The packet exchange takes place until a NTP server is accepted as a synchronization source, which take about five minutes. The NTP daemon tries to adjust the clock in small steps and will continue until the client gets the accurate time. If the delay between both the server and client is big enough the daemon will terminate and you will need to adjust the time manually and start the daemon again.

NTP stands for Network Time Protocol, and it is an Internet protocol used to synchronize the clocks of computers to some time reference. Mills at the University of Delaware. Time usually just advances. If you have communicating programs running on different computers, time still should even advance if you switch from one computer to another. Obviously if one system is ahead of the others, the others are behind that particular one.

From the perspective of an external observer, switching between these systems would cause time to jump forward and back, a non-desirable effect. As a consequence, isolated networks may run their own wrong time, but as soon as you connect to the Internet, effects will be visible.

Just imagine some EMail message arrived five minutes before it was sent, and there even was a reply two minutes before the message was sent. NTP needs some reference clock that defines the true time to operate. All clocks are set towards that true time. It will not just make all systems agree on some time, but will make them agree upon the true time as defined by some standard.

NTP is a fault-tolerant protocol that will automatically select the best of several available time sources to synchronize to.

Each query is designed to identify a time source with certain attributes, such as a type of domain controller, a particular location, and whether or not it is a reliable time source. The time source must also adhere to the following constraints:. A PDC emulator can synchronize with a reliable time source in its own domain or any domain controller in the parent domain. If the domain controller is not able to synchronize with the type of domain controller that it is querying, the query is not made.

The domain controller knows which type of computer it can obtain time from before it makes the query. For example, a local PDC emulator does not attempt to query numbers three or six because a domain controller does not attempt to synchronize with itself. The following table lists the queries that a domain controller makes to find a time source and the order in which the queries are made.

A domain controller does not attempt to synchronize with itself. Each query returns a list of domain controllers that can be used as a time source.

Windows Time assigns each domain controller that is queried a score based on the reliability and location of the domain controller. The following table lists the scores assigned by Windows Time to each type of domain controller. When the Windows Time service determines that it has identified the domain controller with the best possible score, no more queries are made. The scores assigned by the time service are cumulative, which means that a PDC emulator located in the same site receives a score of nine.

If the root of the time service is not configured to synchronize with an external source, the internal hardware clock of the computer governs the time. Manually-specified synchronization enables you to designate a single peer or list of peers from which a computer obtains time. If the computer is not a member of a domain, it must be manually configured to synchronize with a specified time source. A computer that is a member of a domain is configured by default to synchronize from the domain hierarchy, manually-specified synchronization is most useful for the forest root of the domain or for computers that are not joined to a domain.

Manually specifying an external NTP server to synchronize with the authoritative computer for your domain provides reliable time. However, configuring the authoritative computer for your domain to synchronize with a hardware clock is actually a better solution for providing the most accurate, secure time to your domain. Manually-specified time sources are not authenticated unless a specific time provider is written for them, and they are therefore vulnerable to attackers.

Also, if a computer synchronizes with a manually-specified source rather than its authenticating domain controller, the two computers might be out of synchronization, causing Kerberos authentication to fail. This might cause other actions requiring network authentication to fail, such as printing or file sharing. If only the forest root is configured to synchronize with an external source, all other computers within the forest remain synchronized with each other, making replay attacks difficult.

The "all available synchronization mechanisms" option is the most valuable synchronization method for users on a network. This method allows synchronization with the domain hierarchy and may also provide an alternate time source if the domain hierarchy becomes unavailable, depending on the configuration.

If the client is unable to synchronize time with the domain hierarchy, the time source automatically falls back to the time source specified by the NtpServer setting. This method of synchronization is most likely to provide accurate time to clients.

There are certain situations in which you will want to stop a computer from synchronizing its time. For example, if a computer attempts to synchronize from a time source on the Internet or from another site over a WAN by means of a dial-up connection, it can incur costly telephone charges.

When you disable synchronization on that computer, you prevent the computer from attempting to access a time source over a dial-up connection.

You can also disable synchronization to prevent the generation of errors in the event log. Each time a computer attempts to synchronize with a time source that is unavailable, it generates an error in the Event Log. If a time source is taken off of the network for scheduled maintenance and you do not intend to reconfigure the client to synchronize from another source, you can disable synchronization on the client to prevent it from attempting synchronization while the time server is unavailable.

It is useful to disable synchronization on the computer that is designated as the root of the synchronization network. This indicates that the root computer trusts its local clock. If the root of the synchronization hierarchy is not set to NoSync and if it is unable to synchronize with another time source, clients do not accept the packet that this computer sends out because its time cannot be trusted.

The only time servers that are trusted by clients even if they have not synchronized with another time source are those that have been identified by the client as reliable time servers. The Windows Time service W32Time can be completely disabled.

If you choose to implement a third-party time synchronization product that uses NTP, you must disable the Windows Time service. The Windows Time service communicates on a network to identify reliable time sources, obtain time information, and provide time information to other computers.

Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services. Privacy policy. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. The NTP service can then be used to make the disciplined Windows system time available on the network. The NTP server is then visible as stratum 1 server on the network.

Unlike stated before on this page, the config file should not contain the line disable ntp since this may be the reason that the time server is not accepted by its clients. Also, there should be no driftfile specified, and if a file ntp. Otherwise the NTP service might try to correct the system clock drift, thus working against the radio clock driver, resulting in a poor quality of time synchronization.

Configuration Without Radio Clock Configuration of computers without external reference clock is quite simple.

For each computer which is to be used as reference time source, a line must be added to the file ntp. Additionally, the computer's local clock can configured to be used by the NTP service if none of the other time servers on the network can be reached.

Since the time servers on the network shall be preferred, the local clock's stratum should be forced to a high number:. The keyword iburst causes quick synchronization at program start. Older NTP versions do not support iburst. Attention: If the NTP service under windows works together with the Meinberg driver package then a driftfile should not be configured. There are many more options which can be set up using the configuration file. Please refer to the NTP documentation for details. In batch mode, ntpq executes a command and returns to the command prompt.

The parameter -p 'peers' lets ntpq print the status of a NTP daemon. If the first character of a line is not blank then it contains a qualifier for the corresponding reference time source. Immediately after the daemon has been started all qualifiers are blank. The NTP daemon needs several polling cycles to check the available time sources and declare one of them as the reference it synchronizes to.

The refid shows the type of the reference clock, where e. Other identifiers are possible, depending on the type of the reference clock. The column st reflects the stratum number of the reference time source. In the example above, the local clock has stratum 12 , the remote time server at Every time a when count reaches the poll number in the same line, the NTP daemon queries the time from the corresponding time source and resets the when count to 0.

The query results of each polling cycle are filtered and used as a measure for the clock's quality and reachability. The column reach shows if a reference time source could be reached at the last polling intervals, i. The value must be interpreted as an 8 bit shift register whose contents is for historical reasons displayed as octal values.



0コメント

  • 1000 / 1000