97
Displaying and maintaining NTP
Execute
display
commands in any view.
Task
Command
Display information about IPv6 NTP associations.
display ntp-service ipv6 sessions
[
verbose
]
Display information about IPv4 NTP associations.
display ntp-service sessions
[
verbose
]
Display information about NTP service status.
display ntp-service status
Display brief information about the NTP servers from
the local device back to the primary reference
source.
display ntp-service trace
[
source
interface-type
interface-number
]
NTP configuration examples
NTP client/server mode configuration example
Network requirements
As shown in
, perform the following tasks:
•
Configure the local clock of Device A as a reference source, with stratum level 2.
•
Configure Device B to operate in client mode and Device A to be used as the NTP server for
Device B.
Figure 36
Network diagram
Configuration procedure
1.
Assign an IP address to each interface, and make sure Device A and Device B can reach each
other, as shown in
. (Details not shown.)
2.
Configure Device A:
# Enable the NTP service.
<DeviceA> system-view
[DeviceA] ntp-service enable
# Specify the local clock as the reference source, with stratum level 2.
[DeviceA] ntp-service refclock-master 2
3.
Configure Device B:
# Enable the NTP service.
<DeviceB> system-view
[DeviceB] ntp-service enable
# Specify Device A as the NTP server of Device B so that Device B is synchronized to Device A.
[DeviceB] ntp-service unicast-server 1.0.1.11
4.
Verify the configuration:
# Verify that Device B has synchronized to Device A, and the clock stratum level is 3 on Device
B and 2 on Device A.
1.0.1.11/24
1.0.1.12/24
Device A
Device B