H3C S3600 Series Operation Manual

Operation Manual – NTP H3C S3600 Series Ethernet Switches-Release 1510 Table of Contents
Table of Contents
Chapter 1 NTP Configuration.......................................................................................................1-1
1.1 Introduction to NTP............................................................................................................1-1
1.1.1 Applications of NTP................................................................................................. 1-1
1.1.2 Implementation Principle of NTP.............................................................................1-2
1.1.3 NTP Implementation Modes....................................................................................1-4
1.2 Configuring NTP Implementation Modes...........................................................................1-6
1.2.1 Configuration Prerequisites..................................................................................... 1-6
1.2.2 Configuration Procedure......................................................................................... 1-7
1.3 Configuring Access Control Right...................................................................................... 1-9
1.4 Configuring NTP Authentication ........................................................................................ 1-9
1.4.1 Configuration Prerequisites................................................................................... 1-10
1.4.2 Configuration Procedure....................................................................................... 1-10
1.5 Configuring Optional NTP Parameters............................................................................ 1-12
1.6 Displaying and Debugging NTP.......................................................................................1-13
1.7 Configuration Example .................................................................................................... 1-13
1.7.1 Configuring NTP Server Mode..............................................................................1-13
1.7.2 Configuring NTP Peer Mode.................................................................................1-15
1.7.3 Configuring NTP Broadcast Mode........................................................................1-16
1.7.4 Configuring NTP Multicast Mode.......................................................................... 1-19
1.7.5 Configuring NTP Server Mode with Authentication...............................................1-21
i
Operation Manual – NTP H3C S3600 Series Ethernet Switches-Release 1510 Chapter 1
Chapter 1 NTP Configuration

1.1 Introduction to NTP

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:
z In 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.
z When multiple systems cooperate to handle a rather complex transaction, they
must adopt the same time to ensure a correct execution order.
z To 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:
z Defining 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
1-1
Operation Manual – NTP H3C S3600 Series Ethernet Switches-Release 1510 Chapter 1
Note:
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.
z The 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
z Before 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.
z LS_B serves as the NTP server, that is, the clock of LS_A will be synchronized to
that of LS_B.
z It takes one second to transfer an NTP packet from LS_A to LS_B or from LS_A to
LS_B.
1-2
Operation Manual – NTP H3C S3600 Series Ethernet Switches-Release 1510 Chapter 1
NTP Configuration
NTP packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
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.
4.
4.
4.
4.
4.
4.
4.
4.
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
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
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
LS_A
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
NTP packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
NTP Packet
Network
Network
Network
Network
Network
Network
Network
Network
NTP packet 10:00:00 am
NTP Packet10:00:00am
NTP Packet10:00:00 am
NTP Packet10:00:00am
NTP Packet 10:00:00 am
NTP Packet10:00:00am
NTP Packet10:00:00 am
NTP Packet10:00:00am
Network
Network
Network
Network
Network
Network
Network
Network
10:00:00 am11:00:01 am11:00:02 am
10:00:00am 11:00:01am 11:00:02am
10:00:00 am11:00:01 am 11:00:02 am
10:00:00am 11:00:01am 11:00:02am
10:00:00 am11:00:01 am11:00:02 am
10:00:00am 11:00:01am 11:00:02am
10:00:00 am11:00:01 am 11:00:02 am
10:00:00am 11:00:01am 11:00:02am
Network
Network
Network
Network
Network
Network
Network
Network
Network
Network
Network
Network
Network
Network
Network
Network
Figure 1-1 Implementation principle of NTP
_B
_B
_B
_B
_B
_B
LS
LS
LS
LS
LS
LS
LS_B
LS_B
11:00:01 am
11:00:01am
11:00:01 am
11:00:01am
11:00:01 am
11:00:01am
11:00:01 am
11:00:01am
LS
LS
_B
_B
_B
_B
_B
_B
_B
_B
LS
LS
LS
LS
LS
LS
LSLS_B
LSLS_B
LSLS_B
LS
_B
LSLS_B
LSLS_B
LSLS_B
LS
_B
_B
_B
_B
LS_B
_B
_B
_B
LS_B
The procedure of synchronizing the system clock is as follows:
z LS_A sends an NTP packet to LS_B, with a timestamp 10:00:00 am (T
1
identifying when it is sent.
z When the packet arrives at LS_B, LS_B inserts its own timestamp 11:00:01 am (T
into the packet.
z When the NTP packet leaves LS_B, LS_B inserts its own timestamp 11:00:02 am
) into the packet.
(T
3
z When 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:
z Delay for an NTP packet to make a round trip between LS_A and LS_B:
Delay = (T
z Time 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
Client Se
Filters and selects
a clocks and
synchronize the local clock to that of the preferred server
Clock synchronization
request packet
Response packet
Figure 1-2 Client/sever mode

II. Peer mode

Active peer
In peer mode, both
sides can be
synchronized to each
other
Clock synchronization
Network
NetworkNetworkNetwork
NetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetwork
NetworkNetworkNetworkNetworkNetworkNetworkNetworkNetworkNetwork
NetworkNetwork
request packet
Response pac ket
Synchronize
rver
Works in server mode
automatically and send
a response packet
Pas
sive peer
Works in passive pee
mode automatically
Figure 1-3 Peer mod
e
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.
1-4
Operation Manual – NTP H3C S3600 Series Ethernet Switches-Release 1510 Chapter 1

III. Broadcast mode

NTP Configuration
Server
Works in the server
mode automatically and
sends response pack ets
Figure 1-4 Broadcast mod

IV. Multicast mode

Server
Works in the server
mode automatically and
sends response pack ets
Network
Network
NetworkNetwork
Broadcasts clock synchronization
packets periodically
Client/server mode request
Response packet
Broadcasts clock synchronization
packets periodically
e
Network
Network
NetworkNetwork
Multicasts clock synchronization
packets periodically
Client/server mode request
Response packet
Multicasts clock synchronization
packets periodically
Client
Initiates a cl
request after
broadc
Obtains t
client and s
Receives br
Client
Initiates a c
request afte
Obtains t
client and s
Receiv es
he delay between the
the broadc
synchroni
multi
he delay between the
the mult
multicast packets and
synchroni
ient/server mode
receiving the first
ast packet
erver and works in
ast client mode
oadcast packets and zes the local cl ock
lient/server mode r receiving the first cast packet
erver and works in
icast client mode
zes the local clock
Figure 1-5 Multicast mod
e
Table 1-1 describes ho w the above ment ioned NTP modes are impl emented on S3600 series Ethernet switches.
Table 1-1 NTP implementation modes on S3600 series Ethernet switches
NTP
implementation
Configuration on S3600 series switches
mode
Configure the local S3600 Ethernet switch to operate in the
Client/server mode
NTP server mode. In this mode, the remote server serves as the local time server, while the local switch serves as the client.
Configure the local S3600 switch to operate in NTP peer
Peer mode
mode. In this mode, the remote server serves as the peer of the S3600 switch, and the local switch serves as the active peer.
1-5
Operation Manual – NTP H3C S3600 Series Ethernet Switches-Release 1510 Chapter 1
NTP
implementation
Configuration on S3600 series switches
mode
z Configure 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.
z Configure 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.
z Configure 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.
z Configure 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