H3C S12500R Ethernet Switch Router Series Config Examples-Release 36xx-6W100

HomeSupportSwitchesS12500R SeriesConfigure & DeployConfiguration ExamplesH3C S12500R Ethernet Switch Router Series Config Examples-Release 36xx-6W100
Table of Contents
Related Documents
40-NTP Configuration Examples
Title Size Download
40-NTP Configuration Examples 228.07 KB

 

H3C S12500R Switch Router Series

NTP Configuration Examples

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2021 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 the NTP client/server mode· 1

Network configuration· 1

Software version used· 1

Restrictions and guidelines· 1

Procedures· 1

Configuring Device A· 1

Configuring Device B· 2

Verifying the configuration· 2

Configuration files· 2

Example: Configuring the NTP broadcast mode· 3

Network configuration· 3

Software version used· 3

Restrictions and guidelines· 4

Procedures· 4

Configuring Router C· 4

Configuring Router A· 4

Configuring Router B· 4

Verifying the configuration· 4

Configuration files· 5

Example: Configuring the NTP multicast mode· 6

Network configuration· 6

Software version used· 6

Restrictions and guidelines· 6

Procedures· 6

Configuring Router C· 6

Configuring Router D·· 7

Configuring Router B· 7

Configuring Router A· 7

Verifying the configuration· 8

Configuration files· 8

Example: Configuring NTP client/server mode with authentication· 9

Network configuration· 9

Software version used· 9

Restrictions and guidelines· 9

Procedures· 9

Configuring Device A· 9

Configuring Device B· 10

Verifying the configuration· 10

Configuration files· 11

Example: Configuring SNTP·· 11

Network configuration· 11

Software version used· 12

Restrictions and guidelines· 12

Procedures· 12

Configuring Device A· 12

Configuring Device B· 12

Verifying the configuration· 12

Configuration files· 12

Example: Configuring the IPv6 NTP client/server mode· 13

Network configuration· 13

Software version used· 13

Restrictions and guidelines· 13

Procedures· 13

Configuring Device A· 13

Configuring Device B· 14

Verifying the configuration· 14

Configuration files· 14

Example: Configuring the IPv6 NTP multicast mode· 15

Network configuration· 15

Software version used· 15

Restrictions and guidelines· 16

Procedures· 16

Configuring Router C· 16

Configuring Router D·· 16

Configuring Router B· 16

Configuring Router A· 17

Verifying the configuration· 17

Configuration files· 17

Example: Configuring the NTP broadcast mode with authentication· 18

Network configuration· 18

Software version used· 19

Restrictions and guidelines· 19

Procedures· 19

Configuring Router C· 19

Configuring Router A· 20

Configuring Router B· 20

Verifying the configuration· 20

Configuration files· 21

Related documentation· 21

 


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 the NTP client/server mode

Network configuration

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

Figure 1 Network diagram

 

Software version used

This configuration example was created and verified on R3606.

Restrictions and guidelines

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Device A

# Assign an IP address to HundredGigE 1/0/1.

<DeviceA> system-view

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] ip address 1.0.1.11 24

[DeviceA-HundredGigE1/0/1] quit

# Enable the NTP service.

[DeviceA] ntp-service enable

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

[DeviceA] ntp-service refclock-master 2

Configuring Device B

# Assign an IP address to HundredGigE 1/0/1. (Details not shown.)

# Enable the NTP service.

<DeviceB> system-view

[DeviceB] ntp-service enable

# Specify NTP for obtaining the time.

[DeviceB] clock protocol ntp

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

[DeviceB] 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         

 NTP version: 4             

 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 25 2020 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 hundredgige 1/0/1

 ip address 1.0.1.11 255.255.255.0

#

 ntp-service enable

 ntp-service refclock-master 2

#

·     Device B:

#

interface hundredgige 1/0/1

 ip address 1.0.1.12 255.255.255.0

#

 ntp-service enable

 ntp-service unicast-server 1.0.1.11

#

Example: Configuring the NTP broadcast mode

Network configuration

As shown in Figure 2, configure the NTP broadcast mode so all devices on the same network segment can be synchronized to Router C.

Figure 2 Network diagram

 

Software version used

This configuration example was created and verified on R3606.

Restrictions and guidelines

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Router C

# Enable the NTP service.

<RouterC> system-view

[RouterC] ntp-service enable

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

[RouterC] ntp-service refclock-master 2

# Assign an IP address to HundredGigE 1/0/1.

[RouterC] interface hundredgige 1/0/1

[RouterC-HundredGigE1/0/1] ip address 3.0.1.31 24

# Configure Router C to operate in broadcast server mode and send broadcast messages from HundredGigE 1/0/1.

[RouterC-HundredGigE1/0/1] ntp-service broadcast-server

Configuring Router A

# Enable the NTP service.

<RouterA> system-view

[RouterA] ntp-service enable

# Assign an IP address to HundredGigE 1/0/1.

[RouterA] interface hundredgige 1/0/1

[RouterA-HundredGigE1/0/1] ip address 3.0.1.30 24

# Configure Router A to operate in broadcast client mode and receive broadcast messages on HundredGigE 1/0/1.

[RouterA-HundredGigE1/0/1] ntp-service broadcast-client

Configuring Router B

# Configure Router B in the same way Router A is configured. (Details not shown.)

Verifying the configuration

# Verify that each device has synchronized to Router C. Router A is used in this example.

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

[RouterA-HundredGigE1/0/1] 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

 NTP version: 4

 Clock jitter: 0.044281 s

 Stability: 0.000 pps

 Clock precision: 2^-18

 Root delay: 0.00229 ms

 Root dispersion: 4.12572 ms

 Reference time: d0d289fe.ec43c720  Sat, Jan  8 2011  7:00:14.922

·     Verify that an IPv4 NTP association has been established between Router A and Router C.

[RouterA-HundredGigE1/0/1] 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

·     Router C:

#

interface hundredgige 1/0/1

 ip address 3.0.1.31 255.255.255.0

 ntp-service broadcast-server

#

 ntp-service enable

 ntp-service refclock-master 2

#

·     Router A:

#

interface hundredgige 1/0/1

 ip address 3.0.1.33 255.255.255.0

 ntp-service broadcast-client

#

 ntp-service enable

#

·     Router B:

#

interface hundredgige 1/0/1

 ip address 3.0.1.30 255.255.255.0

 ntp-service broadcast-client

#

 ntp-service enable

#

Example: Configuring the NTP multicast mode

Network configuration

As shown in Figure 3, configure the NTP multicast mode so all devices on different network segments can be synchronized to Router C.

Figure 3 Network diagram

 

Software version used

This configuration example was created and verified on R3606.

Restrictions and guidelines

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Router C

# Enable the NTP service.

<RouterC> system-view

[RouterC] ntp-service enable

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

[RouterC] ntp-service refclock-master 2

# Assign an IP address to HundredGigE 1/0/1.

[RouterC] interface hundredgige 1/0/1

[RouterC-HundredGigE1/0/1] ip address 3.0.1.31 24

# Configure Router C to operate in multicast server mode and send multicast messages from HundredGigE 1/0/1.

[RouterC-HundredGigE1/0/1] ntp-service multicast-server

Configuring Router D

# Enable the NTP service.

<RouterD> system-view

[RouterD] ntp-service enable

# Assign an IP address to HundredGigE 1/0/1.

[RouterD] interface hundredgige 1/0/1

[RouterD-HundredGigE1/0/1] ip address 3.0.1.32 24

# Configure Router D to operate in multicast client mode and receive multicast messages on HundredGigE 1/0/1.

[RouterD-HundredGigE1/0/1] ntp-service multicast-client

Configuring Router B

Because Router A and Router C are on different subnets, you must configure multicast settings on Router B for Router A to receive multicast messages from Router C.

# Configure multicast settings.

<RouterB> system-view

[RouterB] multicast routing

[RouterB-mrib] quit

[RouterB] interface hundredgige 1/0/1

[RouterB-HundredGigE1/0/1] igmp enable

[RouterB-HundredGigE1/0/1] igmp static-group 224.0.1.1

[RouterB-HundredGigE1/0/1] quit

[RouterB] interface hundredgige 1/0/2

[RouterB-HundredGigE1/0/2] pim dm

Configuring Router A

# Enable the NTP service.

<RouterA> system-view

[RouterA] ntp-service enable

# Specify NTP for obtaining the time.

[RouterA] clock protocol ntp

# Assign an IP address to HundredGigE 1/0/1.

[RouterA] interface hundredgige 1/0/1

[RouterA-HundredGigE1/0/1] ip address 1.0.1.11 24

# Configure Router A to operate in multicast client mode and receive multicast messages on HundredGigE 1/0/1.

[RouterA] interface hundredgige 1/0/1

[RouterA-HundredGigE1/0/1] ntp-service multicast-client

Verifying the configuration

# Verify that each device has synchronized to Router C. Router A is used in this example.

[RouterA-HundredGigE1/0/1] 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         

 NTP version: 4             

 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 26 2020 11:37:57.184

Configuration files

·     Router A:

#

 ntp-service enable

#

interface hundredgige 1/0/1

 ip address 1.0.1.11 255.255.255.0

 ntp-service multicast-client

#

·     Router B:

#

ntp-service enable

#

multicast routing

#

igmp-snooping

#

interface hundredgige 1/0/2

 ip address 3.0.1.30 255.255.255.0

 pim dm

 ntp-service multicast-client

#

interface hundredgige 1/0/1

 ip address 1.0.1.10 255.255.255.0

 igmp enable

 igmp static-group 224.0.1.1

·     Router C:

#

 ntp-service enable

ntp-service refclock-master 2

#

interface hundredgige 1/0/1

 ip address 3.0.1.31 255.255.255.0

 ntp-service multicast-server

#

·     Router D:

#

 ntp-service enable

#

interface hundredgige 1/0/1

 ip address 3.0.1.32 255.255.255.0

 ntp-service multicast-client

#

Example: Configuring NTP client/server mode with authentication

Network configuration

As shown in Figure 4, configure the NTP client/server mode so Device B can be synchronized to Device A. Configure NTP authentication to ensure time synchronization security.

Figure 4 Network diagram

 

Software version used

This configuration example was created and verified on R3606.

Restrictions and guidelines

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Device A

# Assign an IP address to HundredGigE 1/0/1.

<DeviceA> system-view

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] ip address 1.0.1.11 24

# Enable the NTP service.

[DeviceA] ntp-service enable

# Specify the local clock as the reference source, with a stratum level of 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 HundredGigE 1/0/1. (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

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

 NTP version: 4             

 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 30 2020 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 hundredgige 1/0/1

 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 hundredgige 1/0/1

 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

#

Example: Configuring SNTP

Network configuration

As shown in Figure 5, configure SNTP so that Device B can be synchronized to Device A.

Figure 5 Network diagram

 

Software version used

This configuration example was created and verified on R3606.

Restrictions and guidelines

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Device A

# Assign an IP address to HundredGigE 1/0/1.

<DeviceA> system-view

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] ip address 1.0.1.11 24

# Enable the NTP service.

[DeviceA] ntp-service enable

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

[DeviceA] ntp-service refclock-master 2

Configuring Device B

# Assign an IP address to HundredGigE 1/0/1. (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

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 26 2020 17:25:09.121 (Synced)

Configuration files

·     Device A:

#

interface hundredgige 1/0/1

 ip address 1.0.1.11 255.255.255.0

#

 ntp-service enable

 ntp-service refclock-master 2

#

·     Device B:

#

interface hundredgige 1/0/1

 ip address 1.0.1.12 255.255.255.0

#

 sntp enable

 sntp unicast-server 1.0.1.11

#

Example: Configuring the IPv6 NTP client/server mode

Network configuration

As shown in Figure 6, configure the IPv6 NTP client/server mode so Device B can synchronize to Device A, the NTP server.

Figure 6 Network diagram

 

Software version used

This configuration example was created and verified on R3606.

Restrictions and guidelines

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Device A

# Assign an IPv6 address to HundredGigE 1/0/1.

<DeviceA> system-view

