Format of NTP Messages

Figure 1 shows the format of NTP messages.

Figure 1 NTP message
Table 1 Description of each field of an NTP message

Field

Length

Description

Leap Indicator

2 bits

A code warning of an impending leap second to be inserted or deleted in the last minute of the current day. The 2 bits, bit 0 and bit 1, are coded as follows:

00: no warning.

01: last minute has 61 seconds.

10: last minute has 59 seconds.

11: alarm condition (clock not synchronized).

VN (Version Number)

3 bits

NTP version number. The current version is 3.

Mode

3 bits

NTP mode:

0: reserved

1: symmetric active

2: symmetric passive

3: client

4: server

5: broadcast

6: reserved for NTP control messages

7: reserved for private use

Stratum

8 bits

Stratum of the local clock.

It defines the precision of a clock. The value that can be displayed in this field ranges from 1 to 15. The clocks at Stratum 1 are the most precise.

Poll

8 bits

Minimum interval between successive messages.

Precision

8 bits

Precision of the local clock.

Root Delay

32 bits

Roundtrip delay (in ms) between the client and the primary reference source.

Root Dispersion

32 bits

Estimated dispersion to the primary reference source.

Reference Identifier

32 bits

ID of a reference clock.

Reference Timestamp

64 bits

Local time at which the local clock was last set or corrected.

Value 0 indicates that the local clock is never synchronized.

Originate Timestamp

64 bits

Local time at which the NTP request is sent by the client.

Receive Timestamp

64 bits

Local time at which the request arrives at the time server

Transmit Timestamp

64 bits

Local time at which the response message is sent by the time server to the client.

Authenticator

96 bits

Authenticator information. This field is optional.

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