/system/ntp/client

client

Network Time Protocol (NTP) client settings. The client synchronizes the router's clock with one or more NTP servers. Static servers are set in servers or in the servers list; the DHCP client adds servers dynamically...


system/ntp/client

Type: Settings Directory

网络时间协议(NTP)客户端设置。客户端将路由器的时钟与一个或多个 NTP 服务器同步。静态服务器在 servers 或 servers 列表中设置;当 DHCP 客户端的 use-peer-ntp 启用时,它会动态添加服务器。请参阅 NTP 指南。

参数类型描述
enabledbool启用 NTP 客户端。禁用时,status 为 stopped。默认值:no。
modeenum (unicast | broadcast | multicast | manycast)客户端从服务器获取时间的方式: - unicast(默认)- 直接查询每个配置的服务器。 - broadcast - 监听本地网络上服务器广播的时间。 - multicast - 监听本地网络上服务器组播的时间。 - manycast - 通过向本地网络发送 manycast 查询来发现服务器。
serversmulti { server-list: address (flags=46D) }以空格分隔的 NTP 服务器列表。接受 IPv4 和 IPv6 地址(必要时带 @vrf 或 %interface 后缀)和域名,域名使用 /ip/dns 解析。此列表中的服务器也会与动态条目一起显示在 servers 列表中。
vrfenum用于与服务器通信的 VRF。默认值:main。
只读参数类型描述
freq-driftnum本地时钟的估计频率漂移,单位为 PPM。使用 reset-freq-drift 重置。
statusenum (stopped | waiting | synchronized | using-local-clock)当前客户端状态: - stopped - 客户端已禁用。 - waiting - 尚无可用服务器(无应答,或所有对等点都被拒绝)。 - synchronized - 时钟已同步到 synced-server。 - using-local-clock - 本地时钟被用作参考(需要在 /system/ntp/server 中设置 use-local-clock=yes)。
synced-serveraddress (flags=46D)时钟同步到的服务器地址。当本地时钟为参考时,为 127.127.1.0。
synced-stratumnum同步源的层级。主服务器为层级 1;每经过一次同步步骤增加一。
system-offsetnum本地时钟与 NTP 源之间的偏移;使用 print 读取时以毫秒显示。