beautypg.com

Ntp message format – H3C Technologies H3C WX3000E Series Wireless Switches User Manual

Page 19

background image

10

Device B is used as the NTP time server, namely, Device A synchronizes its clock to that of Device

B.

It takes 1 second for an NTP message to travel from one device to the other.

Figure 5 Basic work flow of NTP

The synchronization process is as follows:

Device A sends Device B an NTP message, which is timestamped when it leaves Device A. The time
stamp is 10:00:00 am (T1).

When this NTP message arrives at Device B, it is timestamped by Device B. The timestamp is
11:00:01 am (T2).

When the NTP message leaves Device B, Device B timestamps it. The timestamp is 11:00:02 am
(T3).

When Device A receives the NTP message, the local time of Device A is 10:00:03 am (T4).

Now, Device A can calculate the following parameters based on the timestamps:

The roundtrip delay of NTP message: Delay = (T4–T1) – (T3-T2) = 2 seconds.

Time difference between Device A and Device B: Offset = ((T2-T1) + (T3-T4))/2 = 1 hour.

Based on these parameters, Device A can synchronize its own clock to the clock of Device B.
This is only a rough description of the work mechanism of NTP. For more information, see RFC 1305.

NTP message format

NTP uses two types of messages, clock synchronization message and NTP control message. An NTP
control message is used in environments where network management is needed. It is not required for

clock synchronization, so it is not described in this document.

This manual is related to the following products: