H3C S6850&S9850&S9820-64H Config Examples-Release 655x-6W100

HomeSupportResource CenterH3C S6850&S9850&S9820-64H Config Examples-Release 655x-6W100
Table of Contents
Related Documents
47-NTP Configuration Examples
Title Size Download
47-NTP Configuration Examples 266.07 KB

 

H3C S6850 & S9850 & S9820-64H

NTP Configuration Examples

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2020 New H3C Technologies Co., Ltd. All rights reserved.

No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd.

Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.

The information in this document is subject to change without notice.


Contents

Introduction· 1

Prerequisites· 1

Example: Configuring NTP client/server mode· 1

Network configuration· 1

Applicable hardware and software versions· 1

Procedures· 2

Configuring Device A· 2

Configuring Device B· 2

Configuring Device C· 2

Verifying the configuration· 2

Configuration files· 3

Example: Configuring NTP broadcast mode· 4

Network configuration· 4

Applicable hardware and software versions· 4

Procedures· 4

Configuring Device C· 4

Configuring Device A, Device B, Device D, and Device E· 5

Verifying the configuration· 5

Configuration files· 5

Example: Configuring NTP multicast mode· 7

Network configuration· 7

Applicable hardware and software versions· 7

Procedures· 7

Configuring Device C· 7

Configuring Device D·· 8

Configuring Device B· 8

Configuring Device A· 9

Verifying the configuration· 9

Configuration files· 9

Example: Configuring NTP authentication in client/server mode· 10

Network configuration· 10

Applicable hardware and software versions· 11

Procedures· 11

Configuring Device A· 11

Configuring Device B· 12

Configuring Device C· 12

Verifying the configuration· 12

Configuration files· 13

Example: Configuring SNTP· 14

Network configuration· 14

Applicable hardware and software versions· 14

Procedures· 14

Configuring Device A· 14

Configuring Device B· 15

Configuring Device C· 15

Verifying the configuration· 15

Configuration files· 15

Example: Configuring IPv6 NTP client/server mode· 16

Network configuration· 16

Applicable hardware and software versions· 16

Procedures· 17

Configuring Device A· 17

Configuring Device B· 17

Configuring Device C· 17

Verifying the configuration· 17

Configuration files· 18

Example: Configuring IPv6 NTP multicast mode· 19

Network configuration· 19

Applicable hardware and software versions· 19

Procedures· 19

Configuring Device C· 19

Configuring Device D·· 20

Configuring Device B· 20

Configuring Device A· 21

Verifying the configuration· 21

Configuration files· 21

Example: Configuring NTP authentication in broadcast mode· 22

Network configuration· 22

Applicable hardware and software versions· 23

Procedures· 23

Configure Device C· 23

Configure Device A· 24

Verifying the configuration· 24

Configuration files· 24

Related documentation· 25

 


Introduction

This document provides NTP configuration examples.

Prerequisites

This document is not restricted to specific software or hardware versions.

The configuration examples in this document were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.

This document assumes that you have basic knowledge of NTP.

Example: Configuring NTP client/server mode

Network configuration

As shown in Figure 1, configure NTP client/server mode so that all devices can be synchronized to Device A, the NTP server.

Figure 1 Network diagram

 

Applicable hardware and software versions

The following matrix shows the hardware and software versions to which this configuration example is applicable:

 

Hardware

Software version

S6850 switch series

S9850 switch series

Release 6555P01

S9820-64H switch

Release 6555P01

 

Procedures

Configuring Device A

# Assign an IP address to VLAN-interface 2.

<DeviceA> system-view

[DeviceA] interface Vlan-interface 2

[DeviceA-Vlan-interface2] ip address 1.0.1.11 24

[DeviceA-Vlan-interface2] quit

# Enable the NTP service.

[DeviceA] ntp-service enable

# Specify the local clock as the reference source, with the stratum level 2.

[DeviceA] ntp-service refclock-master 2

Configuring Device B

# Assign an IP address to VLAN-interface 2. (Details not shown.)

# 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

Configuring Device C

# Assign an IP address to VLAN-interface 2. (Details not shown.)

# Enable the NTP service.

<DeviceC> system-view

[DeviceC] ntp-service enable

# Specify Device A as the NTP server of Device C so that Device C is synchronized to Device A.

