NTP Operating Modes

Peer Mode

In peer mode, the active and passive ends can be synchronized. The end with a lower stratum (larger stratum number) is synchronized to the end with a higher stratum (smaller stratum number).

  • Symmetric active: A host operating in this mode periodically sends messages regardless of the reachability or stratum of its peer. The host announces its willingness to synchronize and be synchronized by its peer.

    The symmetric active end is a time server close to the leaf node in the synchronization subnet. It has a low stratum (large stratum number). In this mode, time synchronization is reliable. A peer is configured on the same stratum and two peers are configured on the stratum one level higher (one stratum number smaller). In this case, synchronization poll frequency is not important. Even when error packets are returned because of connection failures, the local clocks are not significantly affected.

  • Symmetric passive: A host operating in this mode receives packets and responds to its peer. The host announces its willingness to synchronize and be synchronized by its peer.

    The prerequisites of being a symmetric passive host are as follows:
    • The host receives messages from a peer operating in the symmetric active mode.
    • The peer is reachable.
    • The peer operates at a stratum lower than or equal to the host.

The host operating in the symmetric passive mode is at a low stratum in the synchronization subnet. It does not need to know the feature of the peer. A connection between peers is set up and status variables must be updated only when the symmetric passive end receives NTP messages from the peer.

In NTP peer mode, the active end functions as a client and the passive end functions as a server.

Client/Server Mode

  • Client: A host operating in this mode periodically sends messages regardless of the reachability or stratum of the server. The host synchronizes its clock with that on the server but does not alter the clock on the server.

  • Server: A host operating in this mode receives packets and responds to the client. The host provides synchronization information for all its clients but does not alter its own clock.

A host operating in the client mode periodically sends NTP messages to a server during and after its restart. The server does not need to retain state information when the client sends the request. The client freely manages the interval for sending packets according to actual conditions.

Kiss-o'-Death (KOD) packets provide useful information to a client and are used for status reporting and access control. When KOD is enabled on the server, the server can send packets with kiss codes DENY and RATE to the client.
  • After the client receives a packet with kiss code DENY, the client demobilizes any associations with that server and stops sending packets to that server.
  • After the client receives a packet with kiss code RATE, the client immediately reduces its polling interval to that of the server and continues to reduce it each time it receives a RATE kiss code.

Broadcast Mode

  • A host operating in broadcast mode periodically sends clock-synchronization packets to the broadcast IPv4 address regardless of the reachability or stratum of the clients. The host provides synchronization information for all its clients but does not alter its own clock.

  • A client listens to the broadcast packets sent by the server. When receiving the first broadcast packet, the client temporarily starts in the client/server mode to exchange packets with the server. This allows the client to estimate the network delay. The client then reverts to the broadcast mode, continues to listen to the broadcast packets, and re-synchronizes the local clock based on the received broadcast packets.

The broadcast mode is run on multiple workstations. Therefore, high-speed LANs of the highest accuracy are not required. In a typical scenario, one or more time servers in a LAN periodically send broadcast packets to the workstations. The LAN packet transmission delay is only milliseconds.

If multiple time servers are available to enhance reliability, a clock selection algorithm is useful.

Multicast Mode

  • A host operating in the multicast mode periodically sends clock-synchronization packets to a multicast IPv4/IPv6 address. The host is usually a time server using high-speed multicast media in a LAN. The host provides synchronization information for all its peers but does not alter its own clock.

  • A client listens to multicast packets sent by the server. After receiving the first multicast packet, the client temporarily starts in the client/server mode to exchange packets with the server. This allows the client to estimate the network delay. The client then reverts to the multicast mode, continues to listen to the multicast packets, and re-synchronizes the local clock based on the received multicast packets.

Manycast Mode

  • A client operating in manycast mode sends periodic request packets to a designated IPv4 or IPv6 multicast address in order to search for a minimum number of associations. It starts with a time to live (TTL) value equal to one and continuously adding one to it until the minimum number of associations is made, or when the TTL reaches a maximum value. If the TTL reaches its maximum value, and still not enough associations are mobilized, the client stops transmission for a timeout period to clear all associations, and then repeats the search process. If a minimum number of associations have been mobilized, then the client starts transmitting one packet per timeout period to maintain the associations.

  • A designated manycast server within range of the TTL field in the packet header listens for packets with that address. If a server is suitable for synchronization, it returns an ordinary server (mode 4) packet using the client's unicast address.

Manycast mode is applied to a small set of servers scattered over a network. Clients can discover and synchronize to the closest manycast server. Manycast can especially be used where the identity of the server is not fixed and a change of server does not require reconfiguration of all the clients on the network.

NTP Operation

  • A host operating in an active mode (symmetric active, client or broadcast mode) must be configured.

  • Its peer operating in a passive mode (symmetric passive or server mode) requires no pre-configuration.

An error occurs when the host and its peer operate in the same mode. In such a case, one ignores messages sent by the other, and their associations are then dissolved.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >