H3C Campus Fixed-Port Switches CLI-Based Quick Start Configuration Guide-6W101

HomeSupportQuick StartH3C Campus Fixed-Port Switches CLI-Based Quick Start Configuration Guide-6W101
Table of Contents
Related Documents
06-NTP Quick Start Configuration Guide
Title Size Download
06-NTP Quick Start Configuration Guide 59.74 KB

NTP Quick Start Configuration Guide

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Copyright © 2022 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.



Configuring an NTP client to synchronize the time with an NTP server

Introduction

The following information uses an example to describe the basic procedure for configuring an NTP client to synchronize the time with an NTP server.

Network configuration

As shown in Figure 1, configure Device B and Device C to synchronize the time with Device A through NTP. To meet this requirement:

·     On device A, specify the local clock as its reference source and set the stratum level of the clock to 2.

·     Configure Device B to operate in NTP client mode and specify Device A as its NTP server.

·     Configure Device C to operate in NTP client mode and specify Device A as its NTP server.

Figure 1 Network diagram

 

Procedure

1.     Configure Device A.

# Assign an interface 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 NTP.

[DeviceA] ntp-service enable

# Specify the local clock as the reference source and set the stratum level of the clock to 2.

[DeviceA] ntp-service refclock-master 2

2.     Configure Device B

# Assign an interface to VLAN-interface 2.

<DeviceB> system-view

[DeviceB] interface Vlan-interface2

[DeviceB-Vlan-interface2] ip address 1.0.1.12 24

[DeviceB-Vlan-interface2] quit

# Enable NTP.

<DeviceB> system-view

[DeviceB] ntp-service enable

# Specify NTP for obtaining the time.

[DeviceB] clock protocol ntp

# Specify Device A as the NTP server.

[DeviceB] ntp-service unicast-server 1.0.1.11

3.     Configure Device C.

# Assign an interface to VLAN-interface 2.

<DeviceC> system-view

[DeviceC] interface Vlan-interface2

[DeviceC-Vlan-interface2] ip address 1.0.1.13 24

[DeviceC-Vlan-interface2] quit

# Enable NTP.

<DeviceC> system-view

[DeviceC] ntp-service enable

# Specify NTP for obtaining the time.

[DeviceC] clock protocol ntp

# Specify Device A as the NTP server.

[DeviceC] ntp-service unicast-server 1.0.1.11

Verifying the configuration

Verify that Device B and Device C have synchronized the time with Device C. The following uses Device B as an example to verify the configuration.

# Execute the display ntp-service status command on Device B to display its NTP status.

[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.000977 s

 Stability: 0.000 pps

 Clock precision: 2^-10

 Root delay: 0.00383 ms

 Root dispersion: 16.26572 ms

 Reference time: d0c6033f.b9923965  Wed, Dec 29 2019 18:58:07.724

 System poll interval: 64 s

The command output shows that Device B has synchronized its time with Device A, and the clock stratum level of Device B is 3.

# 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   15   -4.0 0.0038 16.262

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 24

 quit

 ntp-service enable

 ntp-service refclock-master 2

#

·     Device B:

#

 interface Vlan-interface2

 ip address 1.0.1.12 24

 quit

 ntp-service enable

 clock protocol ntp

 ntp-service unicast-server 1.0.1.11

#

·     Device C:

#

interface Vlan-interface2

 ip address 1.0.1.13 24

#

 ntp-service enable

 clock protocol ntp

 ntp-service unicast-server 1.0.1.11

#

Related documentation

·     NTP configuration in the network management and monitoring configuration guide for the device.

·     NTP commands in the network management and monitoring command reference for the device.

  • 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
新华三官网