[DeviceC] ntp-service unicast-server 1.0.1.11

Verifying 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.

[DeviceB] display ntp-service status

 Clock status: synchronized 

 Clock stratum: 3

 System peer: 1.0.1.11      

 Local mode: client         

 Reference clock ID: 1.0.1.11

 Leap indicator: 00         

 Clock jitter: 0.003479 s   

 Stability: 0.000 pps       

 Clock precision: 2^-18     

 Root delay: 1.95313 ms     

 Root dispersion: 28.38135 ms

 Reference time: d5ed8cd5.577006ea  Wed, Sep 5 2019 16:24:53.341

# Verify that an IPv4 NTP association has been established between Device B and Device A.

[DeviceB] display ntp-service sessions

        source          reference       stra reach poll  now offset  delay disper

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

[12345]1.0.1.11        127.127.1.0        2   255   64   38 -10.22 1.9531 3.3416

Notes: 1 source(master), 2 source(peer), 3 selected, 4 candidate, 5 configured.

 Total sessions: 1

Configuration files

·           Device A:

#

interface Vlan-interface2

 ip address 1.0.1.11 255.255.255.0

#

 ntp-service enable

 ntp-service refclock-master 2

#

·           Device B:

#

interface Vlan-interface2

 ip address 1.0.1.12 255.255.255.0

#

 ntp-service enable

 ntp-service unicast-server 1.0.1.11

#

·           Device C:

#

interface Vlan-interface2

 ip address 1.0.1.13 255.255.255.0

#

 ntp-service enable

 ntp-service unicast-server 1.0.1.11

#

Example: Configuring NTP broadcast mode

Network configuration

As shown in Figure 2, the devices are on the same network segment. Configure NTP broadcast mode so that all the devices can be synchronized to Device C, the NTP server.

Figure 2 Network diagram

 

Applicable hardware and software versions

The following matrix shows the hardware and software versions to which this configuration example is applicable:

 

Hardware

Software version

S6850 switch series

S9850 switch series

Release 6555P01

S9820-64H switch

Release 6555P01

 

Procedures

Configuring Device C

# Enable the NTP service.

<DeviceC> system-view

[DeviceC] ntp-service enable

# Specify the local clock as the reference source, with the stratum level 2.

[DeviceC] ntp-service refclock-master 2

# Assign an IP address to VLAN-interface 2.

[DeviceC] interface Vlan-interface 2

[DeviceC-Vlan-interface2] ip address 3.0.1.31 24

# Configure Device C to operate in broadcast server mode and send broadcast messages from VLAN-interface 2.

[DeviceC-Vlan-interface2] ntp-service broadcast-server

Configuring Device A, Device B, Device D, and Device E

# Assign an IP address to VLAN-interface 2. (Details not shown.)

# Enable the NTP service.

<DeviceA> system-view

[DeviceA] ntp-service enable

# Configure Device A to operate in broadcast client mode and receive broadcast messages on VLAN-interface 2.

[DeviceA-Vlan-interface2] ntp-service broadcast-client

# Configure Device B, Device D, and Device E in the same way Device A is configured. (Details not shown.)

Verifying the configuration

# Verify that Device A has synchronized to Device C, and the clock stratum level is 3 on Device A and 2 on Device C.

[DeviceA-Vlan-interface2] display ntp-service status

 Clock status: synchronized       

 Clock stratum: 3

 System peer: 3.0.1.31      

 Local mode: bclient        

 Reference clock ID: 3.0.1.31

 Leap indicator: 00         

 Clock jitter: 0.000061 s   

 Stability: 0.000 pps       

 Clock precision: 2^-18     

 Root delay: 0.00000 ms     

 Root dispersion: 7951.43127 ms   

 Reference time: d5ee8d88.2faabed0  Thu, Sep 6 2019 10:40:08.186

# Verify that an IPv4 NTP association has been established between Device A and Device C.

[DeviceA-Vlan-interface2] display ntp-service sessions

      source          reference       stra reach poll  now offset  delay disper

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

 [1234]3.0.1.31        127.127.1.0        2   254   64   82 -2.190 0.0000 7937.5

Notes: 1 source(master), 2 source(peer), 3 selected, 4 candidate, 5 configured.

 Total sessions: 1

Configuration files

·           Device C:

#

interface Vlan-interface2

 ip address 3.0.1.31 255.255.255.0

 ntp-service broadcast-server

#

 ntp-service enable

 ntp-service refclock-master 2

#

·           Device A:

#

interface Vlan-interface2

 ip address 3.0.1.33 255.255.255.0

 ntp-service broadcast-client

#

 ntp-service enable

#

·           Device B:

#

interface Vlan-interface2

 ip address 3.0.1.30 255.255.255.0

 ntp-service broadcast-client

#

 ntp-service enable

#

·           Device D:

#

interface Vlan-interface2

 ip address 3.0.1.32 255.255.255.0

 ntp-service broadcast-client

#

 ntp-service enable

#

·           Device E:

#

interface Vlan-interface2

 ip address 3.0.1.34 255.255.255.0

 ntp-service broadcast-client

#

 ntp-service enable

#

Example: Configuring NTP multicast mode

Network configuration

As shown in Figure 3, the devices are on different network segments. Configure NTP multicast mode so that all the devices can be synchronized to Device C, the NTP server.

Figure 3 Network diagram

 

Applicable hardware and software versions

The following matrix shows the hardware and software versions to which this configuration example is applicable:

 

Hardware

Software version

S6850 switch series

S9850 switch series

Release 6555P01

S9820-64H switch

Release 6555P01

 

Procedures

Configuring Device C

# Enable the NTP service.

<DeviceC> system-view

[DeviceC] ntp-service enable

# Specify the local clock as the reference source, with the stratum level 2.

[DeviceC] ntp-service refclock-master 2

# Assign an IP address to VLAN-interface 2.

[DeviceC] interface Vlan-interface 2

[DeviceC-Vlan-interface2] ip address 3.0.1.31 24

# Configure Device C to operate in multicast server mode and send multicast messages from VLAN-interface 2.

[DeviceC-Vlan-interface2] ntp-service multicast-server

Configuring Device D

# Enable the NTP service.

<DeviceD> system-view

[DeviceD] ntp-service enable

# Assign an IP address to VLAN-interface 2.

[DeviceD] interface Vlan-interface 2

[DeviceD-Vlan-interface2] ip address 3.0.1.32 24

# Configure Device D to operate in multicast client mode and receive multicast messages on VLAN-interface 2.

[DeviceD-Vlan-interface2] ntp-service multicast-client

Configuring Device B

# Assign an IP address to VLAN-interface 2. (Details not shown.)

# Enable the NTP service.

<DeviceB> system-view

[DeviceB] ntp-service enable

# Configure Device B to operate in multicast client mode and receive multicast messages on VLAN-interface 2.

[DeviceB-Vlan-interface2] ntp-service multicast-client

[DeviceB-Vlan-interface2] quit

Because Device A and Device C are on different subnets, you must enable the multicast functions on Device B before Device A can receive multicast messages from Device C.

# Enable IP multicast routing and IGMP.

[DeviceB] multicast routing

[DeviceB] interface vlan-interface 2

[DeviceB-Vlan-interface2] pim dm

[DeviceB-Vlan-interface2] quit

[DeviceB] vlan 3

[DeviceB-vlan3] port HundredGigE 1/0/1

[DeviceB-vlan3] quit

[DeviceB] interface vlan-interface 3

[DeviceB-Vlan-interface3] ip address 1.0.1.10 24

[DeviceB-Vlan-interface3] igmp enable

[DeviceB-Vlan-interface3] igmp static-group 224.0.1.1

[DeviceB-Vlan-interface3] quit

[DeviceB] igmp-snooping

[DeviceB-igmp-snooping] quit

[DeviceB] interface HundredGigE 1/0/1

[DeviceB-HundredGigE 1/0/1] igmp-snooping static-group 224.0.1.1 vlan 3

Configuring Device A

# Enable the NTP service.

<DeviceA> system-view

[DeviceA] ntp-service enable

# Assign an IP address to VLAN-interface 3.

[DeviceA] interface Vlan-interface 3

[DeviceA-Vlan-interface3] ip address 1.0.1.11 24

# Configure Device A to operate in multicast client mode and receive multicast messages on VLAN-interface 3.

