- Table of Contents
-
- H3C Campus Fixed-Port Switches CLI-Based Quick Start Configuration Guide-6W101
- 01-H3C Devices CLI Reference
- 02-Login Management Quick Start Configuration Guide
- 03-Configuration File Management Quick Start Configruation Guide
- 04-Software Upgrade Quick Start Configuration Guide
- 05-Device Management Quick Start Configuration Guide
- 06-NTP Quick Start Configuration Guide
- 07-RBAC Quick Start Configuration Guide
- 08-IRF Quick Start Configuration Guide
- 09-Ethernet Interface Quick Start Configuration Guide
- 10-VLAN Quick Start Configuration Guide
- 11-Port Isolation Quick Start Configuration Guide
- 12-Loop Detection Quick Start Configuration Guide
- 13-QinQ Quick Start Configuration Guide
- 14-MAC Address Table Quick Start Configuration Guide
- 15-Ethernet Link Aggregation Quick Start Configuration Guide
- 16-Spanning Tree Quick Start Configuration Guide
- 17-DHCP Quick Start Configuration Guide
- 18-OSPF Quick Start Configuration Guide
- 19-Static Routing Quick Start Configuration Guide
- 20-Basic RIP Quick Start Configuration Guide
- 21-PBR Quick Start Configuration Guide
- 22-IGMP Snooping Quick Start Configuration Guide
- 23-Packet Filtering Quick Start Configuration Guide
- 24-QoS Quick Start Configuration Guide
- 25-IP Source Guard Quick Start Configuration Guide
- 26-SSH Quick Start Configuration Guide
- 27-Port Security Quick Start Configuration Guide
- 28-VRRP Quick Start Configuration Guide
- 29-PoE Quick Start Configuration Guide
- 30-Mirroring Quick Start Configuration Guide
- 31-Information Center Quick Start Configuration Guide
- 32-SNMP Quick Start Configuration Guide
- 33-LAN Networks Quick Start Configuration Guide
- Related Documents
-
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.
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
# 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.