75
The output shows that Switch A has been synchronized to Switch C, and the clock stratum level of Switch
A is 3, while that of Switch C is 2.
# View the NTP session information of Switch A, which shows that an association has been set up
between Switch A and Switch C.
[SwitchA-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
NOTE:
For more information about how to configure IGMP and PIM, see
IP Multicast
Configuration Guide
.
Configuring NTP client/server mode with authentication
example
Network requirements
As shown in Figure 29, perform the following configurations to synchronize the time between Switch B
and Switch A and ensure network security.
• The local clock of Switch A is to be configured as a reference source, with the stratum level of 2.
• Switch B works in client mode and Switch A is to be used as the NTP server of Switch B, with Switch
B as the client.
• NTP authentication is to be enabled on both Switch A and Switch B.
Figure 29 Network diagram for configuration of NTP client/server mode with authentication
Configuration procedure
1. Set the IP address for each interface as shown in Figure 29. The configuration procedure is omitted.
2. Configuration on Switch B:
<SwitchB> system-view
# Enable NTP authentication on Switch B.
[SwitchB] ntp-service authentication enable
# Set an authentication key.
[SwitchB] ntp-service authentication-keyid 42 authentication-mode md5 aNiceKey
# Specify the key as a trusted key.
[SwitchB] ntp-service reliable authentication-keyid 42
# Specify Switch A as the NTP server of Switch B.
[SwitchB] ntp-service unicast-server 1.0.1.11 authentication-keyid 42
Before Switch B can synchronize its clock to that of Switch A, enable NTP authentication for Switch A.