3Com 3.01.01 Switch User Manual


 
334 CHAPTER 11: SYSTEM MANAGEMENT
Figure 7 Basic Operating Principle of NTP
In page 334, Switch A and Switch B are connected to the Ethernet port. They have
independent system clocks. Before implementing automatic clock synchronization
on both switches, we assume that:
Before synchronizing the system clocks on Switch A and B, the clock on Switch
A is set to 10:00:00am, and the clock on B is set to 11:00:00am.
Switch B serves as an NTP time server and Switch A synchronizes the local clock
with the clock of B.
It takes 1 second to transmit a data packet from either A or B to the opposite
end.
The system clocks are synchronized as follows:
Switch A sends an NTP packet to Switch B. The packet carries the timestamp
10:00:00am (T1) that tells when it left Switch A.
When the NTP packet arrives at Switch B, Switch B adds a local timestamp
11:00:01am (T2) to it.
When the NTP packet leaves Switch B, Switch B adds another local timestamp
11:00:02am (T3) to it.
When Switch A receives the acknowledgement packet, it adds a new
timestamp 10:00:03am (T4) to it.
Next, E Switch A collects enough information to calculate the following two
important parameters:
The delay for a round trip of an NTP packet traveling between the Switch A and
B: Delay= (T4-T1) - (T3-T2).
Offset of Switch A clock relative to Switch B clock: offset= ( (T2-T1) + (T3-T4) )
/2.