4.
When Router A receives the response packet, it adds a new receiving timestamp to it, which
is 10:00:03 am (T
4
).
Router A uses the received information to calculate the following two important values:
l
Delay for the NTP message cycle: Delay = (T
4
- T
1
) - (T
3
- T
2
).
l
Offset of Router A relative to Router B: Offset = ( (T
2
- T
1
) + (T
3
- T
4
) ) / 2.
According to the delay and the offset, Router A sets its own clock again to synchronize
with the clock of Router B.
The preceding example is only a simple description of the NTP operating principle. As
described in RFC 1305, NTP uses a more complex algorithm to ensure the precision of
clock synchronization.
The device that provides standard time is referred to as a time server, and the device that
enjoys the time service is referred to as a client.
NTP Working Modes
The NE5000E supports the following NTP working modes, as listed in
Table 2-1
NTP working mode
Working Mode
Location and
Synchronization Direction
Working Principle
Unicast Server/Client
Mode
In this mode, you need to
configure only on the client.
The server needs to be
configured with only one NTP
primary clock.
The client can be synchronized
with the server but the server
cannot be synchronized with the
client.
1. The client sends a
synchronization request
packet to the server, with
the mode field being set
to 3. The value 3
indicates the client
mode.
2. Upon receiving the
request packet, the server
automatically works in
the server mode and
sends a response packet
with the mode field being
set to 4. The value 4
indicates the server
mode.
3. After receiving the
response packet, the
client performs clock
filtering and selection,
and finally, is
synchronized with the
optimal server.
HUAWEI NetEngine5000E Core Router
Configuration Guide - System Management
2 NTP Configuration
Issue 01 (2011-10-15)
Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.
16