
29
Nominal frequency: 64.0000 Hz
Actual frequency: 64.0000 Hz
Clock precision: 2^7
Clock offset: 0.0000 ms
Root delay: 40.00 ms
Root dispersion: 10.83 ms
Peer dispersion: 34.30 ms
Reference time: 16:02:49.713 UTC Sep 19 2005 (C6D95F6F.B6872B02)
As shown above, Device A has been synchronized to Device C, and the clock stratum level of Device A
is 3, while that of Device C is 2.
# View the NTP session information of Device A, which shows that an association has been set up
between Device A and Device C.
[DeviceA-Vlan-interface3] display ntp-service sessions
source reference
stra reach poll now offset delay disper
**************************************************************************
[1234] 3.0.1.31 127.127.1.0 2 255 64 26 -16.0 40.0 16.6
note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured
Total associations : 1
Configuring NTP client/server mode with authentication
Network requirements
As shown in
, perform the following configurations to synchronize the time between Device B
and Device A and ensure network security as follows:
•
The local clock of Device A is to be configured as a reference source, with the stratum level of 2.
•
Device B works in client mode and Device A is to be used as the NTP server of Device B, with Device
B as the client.
•
NTP authentication is to be enabled on both Device A and Device B.
Figure 15
Network diagram
Configuration procedure
1.
Set the IP address for each interface as shown in
. (Details not shown)
2.
Configure Device B:
<DeviceB> system-view
# Enable NTP authentication on Device B.
[DeviceB] ntp-service authentication enable
# Set an authentication key.
[DeviceB] ntp-service authentication-keyid 42 authentication-mode md5 aNiceKey
# Specify the key as a trusted key.
[DeviceB] ntp-service reliable authentication-keyid 42
# Specify Device A as the NTP server of Device B.