[DeviceA-Vlan-interface3] ntp-service multicast-client

Verifying the configuration

# Verify that Device A has synchronized to Device C, and the clock stratum level is 3 on Device A and 2 on Device C.

[DeviceA-Vlan-interface3] display ntp-service status

 Clock status: synchronized 

 Clock stratum: 3

 System peer: 3.0.1.31      

 Local mode: bclient        

 Reference clock ID: 3.0.1.31

 Leap indicator: 00         

 Clock jitter: 0.000061 s   

 Stability: 0.000 pps       

 Clock precision: 2^-18     

 Root delay: 1.69373 ms     

 Root dispersion: 1950.18005 ms         

 Reference time: d5ee9b15.2f3a684d  Thu, Sep 6 2019 11:37:57.184

Configuration files

·           Device A:

#

 ntp-service enable

#

interface Vlan-interface3

 ip address 1.0.1.11 255.255.255.0

 ntp-service multicast-client

#

·           Device B:

#

ntp-service enable

#

multicast routing

#

igmp-snooping

#

interface Vlan-interface2

 ip address 3.0.1.30 255.255.255.0

 pim dm

 ntp-service multicast-client

#

interface Vlan-interface3

 ip address 1.0.1.10 255.255.255.0

 igmp enable

 igmp static-group 224.0.1.1

#

interface HundredGigE 1/0/1

 port access vlan 3

 igmp-snooping static-group 224.0.1.1 vlan 3

#

·           Device C:

#

 ntp-service enable

ntp-service refclock-master 2

#

interface Vlan-interface2

 ip address 3.0.1.31 255.255.255.0

 ntp-service multicast-server

#

·           Device D:

#

 ntp-service enable

#

interface Vlan-interface2

 ip address 3.0.1.32 255.255.255.0

 ntp-service multicast-client

#

Example: Configuring NTP authentication in client/server mode

Network configuration

As shown in Figure 4, configure NTP authentication in client/server mode so that all devices can be synchronized to Device A, the NTP server.

Figure 4 Network diagram

 

Applicable hardware and software versions

The following matrix shows the hardware and software versions to which this configuration example is applicable:

 

Hardware

Software version

S6850 switch series

S9850 switch series

Release 6555P01

S9820-64H switch

Release 6555P01

 

Procedures

Configuring Device A

# Assign an IP address to VLAN-interface 2.

<DeviceA> system-view

[DeviceA] interface Vlan-interface 2

[DeviceA-Vlan-interface2] ip address 1.0.1.11 24

# Enable the NTP service.

[DeviceA] ntp-service enable

# Specify the local clock as the reference source, with the stratum level 2.

[DeviceA] ntp-service refclock-master 2

# Enable NTP authentication on Device A.

[DeviceA] ntp-service authentication enable

# Set an authentication key, and input the key in plain text.

[DeviceA] ntp-service authentication-keyid 42 authentication-mode md5 simple aNiceKey

# Specify the key as a trusted key.

[DeviceA] ntp-service reliable authentication-keyid 42

Configuring Device B

# Assign an IP address to VLAN-interface 2. (Details not shown.)

# Enable the NTP service.

<DeviceB> system-view

[DeviceB] ntp-service enable

# Enable NTP authentication on Device B.

[DeviceB] ntp-service authentication enable

# Set an authentication key, and input the key in plain text.

[DeviceB] ntp-service authentication-keyid 42 authentication-mode md5 simple 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, and associate the server with key 42.

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

Configuring Device C

# Assign an IP address to VLAN-interface 2. (Details not shown.)

# Enable the NTP service.

<DeviceC> system-view

[DeviceC] ntp-service enable

# Enable NTP authentication on Device C.

[DeviceC] ntp-service authentication enable

# Set an authentication key, and input the key in plain text.

[DeviceC] ntp-service authentication-keyid 42 authentication-mode md5 simple aNiceKey

# Specify the key as a trusted key.

[DeviceC] ntp-service reliable authentication-keyid 42

# Specify Device A as the NTP server of Device C, and associate the server with key 42.

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

Verifying 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.

