- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
01-MSR Routers NTP Configuration Examples | 75.79 KB |
|
MSR Routers |
NTP Configuration Examples |
|
|
Copyright © 2024 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.
Introduction
This document provides NTP configuration examples.
Prerequisites
The following information applies to Comware 7-based MSR router series. Procedures and information in the examples might be slightly different depending on the software or hardware version of the routers.
The configuration examples 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.
The following information is provided based on the assumption that you have basic knowledge of NTP.
Example: Configuring the NTP client/server mode
Network configuration
As shown in Figure 1, Device A on the network can be used as a time server to provide accurate time synchronization. Configure the NTP client/server mode to enable all devices to synchronize the time with Device A.
Software version used
This configuration example was created and verified on R6749P14 of H3C MSR3610-X1.
Procedures
Configuring Device A
# Assign an IPv6 address to GigabitEthernet 1/0/1.
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] ip address 1.0.1.11 24
[DeviceA-GigabitEthernet1/0/1] 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 GigabitEthernet 1/0/1.
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ip address 1.0.1.12 24
[DeviceB-GigabitEthernet1/0/1] quit
# Enable the NTP service.
[DeviceB] ntp-service enable
# Configure Device B to obtain time through NTP.
[DeviceB] clock protocol ntp
# Specify Device A as the NTP server of Device B.
[DeviceB] ntp-service unicast-server 1.0.1.11
Configuring Device C
# Assign an IP address to GigabitEthernet 1/0/1.
<DeviceC> system-view
[DeviceC] interface gigabitethernet 1/0/1
[DeviceC-GigabitEthernet1/0/1] ip address 1.0.1.13 24
[DeviceC-GigabitEthernet1/0/1] quit
# Enable the NTP service.
[DeviceB] ntp-service enable
# Configure Device C to obtain time through NTP.
[DeviceC] clock protocol ntp
# Specify Device A as the NTP server of Device C.
[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 A. Device B is used in this example.
[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^-16
Root delay: 1.95313 ms
Root dispersion: 28.38135 ms
Reference time: d5ed8cd5.577006ea Wed, Sep 25 2017 16:24:53.341
System poll interval: 8 s
The command output shows that Device B has synchronized the time with Device A. Its stratum level is 3, which is 1 stratum higher than Device A.
# Verify that an 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 GigabitEthernet1/0/1
ip address 1.0.1.11 255.255.255.0
#
ntp-service enable
ntp-service refclock-master 2
· #
· Device B:
#
interface GigabitEthernet1/0/1
ip address 1.0.1.12 255.255.255.0
#
clock protocol ntp
ntp-service enable
ntp-service unicast-server 1.0.1.11
#
· Device C:
#
interface GigabitEthernet1/0/1
ip address 1.0.1.13 255.255.255.0
#
clock protocol ntp
ntp-service enable
ntp-service unicast-server 1.0.1.11
#
Related documentation
· Network Management and Monitoring Configuration Guide in H3C MSR Router Series Comware 7 Configuration Guides
· Network Management and Monitoring Command Reference in H3C MSR Router Series Comware 7 Command References