首页 > 技术文章 > 华为交换机配置NTP服务端/客户端

dengcongcong 2019-01-07 10:04 原文

 作者:邓聪聪

配置设备作为NTP服务器

  • 单播客户端/服务器模式

    # 配置NTP主时钟,层数为2。
    <HUAWEI> system-view
    [HUAWEI] ntp refclock-master 2
    # 配置NTP认证功能,配置认证密钥并声明该密钥可信。
    [HUAWEI] ntp authentication enable
    [HUAWEI] ntp authentication-keyid 42 authentication-mode md5 Hello@123456
    [HUAWEI] ntp reliable authentication-keyid 42
    # 使能NTP服务器功能。
    [HUAWEI] undo ntp-service disable

    配置设备作为NTP客户端

    • 单播客户端/服务器模式

      # 配置NTP认证功能,配置认证密钥并声明该密钥可信。
      <HUAWEI> system-view
      [HUAWEI] ntp authentication enable
      [HUAWEI] ntp authentication-keyid 42 authentication-mode md5 Hello@123456
      [HUAWEI] ntp reliable authentication-keyid 42
      # 为NTP单播客户端指定NTP单播服务器,并指定使用密钥ID 42加密。
      [HUAWEI] ntp unicast-server 10.1.1.1 authentication-keyid 42

    交换机同步外网时间:
    阿里云ntp : 203.107.6.88
    [HUAWEI] ntp-service unicast-server 203.107.6.88

     

推荐阅读