[DeviceB] display ntp-service status

 Clock status: synchronized

 Clock stratum: 3

 System peer: 1.0.1.11

 Local mode: client

 Reference clock ID: 1.0.1.11

 Leap indicator: 00

 Clock jitter: 0.005096 s

 Stability: 0.000 pps

 Clock precision: 2^-18

 Root delay: 0.00655 ms

 Root dispersion: 1.15869 ms

 Reference time: d0c62687.ab1bba7d  Mon, Sep 6 2019 16:06:26.764

# Verify that an IPv4 NTP association has been established between Device B and Device A.

[DeviceB] display ntp-service sessions

       source          reference       stra reach poll  now offset  delay disper

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

 [1245]1.0.1.11        127.127.1.0        2     1   64  519   -0.0 0.0065    0.0

Notes: 1 source(master),2 source(peer),3 selected,4 candidate,5 configured.

 Total sessions : 1  

Configuration files

·           Device A:

#

interface Vlan-interface2

 ip address 1.0.1.11 255.255.255.0

#

 ntp-service enable

 ntp-service authentication enable

 ntp-service authentication-keyid 42 authentication-mode md5 cipher $c$3$4j3SKCgQWBK3Un41B9U0JXzJX9i7IuNoSqi

 ntp-service reliable authentication-keyid 42

 ntp-service refclock-master 2

#

·           Device B:

#

interface Vlan-interface2

 ip address 1.0.1.12 255.255.255.0

#

 ntp-service enable

 ntp-service authentication enable

 ntp-service authentication-keyid 42 authentication-mode md5 cipher $c$3$22eIc8l796cpudZqiaAZ2SLzIfrgzFTVYn8X

 ntp-service reliable authentication-keyid 42

 ntp-service unicast-server 1.0.1.11 authentication-keyid 42

#

·           Device C:

#

interface Vlan-interface2

 ip address 1.0.1.13 255.255.255.0

#

 ntp-service enable

 ntp-service authentication enable

 ntp-service authentication-keyid 42 authentication-mode md5 cipher $c$3$XJzVmJ1TJbWyYAXpPXxF7JiEOZag8CehibM8

 ntp-service reliable authentication-keyid 42

 ntp-service unicast-server 1.0.1.11 authentication-keyid 42

#

Example: Configuring SNTP

Network configuration

As shown in Figure 5, configure SNTP so that all devices can be synchronized to Device A, the NTP server.

Figure 5 Network diagram

 

Applicable hardware and software versions

The following matrix shows the hardware and software versions to which this configuration example is applicable:

 

Hardware

Software version

S6850 switch series

S9850 switch series

Release 6555P01

S9820-64H switch

Release 6555P01

 

Procedures

Configuring Device A

# Assign an IP address to VLAN-interface 2.

<DeviceA> system-view

[DeviceA] interface Vlan-interface 2

[DeviceA-Vlan-interface2] ip address 1.0.1.11 24

# Enable the NTP service.

[DeviceA] ntp-service enable

# Specify the local clock as the reference source, with the stratum level 2.

[DeviceA] ntp-service refclock-master 2

Configuring Device B

# Assign an IP address to VLAN-interface 2. (Details not shown.)

# Enable the SNTP service.

<DeviceB> system-view

[DeviceB] sntp enable

# Specify Device A as the NTP server for Device B.

[DeviceB] sntp unicast-server 1.0.1.11

Configuring Device C

# Assign an IP address to VLAN-interface 2. (Details not shown.)

# Enable the SNTP service.

<DeviceC> system-view

[DeviceC] sntp enable

# Specify Device A as the NTP server for Device C.

[DeviceC] sntp unicast-server 1.0.1.11

Verifying the configuration

# Verify that an SNTP association has been established between Device B and Device A, and Device B has synchronized to Device A.

[DeviceB] display sntp sessions

SNTP server     Stratum   Version    Last receive time

1.0.1.11        2         4          Thu, Sep 6 2019 17:25:09.121 (Synced)

Configuration files

·           Device A:

#

interface Vlan-interface2

 ip address 1.0.1.11 255.255.255.0

#

 ntp-service enable

 ntp-service refclock-master 2

#

·           Device B:

#

interface Vlan-interface2

 ip address 1.0.1.12 255.255.255.0

#

 sntp enable

 sntp unicast-server 1.0.1.11

#

·           Device C:

#

interface Vlan-interface2

 ip address 1.0.1.13 255.255.255.0

