GPS时钟服务器,NTP时间服务器,时间同步服务器15901092122岳峰

把华为交换机设置成(NTP)时钟源服务器

把华为交换机设置成(NTP)时钟源服务器

把华为交换机设置成(NTP)时钟源服务器

京准电子科技微♥(ahjzsz)

把华为交换机设置成(NTP)时钟源服务器,提供给下面客户端Linux服务器使用,

1,先设置交换机的时区,和正确时间

假设地理位置在中国北京,设置本地时区名称为BJ。
如果系统默认的UTC是伦敦时间,伦敦当地时间为2012年12月1日0时0分0秒,想要得到对应的北京时间的方法是:北京处于+8时区,时间偏移量增加了8。在配置时,就是在系统默认的UTC时区的基础上,加上偏移量8,才能得到预期的BJ时区。

clock timezone BJ add 08:00:00

设置时区并在现在的UTC基础上偏移8

clock datetime 0:0:0 2012-12-01

这是设置时间的命令,设置成对应的北京时间就行。

2,开启交换机的NTP服务

使能NTP服务器功能。
[~HUAWEI] undo ntp server disable 开启NTP服务(默认关闭)

[*HUAWEI] commit

配置NTP主时钟,层数为2。
[~HUAWEI] ntp refclock-master 2

[*HUAWEI] commit

3,下面的是NTP设置的更多功能,可以不配置

配置NTP认证功能,配置认证密钥并声明该密钥可信。
[~HUAWEI] ntp authentication enable

[*HUAWEI] ntp authentication-keyid 42 authentication-mode hmac-sha256 Hello@123456

[*HUAWEI] ntp trusted authentication-keyid 42

[*HUAWEI] commit

广播模式

配置NTP主时钟,层数为2。
system-view

[~HUAWEI] ntp refclock-master 2

[*HUAWEI] commit

配置NTP认证功能,配置认证密钥并声明该密钥可信。
[~HUAWEI] ntp authentication enable

[*HUAWEI] ntp authentication-keyid 42 authentication-mode hmac-sha256 Hello@123456

[*HUAWEI] ntp trusted authentication-keyid 42

[*HUAWEI] commit

配置NTP广播服务器,从接口10GE1/0/1发送NTP广播报文,并指定使用密钥ID 42加密。
[~HUAWEI] interface 10ge 1/0/1

[~HUAWEI-10GE1/0/1] undo portswitch

[*HUAWEI-10GE1/0/1] ntp broadcast-server authentication-keyid 42

[*HUAWEI-10GE1/0/1] quit

[*HUAWEI] commit

使能NTP服务器功能。
[~HUAWEI] undo ntp server disable

[*HUAWEI] commit

组播模式

配置NTP主时钟,层数为2。
system-view

[~HUAWEI] ntp refclock-master 2

[*HUAWEI] commit

配置NTP认证功能,配置认证密钥并声明该密钥可信。
[~HUAWEI] ntp authentication enable

[*HUAWEI] ntp authentication-keyid 42 authentication-mode hmac-sha256 Hello@123456

[*HUAWEI] ntp trusted authentication-keyid 42

[*HUAWEI] commit

配置NTP组播服务器,从接口10GE1/0/1发送NTP组播报文,并指定使用密钥ID 42加密。
[~HUAWEI] interface 10ge 1/0/1

[~HUAWEI-10GE1/0/1] undo portswitch

[*HUAWEI-10GE1/0/1] ntp multicast-server authentication-keyid 42

[*HUAWEI-10GE1/0/1] quit

[*HUAWEI] commit

使能NTP服务器功能。
[~HUAWEI] undo ntp server disable

[*HUAWEI] commit

多播模式

配置NTP主时钟,层数为2。
system-view

[~HUAWEI] ntp refclock-master 2

[*HUAWEI] commit

配置NTP认证功能,配置认证密钥并声明该密钥可信。
[~HUAWEI] ntp authentication enable

[*HUAWEI] ntp authentication-keyid 42 authentication-mode hmac-sha256 Hello@123456

[*HUAWEI] ntp trusted authentication-keyid 42

[*HUAWEI] commit

配置NTP多播服务器,从接口10GE1/0/1发送NTP多播报文。
[~HUAWEI] interface 10ge 1/0/1

[~HUAWEI-10GE1/0/1] undo portswitch

[*HUAWEI-10GE1/0/1] ntp manycast-server

[*HUAWEI-10GE1/0/1] quit

[*HUAWEI] commit

使能NTP服务器功能。
[~HUAWEI] undo ntp server disable

[*HUAWEI] commit
————————————————
版权声明:本文为CSDN博主「安徽京准电子公司」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/weixin_44990608/article/details/106807078

posted @   GPS北斗卫星同步时钟  阅读(2078)  评论(0编辑  收藏  举报
编辑推荐:
· [.NET]调用本地 Deepseek 模型
· 一个费力不讨好的项目,让我损失了近一半的绩效!
· .NET Core 托管堆内存泄露/CPU异常的常见思路
· PostgreSQL 和 SQL Server 在统计信息维护中的关键差异
· C++代码改造为UTF-8编码问题的总结
阅读排行:
· CSnakes vs Python.NET:高效嵌入与灵活互通的跨语言方案对比
· 【.NET】调用本地 Deepseek 模型
· Plotly.NET 一个为 .NET 打造的强大开源交互式图表库
· 上周热点回顾(2.17-2.23)
· 如何使用 Uni-app 实现视频聊天(源码,支持安卓、iOS)
GPS时钟服务器,NTP时间服务器,时间同步服务器15901092122岳峰
点击右上角即可分享
微信分享提示