把华为交换机设置成(NTP)时钟源服务器,提供给下面客户端Linux服务器使用,
1,先设置交换机的时区,和正确时间
如果系统默认的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服务
[~HUAWEI] undo ntp server disable 开启NTP服务(默认关闭)
[*HUAWEI] commit
[~HUAWEI] ntp refclock-master 2
[*HUAWEI] commit
3,下面的是NTP设置的更多功能,可以不配置
[~HUAWEI] ntp authentication enable
[*HUAWEI] ntp authentication-keyid 42 authentication-mode hmac-sha256 Hello@123456
[*HUAWEI] ntp trusted authentication-keyid 42
[*HUAWEI] commit
广播模式
system-view
[~HUAWEI] ntp refclock-master 2
[*HUAWEI] commit
[~HUAWEI] ntp authentication enable
[*HUAWEI] ntp authentication-keyid 42 authentication-mode hmac-sha256 Hello@123456
[*HUAWEI] ntp trusted authentication-keyid 42
[*HUAWEI] commit
[~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
[~HUAWEI] undo ntp server disable
[*HUAWEI] commit
组播模式
system-view
[~HUAWEI] ntp refclock-master 2
[*HUAWEI] commit
[~HUAWEI] ntp authentication enable
[*HUAWEI] ntp authentication-keyid 42 authentication-mode hmac-sha256 Hello@123456
[*HUAWEI] ntp trusted authentication-keyid 42
[*HUAWEI] commit
[~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
[~HUAWEI] undo ntp server disable
[*HUAWEI] commit
多播模式
system-view
[~HUAWEI] ntp refclock-master 2
[*HUAWEI] commit
[~HUAWEI] ntp authentication enable
[*HUAWEI] ntp authentication-keyid 42 authentication-mode hmac-sha256 Hello@123456
[*HUAWEI] ntp trusted authentication-keyid 42
[*HUAWEI] commit
[~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
[~HUAWEI] undo ntp server disable
[*HUAWEI] commit
版权说明:如非注明,本站文章均为 扬州驻场服务-网络设备调试-监控维修-南京泽同信息科技有限公司 原创,转载请注明出处和附带本文链接。
请在这里放置你的在线分享代码