华为交换机配置和NTP服务器同步时间

<YZ-SW1>clock timezone cst add 8------------------------设置时区 东8区
<YZ-SW1>dis clock ----------------------- 查询当前时间
2020-10-29 15:14:00
Thursday
Time Zone(DefaultZoneName) : UTC
<YZ-SW1>
[YZ-SW1]ntp-service unicast-server X.X.X.X--------------配置ntp同步
Warning: The NTP IPv4 server function is disabled. Run the undo server disable command to enable the IPv4 server fu
nction.Warning: The NTP IPv6 server function is disabled. Run the undo IPv6 server disable command to enable the IPv6 serv
er function.
[YZ-SW1]
<YZ-SW1>display ntp-service status ---------------------------查询
clock status: unsynchronized
clock stratum: 16
reference clock ID: none
nominal frequency: 100.0000 Hz
actual frequency: 100.0000 Hz
clock precision: 2^16
clock offset: 0.0000 ms
root delay: 0.00 ms
root dispersion: 0.00 ms
peer dispersion: 0.00 ms
reference time: 00:00:00.000 UTC Jan 1 1900(00000000.00000000)
[YZ-SW1]
[YZ-SW1]
[YZ-SW1]display ntp-service sessions-------------------------------------------------查询NTP服务器会话
clock source: X.X.X.X(写你的NTP服务IP)
clock stratum: 16
clock status: configured, insane, valid, unsynced
reference clock ID: 0.0.0.0
reach: 0
current poll: 64
now: 32
offset: 0.0000 ms
delay: 0.00 ms
disper: 0.00 ms

原文地址:https://www.cnblogs.com/jingjiaming/p/14367480.html