#

 sntp enable

 sntp unicast-server 1.0.1.11

#

Example: Configuring IPv6 NTP client/server mode

Network configuration

As shown in Figure 1, configure IPv6 NTP client/server mode so that all devices can synchronize to Device A, the NTP server.

Figure 6 Network diagram

 

Applicable hardware and software versions

The following matrix shows the hardware and software versions to which this configuration example is applicable:

 

Hardware

Software version

S6850 switch series

S9850 switch series

Release 6555P01

S9820-64H switch

Release 6555P01

 

Procedures

Configuring Device A

# Assign an IPv6 address to VLAN-interface 2.

<DeviceA> system-view

[DeviceA] interface vlan-interface 2

[DeviceA-Vlan-interface2] ipv6 address 3000::34 64

[DeviceA-Vlan-interface2] quit

# Enable the NTP service.

[DeviceA] ntp-service enable

# Specify the local clock as the reference source, with the stratum level 2.

[DeviceA] ntp-service refclock-master 2

Configuring Device B

# Assign an IPv6 address to each interface. (Details not shown.)

# 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 3000::34

Configuring Device C

# Assign an IPv6 address to each interface. (Details not shown.)

# Enable the NTP service.

<DeviceC> system-view

[DeviceC] ntp-service enable

# Specify Device A as the NTP server of Device C so that Device C is synchronized to Device A.

[DeviceC] ntp-service unicast-server 3000::34

Verifying 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.

[DeviceB] display ntp-service status

 Clock status: synchronized

 Clock stratum: 3

 System peer: 3000::34

 Local mode: client

 Reference clock ID: 95.197.17.40

 Leap indicator: 00

 Clock jitter: 0.003479 s

 Stability: 0.000 pps

 Clock precision: 2^-18

 Root delay: 1.95313 ms

 Root dispersion: 28.38135 ms

 Reference time: d5ed8cd5.577006ea  Wed, Sep 5 2019 16:24:53.341

# Verify that an IPv6 NTP association has been established between Device B and Device A.

[DeviceB] display ntp-service ipv6 sessions

Notes: 1 source(master), 2 source(peer), 3 selected, 4 candidate, 5 configured.

 

 Source: [12345] 3000::34

 Reference: 127.127.1.0           Clock stratum: 2

 Reachabilities: 3                Poll interval: 64

 Last receive time: 62            Offset: 0.1272

 Roundtrip delay: 1.8158          Dispersion: 188.47

 

 Total sessions: 1

Configuration files

·           Device A:

#

interface Vlan-interface2

 ipv6 address 3000::34/64

#

 ntp-service enable

 ntp-service refclock-master 2

#

·           Device B:

#

interface Vlan-interface2

 ipv6 address 3000::35/64

#

 ntp-service enable

 ntp-service ipv6 unicast-server 3000::34

#

·           Device C:

#

interface Vlan-interface2

 ipv6 address 3000::36/64

#

 ntp-service enable

 ntp-service ipv6 unicast-server 3000::34

#

Example: Configuring IPv6 NTP multicast mode

Network configuration

As shown in Figure 3, the devices are on different network segments. Configure IPv6 NTP multicast mode so that all the devices on can synchronize to Device C, the NTP server.

Figure 7 Network diagram

 

Applicable hardware and software versions

The following matrix shows the hardware and software versions to which this configuration example is applicable:

 

Hardware

Software version

S6850 switch series

S9850 switch series

Release 6555P01

S9820-64H switch

Release 6555P01

 

Procedures

Configuring Device C

# Configure routing protocols so that all devices can reach each other. (Details not shown.)

# Enable the NTP service.

<DeviceC> system-view

[DeviceC] ntp-service enable

# Specify the local clock as the reference source, with the stratum level 2.

[DeviceC] ntp-service refclock-master 2

# Assign an IPv6 address to VLAN-interface 2.

[DeviceC] interface Vlan-interface 2

[DeviceC-Vlan-interface2] ipv6 address 3000::2 64

# Configure Device C to operate in IPv6 multicast server mode and send multicast messages from VLAN-interface 2.

[DeviceC-Vlan-interface2] ntp-service ipv6 multicast-server ff24::1

[DeviceC-Vlan-interface2] quit

Configuring Device D