[DeviceA] interface hundredgige 1/0/1

[DeviceA-HundredGigE1/0/1] ipv6 address 3000::34 64

[DeviceA-HundredGigE1/0/1] quit

# Enable the NTP service.

[DeviceA] ntp-service enable

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

[DeviceA] ntp-service refclock-master 2

Configuring Device B

# Assign an IPv6 address to HundredGigE 1/0/1. (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

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

 NTP version: 4             

 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 25 2020 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 hundredgige 1/0/1

 ipv6 address 3000::34/64

#

 ntp-service enable

 ntp-service refclock-master 2

#

·     Device B:

#

interface hundredgige 1/0/1

 ipv6 address 3000::35/64

#

 ntp-service enable

 ntp-service ipv6 unicast-server 3000::34

#

Example: Configuring the IPv6 NTP multicast mode

Network configuration

As shown in Figure 3, configure the IPv6 NTP multicast mode so all devices on different network segments can synchronize to Router C.

Figure 7 Network diagram

 

Software version used

This configuration example was created and verified on R3606.

Restrictions and guidelines

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Router C

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

# Enable the NTP service.

<RouterC> system-view

[RouterC] ntp-service enable

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

[RouterC] ntp-service refclock-master 2

# Assign an IPv6 address to HundredGigE 1/0/1.

[RouterC] interface hundredgige 1/0/1

[RouterC-HundredGigE1/0/1] ipv6 address 3000::2 64

# Configure Router C to operate in IPv6 multicast server mode and send multicast messages from HundredGigE 1/0/1.

[RouterC-HundredGigE1/0/1] ntp-service ipv6 multicast-server ff24::1

[RouterC-HundredGigE1/0/1] quit

Configuring Router 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.

<RouterD> system-view

[RouterD] ntp-service enable

# Configure Router D to operate in IPv6 multicast client mode and receive multicast messages on HundredGigE 1/0/1.

[RouterD-HundredGigE1/0/1] ntp-service ipv6 multicast-client ff24::1

[RouterD-HundredGigE1/0/1] quit

Configuring Router B

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

Because Router A and Router C are on different subnets, you must enable IPv6 multicast settings on Router B for Router A to receive multicast messages from Router C.

# Enable IPv6 multicast settings.

<RouterB> system-view

[RouterB] ipv6 multicast routing

[RouterB-mrib6] quit

[RouterB] interface hundredgige 1/0/1

[RouterB-HundredGigE1/0/1] mld enable

[RouterB-HundredGigE1/0/1] mld static-group ff24::1

[RouterB-HundredGigE1/0/1] quit

[RouterB] interface hundredgige 1/0/2

[RouterB-HundredGigE1/0/2] ipv6 pim dm

Configuring Router 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.

<RouterA> system-view

[RouterA] ntp-service enable

# Specify NTP for obtaining the time.

[RouterA] clock protocol ntp

# Configure Router A to operate in IPv6 multicast client mode and receive multicast messages destined to FF24::1 on HundredGigE 1/0/1.

[RouterA] interface hundredgige 1/0/1

[RouterA-HundredGigE1/0/1] ntp-service ipv6 multicast-client ff24::1

Verifying the configuration

# Verify that each device has synchronized to Router C. Router A is used in this example.

[RouterA] 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

 NTP version: 4             

 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 26 2020 11:37:57.184

Configuration files

·     Router A:

#

 ntp-service enable

#

interface hundredgige 1/0/1

 ipv6 address 2000::1/64

 ntp-service ipv6 multicast-client ff24::1

#

·     Router B:

#

ntp-service enable

#

ipv6 multicast routing

#

interface hundredgige 1/0/2

 ipv6 address 3000::1/64

 ipv6 pim dm

 ntp-service ipv6 multicast-client ff24::1

#

interface hundredgige 1/0/1

 ipv6 address 2000::2/64

 mld enable

 mld static-group ff24::1

#

·     Router C:

#

 ntp-service enable

ntp-service refclock-master 2

#

interface hundredgige 1/0/1

 ipv6 address 3000::2/64

 ntp-service ipv6 multicast-server ff24::1

#

·     Router D:

