H3C Technologies H3C WX3000 Series Unified Switches User Manual

Page 471

Advertising
background image

46-20

The output information indicates that Device D is synchronized to Device C, with a clock stratum level of
3, one stratum level lower than that Device C.

# View the information about the NTP sessions of Device D (You can see that a connection is
established between Device D and Device C).

[DeviceD] display ntp-service sessions

source reference stra reach poll now offset delay disper

**************************************************************************

[1234]3.0.1.31 127.127.1.0 2 1 64 377 26.1 199.53 9.7

note: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured Total

associations : 1

Configuring NTP Server/Client Mode with Authentication

Network requirements

z

As shown in

Figure 46-10

, the local clock of Device A is set as the NTP master clock, with a clock

stratum level of 2.

z

Device B is a WX3000 series device and uses Device A as the NTP server. Device B is set to work
in client mode, while Device A works in server mode automatically.

z

The NTP authentication function is enabled on Device A and Device B.

Figure 46-10

Network diagram for NTP server/client mode with authentication configuration

1.0.1.11/24

1 .0.1.12/24

Device A

Device B

Configuration procedure

1) Configure Device B.

# Enter system view.

<DeviceB> system-view

# Set Device A as the NTP server.

[DeviceB] ntp-service unicast-server 1.0.1.11

# Enable the NTP authentication function.

[DeviceB] ntp-service authentication enable

# Configure an MD5 authentication key, with the key ID being 42 and the key being aNiceKey.

[DeviceB] ntp-service authentication-keyid 42 authentication-mode md5 aNiceKey

# Specify the key 42 as a trusted key.

[DeviceB] ntp-service reliable authentication-keyid 42

[DeviceB] ntp-service unicast-server 1.0.1.11 authentication-keyid 42

After the above configurations, Device B is ready to synchronize with Device A. Because the NTP
authentication function is not enabled on Device A, the clock of Device B will fail to be synchronized to
that of Device A.

2) To synchronize Device B, you need to perform the following configurations on Device A.

# Enable the NTP authentication function.

[DeviceA] system-view

[DeviceA] ntp-service authentication enable

# Configure an MD5 authentication key, with the key ID being 42 and the key being aNiceKey.

Advertising