# Configure routing protocols and assign an IP address to each interface so that all devices can reach each other. (Details not shown.)

# Enable the NTP service.

<DeviceD> system-view

[DeviceD] ntp-service enable

# Configure Device D to operate in IPv6 multicast client mode and receive multicast messages on VLAN-interface 2.

[DeviceD-Vlan-interface2] ntp-service ipv6 multicast-client ff24::1

[DeviceD-Vlan-interface2] quit

Configuring Device B

# Configure routing protocols and assign an IP address to each interface so that all devices can reach each other. (Details not shown.)

# Enable the NTP service.

<DeviceB> system-view

[DeviceB] ntp-service enable

# Configure Device B to operate in IPv6 multicast client mode and receive multicast messages on VLAN-interface 2.

[DeviceB-Vlan-interface2] ntp-service ipv6 multicast-client ff24::1

[DeviceB-Vlan-interface2] quit

Because Device A and Device C are on different subnets, you must enable IPv6 multicast functions on Device B before Device A can receive multicast messages from Device C.

# Enable IPv6 multicast functions.

[DeviceB] ipv6 multicast routing

[DeviceB-mrib6] quit

[DeviceB] interface vlan-interface 2

[DeviceB-Vlan-interface2] ipv6 pim dm

[DeviceB-Vlan-interface2] quit

[DeviceB] vlan 3

[DeviceB-vlan3] port HundredGigE 1/0/1

[DeviceB-vlan3] quit

[DeviceB] interface vlan-interface 3

[DeviceB-Vlan-interface3] mld enable

[DeviceB-Vlan-interface3] mld static-group ff24::1

[DeviceB-Vlan-interface3] quit

[DeviceB] mld-snooping

[DeviceB-mld-snooping] quit

[DeviceB] interface HundredGigE 1/0/1

[DeviceB-HundredGigE 1/0/1] mld-snooping static-group ff24::1 vlan 3

[DeviceB-mld-snooping] quit

Configuring Device A

# Configure routing protocols and assign an IP address to each interface so that all devices can reach each other. (Details not shown.)

# Enable the NTP service.

<DeviceA> system-view

[DeviceA] ntp-service enable

# Configure Device A to operate in IPv6 multicast client mode and receive multicast messages on VLAN-interface 3.

[DeviceA-Vlan-interface3] ntp-service ipv6 multicast-client ff24::1

[DeviceA-Vlan-interface3] quit

Verifying the configuration

# Verify that Device A has synchronized to Device C, and the clock stratum level is 3 on Device A and 2 on Device C.

[DeviceA] display ntp-service status

 Clock status: synchronized

 Clock stratum: 3

 System peer: 3000::2

 Local mode: bclient

 Reference clock ID: 165.84.121.65

 Leap indicator: 00

 Clock jitter: 0.000061 s

 Stability: 0.000 pps

 Clock precision: 2^-18

 Root delay: 1.69373 ms

 Root dispersion: 1950.18005 ms

 Reference time: d5ee9b15.2f3a684d  Thu, Sep 6 2019 11:37:57.184

Configuration files

·           Device A:

#

 ntp-service enable

#

interface Vlan-interface3

 ipv6 address 2000::1/64

 ntp-service ipv6 multicast-client ff24::1

#

·           Device B:

#

ntp-service enable

#

ipv6 multicast routing

#

mld-snooping

#

interface Vlan-interface2

 ipv6 address 3000::1/64

 ipv6 pim dm

 ntp-service ipv6 multicast-client ff24::1

#

interface Vlan-interface3

 ipv6 address 2000::2/64

 mld enable

 mld static-group ff24::1

#

interface HundredGigE 1/0/1

 port access vlan 3

 mld-snooping static-group ff24::1 vlan 3

#

·           Device C:

#

 ntp-service enable

ntp-service refclock-master 2

#

interface Vlan-interface2

 ipv6 address 3000::2/64

 ntp-service ipv6 multicast-server ff24::1

#

·           Device D:

#

 ntp-service enable

#

interface Vlan-interface2

 ipv6 address 3000::3/64

 ntp-service ipv6 multicast-client ff24::1

#

Example: Configuring NTP authentication in broadcast mode

Network configuration

