Network time protocol (NTP) is a time synchronization protocol defined in RFC1305. It
is used for time synchronization between a set of distributed time servers and clients.
NTP transmits packets through UDP port 123.
NTP is intended for time synchronization between all devices that have clocks in a
network so that the clocks of all devices can keep consistent. Thus, the devices can
provide multiple unified-time-based applications.
A local system running NTP can not only be synchronized by other clock sources, but
also serve as a clock source to synchronize other clocks. Besides, it can synchronize,
or be synchronized by other systems by exchanging NTP p ackets.
NTP Configuration
1.1.1 Applications of NTP
NTP is mainly applied to synchronizing the clocks of all devices in a network. For
example:
zIn network management, the analysis of the log information and debugging
information collected from different devices is meaningful and valid only when
network devices that generate the information adopts the same time.
z The billing system requires that the clocks of all network devices be consistent.
z Some functions, such as restarting all network devices in a network
simultaneously require that they adopt the same time.
zWhen multiple systems cooperate to handle a rather complex transaction, they
must adopt the same time to ensure a correct execution order.
zTo perform incremental backup operations between a backup server and a host,
you must make sure they adopt the same time.
As setting the system time manually in a network with many devices leads to a lot of
workload and cannot ensure the accuracy, it is unfeasible for an administrator to
perform the operation. However, an administrator can synchronize the clocks of
devices in a network with required accuracy by performing NTP configuration.
NTP has the following advantages:
zDefining the accuracy of clocks by stratum to synchronize the clocks of all devices
in a network quickly
z Supporting access control and MD5 authentication
z Sending protocol packets in unicast, multicast, or broadcast mode
z The clock stratum determines the accuracy, which ranges from 1 to 16. The stratum
of a reference clock ranges from 1 to 15. The clock accuracy decreases as the
stratum number increases. A s tratum 16 clock is in the uns ynchronized state and
cannot serve as a reference clock.
zThe local clock of an S3600 Ethernet switch cannot operate as a reference clock. It
can serve as a NTP server only after synchronized.
1.1.2 Implementation Principle of NTP
Figure 1-1 shows the implementation principle of NTP.
Ethernet switch A (LS_A) is connected to Ethernet switch B (LS_B) through Ethernet
ports. Both have their own system clocks, and they need to synchronize the clocks of
each other through NTP. To help you to understand the implementation principle, we
suppose that:
NTP Configuration
zBefore the system clocks of LS_A and LS_B are synchronized, the clock of LS_A
is set to 10:00:00 am, and the clock of LS_B is set to 11:00:00 am.
zLS_B serves as the NTP server, that is, the clock of LS_A will be synchronized to
that of LS_B.
zIt takes one second to transfer an NTP packet from LS_A to LS_B or from LS_A to
The procedure of synchronizing the system clock is as follows:
zLS_A sends an NTP packet to LS_B, with a timestamp 10:00:00 am (T
1
identifying when it is sent.
zWhen the packet arrives at LS_B, LS_B inserts its own timestamp 11:00:01 am (T
into the packet.
zWhen the NTP packet leaves LS_B, LS_B inserts its own timestamp 11:00:02 am
) into the packet.
(T
3
zWhen receiving a response packet, LS_A inserts a new timestamp 10:00:03 am
) into it.
(T
4
At this time, LS_A has enough information to calculate the following two parameters:
zDelay for an NTP packet to make a round trip between LS_A and LS_B:
Delay = (T
zTime offset of LS_A relative to LS_B:
Offset = ((T
-T1)-(T3 -T2).
4
) + (T3 -T4))/2.
2 -T1
LS_A can then set its own clock according to the above information to synchronize its
clock to that of LS_B.
For detailed information, refer to RFC1305.
)
)
2
1-3
Operation Manual – NTP
r
H3C S3600 Series Ethernet Switches-Release 1510 Chapter 1
1.1.3 NTP Implementation Modes
According to the network structure and the position of the local Ethernet switch in the
network, the local Ethernet switch can work in multiple NTP modes to synchronize the
clock.
I. Client/server mode
NTP Configuration
ClientSe
Filters and selects
a clocks and
synchronize the
local clock to that of
the preferred server
In the peer mode, the local S3600 Ethernet switch serves as the active peer and sends
clock synchronization request packets first, while the remote server serves as the
passive peer automatically.
If both of the peers have reference clocks, the one with a smaller stratum number is
adopted.
zConfigure the local S3600 Ethernet switch to operate in
NTP broadcast server mode. In this mode, the local
switch broadcasts NTP packets through the VLAN
Broadcast mode
interface configured on the switch.
zConfigure the S3600 switch to operate in NTP broadcast
client mode. In this mode, the local S3600 switch
receives broadcast NTP packets through the VLAN
interface configured on the switch.
zConfigure the local S3600 Ethernet switch to operate in
NTP multicast server mode. In this mode, the local switch
sends multicast NTP packets through the VLAN interface
Multicast mode
configured on the switch.
zConfigure the local S3600 Ethernet switch to operate in
NTP multicast client mode. In this mode, the local switch
receives multicast NTP packets through the VLAN
interface configured on the switch.
NTP Configuration
Caution:
An S3600 Ethernet switch can operate in the NTP peer, NTP broadcast server, or NTP
multicast server mode only after its clock is synchronized.
1.2 Configuring NTP Implementation Modes
An S3600 Ethernet switch can operate in one of the following NTP modes:
z NTP client mode
z NTP server mode
z NTP peer mode
z NTP broadcast server mode
z NTP broadcast client mode
z NTP multicast server mode
z NTP multicast client mode
1.2.1 Configuration Prerequisites
You need to perform configurations only on the client (or the active peer) when you
want an S3600 Ethernet switch to operate in NTP server mode (or NTP peer mode).
However, you need to perform configurations on both the server and client when you
want the switch to operate in NTP broadcast mode or NTP multicast mode.
1-6
Loading...
+ 16 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.