📄
chjina Wiki
  • 首页
  • 网站收藏
    • GitHub
    • 趣站
      • 工具类
      • 网络工具
      • 网络空间资产
  • IT知识库
    • 路由交换
      • 华三
        • 防火墙
          • 概览页面的流量监控不显示数据
        • DHCP
          • IP Source Guard与DHCP Snooping配合的IPv4动态绑定功能配置举例
          • DHCP Snooping典型配置举例
        • 1.端口镜像配置
        • 2.链路聚合
        • 3.IRF堆叠
        • 4.ARP网关保护功能
        • 5.交换机作为SSH客户端登录出错
        • 6.策略路由改变下一跳
        • 7.交换机密码策略实现的解决办法
        • 8.华三交换机配置NTP
        • 9.环路检测配置举例
        • 10.静态路由、Track与NQA联动,设置浮动备份路由
      • 华为
        • 华为交换机开启远程Telnet登录
        • 华为交换机配置链路聚合
      • 锐捷
        • 常用命令
      • 戴尔
        • DELL 网络交换机 基本配置说明
      • 博科SAN交换机基本配置
    • 服务器
      • 浪潮
        • RAID配置
          • Ctrl+A RAID配置
          • Ctrl+H RAID配置
          • LSI 9271 8i Raid卡开启jbod(直通)功能
        • 启用MWAIT等
      • 华为
        • 华为2288H v5服务器开启MWAIT功能
      • 惠普
        • HPE服务器安装下载驱动教程
        • HP ilo5 更改中文
    • 虚拟化
      • Vmware
        • VMware 系列 密钥
        • vCenter
          • VCSA6.7无DNS安装
          • VCSA7.0.2无DNS安装
          • vCenter扩容硬盘
          • Vcenter 由于一个或多个 vCenter Server 系统的凭据无效,登录失败
        • ESXi
          • 使用命令升级ESXI系统(补丁)
          • ESXi覆盖安装重置root密码
          • vCenter重置ESXi主机root密码
    • 系统配置和优化
      • Windows
        • Windows挂载NFS
        • Windows Server 链路聚合配置
        • Windows 远程提示函数不受支持
        • Windows系统配置NTP服务器
        • Windows11系统初始化无网络连接
      • Linux
        • Centos
          • CentOS网卡配置
          • CentOS重置密码
          • CentOS使用iso镜像作为私有源
          • CentOS防火墙
          • 创建systemd service服务
        • Ubuntu
          • Ubuntu 24.04 server 安装
          • Ubuntu安装ssh
          • Ubuntu修改ip地址
    • Docker
      • UFW管理Docker端口
    • KMS激活命令
      • kms命令激活office
      • kms命令激活windows系统
    • 各厂商默认管理地址
  • 读书清单
    • 清单
  • 捡垃圾
    • 空气果Fun
    • 合宙Air700E/780E短信转发
由 GitBook 提供支持
在本页
  • 1 组网需求
  • 2 配置步骤
  • 1 Device A的配置
  • 2 Device B的配置
  • 3 验证配置
  • 配置文件

这有帮助吗?

  1. IT知识库
  2. 路由交换
  3. 华三

8.华三交换机配置NTP

NTP服务器/客户端模式典型配置举例

上一页7.交换机密码策略实现的解决办法下一页9.环路检测配置举例

最后更新于1年前

这有帮助吗?

1 组网需求

如所示,网络中有一台时间服务器Device A,为网络中的其它设备提供精确的时间服务,为保证网络中的所有设备能保持一致、统一的时钟,现要求配置NTP服务器/客户端模式,使所有设备能从时间服务器Device A上获得时钟同步。

图1 配置NTP服务器/客户端模式组网图

img

2 配置步骤

1 Device A的配置

# 配置NTP客户端,接受公网NTP校时。

# 设置DNS

[DeviceA] dns server 223.5.5.5

# 开启NTP功能。

ntp-service enable

# 通过NTP协议获取时间

[DeviceA] clock protocol ntp

# 设置时区为东八区

[DeviceA] clock timezone BeiJing add 8

# 设置NTP服务器地址

ntp-service unicast-server ntp.chjina.com

# 设置本地时钟作为参考时钟,层数为2。

[DeviceA] ntp-service refclock-master 2

2 Device B的配置

# 配置接口的IP地址,配置步骤这里省略。

# 开启NTP功能。

system-view

[DeviceB] ntp-service enable

# 设置NTP Server为Device B的时间服务器。

[DeviceB] ntp-service unicast-server 1.0.1.11

3 验证配置

# 以上配置完成后,Device B向Device A进行时间同步。查看NTP的运行状态。

[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^-19    
 Root delay: 1.95313 ms   
 Root dispersion: 28.38135 ms
 Reference time: d5ed8cd5.577006ea Wed, Sep 25 2019 16:24:53.341

此时Device B已经与Device A同步,层数比Device A的层数大1,为3。

# 查看Device B的NTP会话信息,可以看到Device B与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

配置文件

· Device A上的配置

interface Vlan-interface2
 ip address 1.0.1.11 255.255.255.0
 dns server 223.5.5.5
 clock protocol ntp
 clock timezone BeiJing add 8
 ntp-service enable 
 ntp-service  refclock-master 2
 ntp-service unicast-server ntp.chjina.com
 ntp-service unicast-server 182.92.12.11

· Device B上的配置

interface Vlan-interface2
 ip address 1.0.1.12 255.255.255.0
 ntp-service enable
 ntp-service unicast-server 1.0.1.11

参考:

图1
02-H3C_NTP典型配置举例-新华三集团-H3C
Logo