292
C
35: NTP C
HAPTER
Working Principle of NTP
ONFIGURATION
The working principle of NTP is shown in Figure 89.
In Figure 89, The Ethernet switch A (LS_A) is connected to the Ethernet switch B
(LS_B) through their Ethernet ports. Both of them have system clocks of their own,
and they need to synchronize the clocks of each other through NTP. For ease of
understanding, suppose that:
Before the system clocks of LS_A and LS_B are synchronized, the clock of LS_A is
■
set to 10:00:00am, and the clock of LS_B is set to 11:00:00am.
LS_B serves as the NTP time server, that is, the clock of LS_A will be synchronized
■
to that of LS_B.
It takes one second for a packet sent by one switch to reach the other.
■
Figure 89 Working principle of NTP
NTP Packet
NTP Packet
1.
1.
1.
1.
1.
1.
1.
1.
2.
2.
2.
2.
2.
2.
2.
2.
3.
3.
3.
3.
3.
3.
3.
3.
NTP Packet received at 10:00:03
NTP Packet received at 10:00:03 am
NTP Packet received at 10:00:03
NTP Packet received at 10:00:03 am
NTP Packet received at 10:00:03
NTP Packet received at 10:00:03 am
NTP Packet received at 10:00:03
NTP Packet received at 10:00:03 am
4.
4.
4.
4.
4.
4.
4.
4.
The procedures of synchronizing system clocks are as follows:
LS_A sends an NTP packet to LS_B, with the timestamp identifying the time when
■
it is sent (that is, 10:00:00am, noted as T
When the packet arrives at LS_B, LS_B inserts its own timestamp, which identifies
■
11:00:01am (noted as T
Before this NTP packet leaves LS_B, LS_B inserts its own timestamp once again,
■
which identifies 11:00:02am (noted as T
When receiving the response packet, LS_A inserts a new timestamp, which
■
identifies 10:00:03am (noted as T
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
10:00:00 am
10:00:00 am
10:00:00 am
10:00:00 am
10:00:00am
10:00:00am
10:00:00am
10:00:00am
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
NTP Packet 10:00:00 am
NTP Packet 10:00:00 am
NTP Packet10:00:00am
NTP Packet10:00:00 am
NTP Packet10:00:00am
NTP Packet10:00:00am
NTP Packet10:00:00 am
NTP Packet10:00:00am
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
10:00:00 am 11:00:01 am 11:00:02 am
10:00:00 am 11:00:01 am 11:00:02 am
10:00:00 am 11:00:01 am
10:00:00am
10:00:00 am 11:00:01 am
10:00:00am
10:00:00am
10:00:00am
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
Netw ork
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
) into the packet.
2
), into it.
4
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
11:00:01 am
11:00:01 am
11:00:01am
11:00:01am
11:00:01 am
11:00:01am
11:00:01am
11:00:01 am
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
11:00:01am
11:00:01am
11:00:01am
11:00:01am
11:00:02am
11:00:02am
11:00:02 am
11:00:02am
11:00:02am
11:00:02 am
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
LS_B
) carried.
1
).
3
Need help?
Do you have a question about the 4200G 12-Port and is the answer not in the manual?