beautypg.com

Ntp architecture – H3C Technologies H3C S6300 Series Switches User Manual

Page 22

background image

9

The synchronization process is as follows:

1.

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).

2.

When this NTP message arrives at Device B, Device B adds a timestamp showing the time when

the message arrived at Device B. The timestamp is 11:00:01 am (T2).

3.

When the NTP message leaves Device B, Device B adds a timestamp showing the time when the
message left Device B. The timestamp is 11:00:02 am (T3).

4.

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

Up to now, Device A can calculate the following parameters based on the timestamps:

The roundtrip delay of the 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 be synchronized to Device B.
This is only a rough description of the work mechanism of NTP. For more information, see the related

protocols and standards.

NTP architecture

NTP uses stratums 1 to 16 to define clock accuracy, as shown in

Figure 6

. A lower stratum value

represents higher accuracy. Clocks at stratums 1 through 15 are in synchronized state, and clocks at
stratum 16 are not synchronized.

Figure 6 NTP architecture

Typically, a stratum 1 NTP server gets its time from an authoritative time source, such as an atomic clock,

and provides time for other devices as the primary NTP server. The accuracy of each server is the stratum,

with the topmost level (primary servers) assigned as one and each level downwards in the hierarchy

assigned as one greater than the preceding level. NTP uses a stratum to describe how many NTP hops
away a device is from the primary time server. A stratum 2 time server receives its time from a stratum 1

time server, and so on.

Primary servers

(Stratum 1)

Authoritative

clock

Server

Secondary servers

(Stratum 2)

Tertiary servers

(Stratum 3)

Quaternary servers

(Stratum 4)

Client

Symmetric

peer

Symmetric

peer

Broadcast/multicast

server

Broadcast/multicast

client