H3C交换机配置NTP后无法同步

共有2台H3C交换机, 需要配置NTP同步时间
NTP server : 10.248.64.102

其中1台NTP同步是正常的, 另外1台同步失败

同步正常的如下:

display ntp status
<H3C-SWITCH-1>display ntp status
 Clock status: synchronized     //已经同步
 Clock stratum: 4 
 System peer: 10.248.64.102 
 Local mode: client
 Reference clock ID: 10.248.64.102
 Leap indicator: 00
 Clock jitter: 0.000397 s
 Stability: 0.000 pps 
 Clock precision: 2^-21
 Root delay: 208.37402 ms 
 Root dispersion: 69.48853 ms 
 Reference time: ed47828e.f7b316a7  Tue, Feb 24 2026  9:51:10.967
 System poll interval: 64 s
<H3C-SWITCH-1>display ntp sessions 
       source          reference       stra reach poll  now offset  delay disper
********************************************************************************
[12345]10.248.64.102   193.182.111.12     3   255   64   66 -6.385 1.1138 4.3335
Notes: 1 source(master), 2 source(peer), 3 selected, 4 candidate, 5 configured.
 Total sessions: 

NTP的配置只需要这2条命令

 ntp-service enable
 ntp-service unicast-server 10.248.64.102

2. 另1台同步失败,如下

<H3C-6805>dis ntp status
 Clock status: unsynchronized
 Clock stratum: 16 
 Reference clock ID: none
 Clock jitter: 0.000000 s
 Stability: 0.000 pps 
 Clock precision: 2^-21
 Root delay: 0.00000 ms 
 Root dispersion: 50.75073 ms 
 Reference time: 00000000.00000000  Mon, Jan  1 1900  0:00:00.000
 System poll interval: 8 s

NTP配置如下:

 ntp-service enable
 ntp-service source M-GigabitEthernet0/0/0
 ntp-service unicast-server 10.248.64.102

失败原因:管理接口在vpn-instance下,所以需要配置ntpserver时指定 vpn-instance

接口配置如下:

#
interface M-GigabitEthernet0/0/0
 ip binding vpn-instance mgmt                 //端口属于vpn-instance,所以路由表也是独立的
 ip address 10.248.246.176 255.255.254.0
 dhcp client identifier hex 0230b037bc1617
#

指定vpn-instance

 ntp-service unicast-server 10.248.64.102 vpn-instance mgmt 

再次确认,同步成功

[H3C-6805]dis ntp status 
 Clock status: synchronized
 Clock stratum: 4 
 System peer: 10.248.64.102 
 Local mode: client
 Reference clock ID: 10.248.64.102
 Leap indicator: 00
 Clock jitter: 0.000000 s
 Stability: 0.000 pps 
 Clock precision: 2^-21
 Root delay: 208.02307 ms 
 Root dispersion: 29809.22021 ms 
 Reference time: ed47f358.989d2c25  Tue, Feb 24 2026  9:52:24.596
 System poll interval: 64 s
posted @ 2026-02-24 10:31  JacobJacob  阅读(6)  评论(0)    收藏  举报  来源