1.开启华为交换机ntp服务
undo ntp-service server disable
2.设置交换机的时区为东八区
clock timezone BeiJing add 08:00:00
3.设置交换机同步的ntp-server服务器(此教程使用的是阿里的ntp服务器1)
ntp-service unicast-server 120.25.115.20
配置完成后可以查看交换机时间
可以看见同步了成了正确的北京时间
附:国内外常用ntp服务器
NTP服务器列表
Windows系统上自带的两个:time.windows.com 和 time.nist.gov MacOS上自带的两个:time.apple.com 和 time.asia.apple.com NTP授时快速域名服务:cn.ntp.org.cn
1、阿里云授时服务器
#NTP服务器 ntp.aliyun.com ntp1.aliyun.com ntp2.aliyun.com ntp3.aliyun.com ntp4.aliyun.com ntp5.aliyun.com ntp6.aliyun.com ntp7.aliyun.com
#Time服务器 time1.aliyun.com time2.aliyun.com time3.aliyun.com time4.aliyun.com time5.aliyun.com time6.aliyun.com time7.aliyun.com
2、国内大学授时服务器
s1c.time.edu.cn北京大学
s2m.time.edu.cn北京大学
s1b.time.edu.cn清华大学
s1e.time.edu.cn清华大学
s2a.time.edu.cn清华大学
s2b.time.edu.cn清华大学
3、国外授时服务器
#苹果提供的授时服务器
time1.apple.com time2.apple.com time3.apple.com time4.apple.com time5.apple.com time6.apple.com time7.apple.com
#Google提供的授时服务器
time1.google.com time2.google.com time3.google.com time4.google.com
可以ping下地址获取到对应ip