#

 ntp-service enable

#

interface hundredgige 1/0/1

 ipv6 address 3000::3/64

 ntp-service ipv6 multicast-client ff24::1

#

Example: Configuring the NTP broadcast mode with authentication

Network configuration

As shown in Figure 4, all devices are on the same network segment 3.0.1.0/24.

·     Configure NTP broadcast mode so all devices can synchronize to Router A.

·     Configure NTP authentication to ensure time synchronization security.

Figure 8 Network diagram

 

Software version used

This configuration example was created and verified on R3606.

Restrictions and guidelines

By default, interfaces on the device are disabled (in ADM or Administratively Down state). To have an interface operate, you must use the undo shutdown command to enable that interface.

Procedures

Configuring Router C

# Enable the NTP service.

<RouterC> system-view

[RouterC] ntp-service enable

# Specify NTP for obtaining the time.

[RouterC] clock protocol ntp

# Specify the local clock as the reference source, with a stratum level of 3.

[RouterC] ntp-service refclock-master 3

# Configure Router C to operate in NTP broadcast server mode and send broadcast messages from HundredGigE 1/0/1.

[RouterC] interface hundredgige 1/0/1

[RouterC-HundredGigE1/0/1] ip address 3.0.1.31 24

[RouterC-HundredGigE1/0/1] ntp-service broadcast-server

[RouterC-HundredGigE1/0/1] quit

# Enable NTP authentication, and specify an NTP authentication key with ID 88 and value 123456.

[RouterC] ntp-service authentication enable

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

[RouterC] ntp-service reliable authentication-keyid 88

# Specify authentication key 88 for the NTP broadcast server.

[RouterC] interface hundredgige 1/0/1

[RouterC-HundredGigE1/0/1] ntp-service broadcast-server authentication-keyid 88

[RouterC-HundredGigE1/0/1] quit

Configuring Router A

# Enable the NTP service.

<RouterA> system-view

[RouterA] ntp-service enable

# Specify NTP for obtaining the time.

[RouterA] clock protocol ntp

# Enable NTP authentication and specify an NTP authentication key with the same ID and value as that of Router C.

[RouterA] ntp-service authentication enable

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

[RouterA] ntp-service reliable authentication-keyid 88

# Configure Router A to operate in NTP broadcast client mode and receive NTP broadcast messages on HundredGigE 1/0/1.

[RouterA] interface hundredgige 1/0/1

[RouterA-HundredGigE1/0/1] ntp-service broadcast-client

[RouterA-HundredGigE1/0/1] ip address 3.0.1.33 24

[RouterA-HundredGigE1/0/1] quit

Configuring Router B

# Configure Router B in the same way Router A is configured. (Details not shown.)

Verifying the configuration

# Verify that each device has synchronized to Router C. Router B is used in this example.

·     Verify that Router B has synchronized to Router C.

[RouterB-HundredGigE1/0/1] display ntp-service status

 Clock status: synchronized

 Clock stratum: 4

 System peer: 3.0.1.31

 Local mode: bclient

 Reference clock ID: 3.0.1.31

 Leap indicator: 00

 NTP version: 4

 Clock jitter: 0.006683 s

 Stability: 0.000 pps

 Clock precision: 2^-18

 Root delay: 0.00127 ms

 Root dispersion: 2.89877 ms

 Reference time: d0d287a7.3119666f  Sat, Jan  8 2011  6:50:15.191

·     Verify that an IPv4 session has been established between Router B and Router C.

[RouterB-HundredGigE1/0/1] display ntp-service sessions

       source          reference       stra reach poll  now offset  delay disper

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

 [1245]3.0.1.31        127.127.1.0        3     3   64   68   -0.0 0.0000    0.0

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

 Total sessions: 1

Configuration files

·     Router A and Router B:

#

interface hundredgige 1/0/1

 ip address 3.0.1.30 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

#

·     Router C:

#

interface hundredgige 1/0/1

 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 S12500R Switch Router Series Network Management and Monitoring Configuration Guide-R3606

·     H3C S12500R Switch Router Series Network Management and Monitoring Command Reference-R3606

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网