As shown in Figure 4, all devices are on the same network segment. Configure NTP authentication in broadcast mode so that all devices can synchronize to Device A, the NTP server.

Figure 8 Network diagram

 

Applicable hardware and software versions

The following matrix shows the hardware and software versions to which this configuration example is applicable:

 

Hardware

Software version

S6850 switch series

S9850 switch series

Release 6555P01

S9820-64H switch

Release 6555P01

 

Procedures

Configure Device C

# Enable the NTP service.

<DeviceC> system-view

[DeviceC] ntp-service enable

# Specify the local clock as the reference source, with the stratum level 2 on Device C.

[DeviceC] ntp-service refclock-master 2

# Enable NTP authentication on Device C. Configure an NTP authentication key, with the key ID of 88 and key value of 123456. Input the key in plain text, and specify it as a trusted key.

[DeviceC] ntp-service authentication enable

[DeviceC] ntp-service authentication-keyid 88 authentication-mode md5 simple 123456

[DeviceC] ntp-service reliable authentication-keyid 88

# Specify Device C as an NTP broadcast server, and associate key 88 with Device C.

[DeviceC] interface vlan-interface 2

[DeviceC-Vlan-interface2] ip address 3.0.1.31 24

[DeviceC-Vlan-interface2] ntp-service broadcast-server authentication-keyid 88

[DeviceC-Vlan-interface2] quit

Configure Device A

# Enable the NTP service.

<DeviceA> system-view

[DeviceA] ntp-service enable

# Enable NTP authentication on Device A. Configure an NTP authentication key, with the key ID of 88 and key value of 123456. Input the key in plain text, and specify it as a trusted key.

[DeviceA] ntp-service authentication enable

[DeviceA] ntp-service authentication-keyid 88 authentication-mode md5 simple 123456

[DeviceA] ntp-service reliable authentication-keyid 88

# Configure Device A to operate in NTP broadcast client mode and receive NTP broadcast messages on VLAN-interface 2.

[DeviceA] interface vlan-interface 2

[DeviceA-Vlan-interface2] ntp-service broadcast-client

[DeviceA-Vlan-interface2] ip address 3.0.1.33 24

[DeviceA-Vlan-interface2] quit

# Configure Device B, Device D, and Device E in the same way Device A is configured. (Details not shown.)

Verifying the configuration

# Verify that Device A has synchronized to Device C, and the clock stratum level is 3 on Device A and 2 on Device C.

[DeviceA] display ntp-service status

 Clock status: synchronized

 Clock stratum: 3

 System peer: 3.0.1.31

 Local mode: bclient

 Reference clock ID: 3.0.1.31

 Leap indicator: 00

 Clock jitter: 0.000092 s

 Stability: 0.000 pps

 Clock precision: 2^-18

 Root delay: 2.42615 ms

 Root dispersion: 1950.98877 ms

 Reference time: d5eed631.2f498d71  Thu, Sep 6 2019 15:50:09.184

Configuration files

·           Device A, Device B, Device D, and Device E:

#

interface Vlan-interface2

 ip address 3.0.1.33 255.255.255.0

 ntp-service broadcast-client

#

 ntp-service enable

 ntp-service authentication enable

 ntp-service authentication-keyid 88 authentication-mode md5 cipher $c$3$pU6KvpS80MadhM2zM

CCSR07HX4qEbJhHvQ==

 ntp-service reliable authentication-keyid 88

#

·           Device C:

#

interface Vlan-interface2

 ip address 3.0.1.31 255.255.255.0

 ntp-service broadcast-server authentication-keyid 88

#

 ntp-service enable

 ntp-service authentication enable

 ntp-service authentication-keyid 88 authentication-mode md5 cipher $c$3$iJudDKiqCVO+gOaG53

63/fz4M3dQvHo2Fw==

 ntp-service reliable authentication-keyid 88

 ntp-service refclock-master 3

#

Related documentation

·           H3C S6850 & S9850 Switch Series Network Management and Monitoring Configuration Guide-Release 655x

·           H3C S6850 & S9850 Switch Series Network Management and Monitoring Command Reference-Release 655x

·           H3C S9820-64H Switch Network Management and Monitoring Configuration Guide-Release 655x

·           H3C S9820-64H Switch Network Management and Monitoring Command Reference-Release 655x