juniper SRX NTP


一、设定时区
user@host# set system time-zone Asia/Shanghai ##设定时区为“亚洲/上海”
二、手动设定日期和时间
手动设定日期为2010年01月25号 11:15:00
user@host> set date 201001251115.00
也能够经过NTP服务器自动较准
user@host> set date ntp 78.46.194.186   ##此处为NTP服务器地址,能够用微软的NTP服务器地址(times.windows.com)
27 Apr 16:10:48 ntpdate[981]: step time server 213.61.224.44 offset 0.000876 sec

配置NTP服务
如下配置了两个NTP服务器,其中78.46.194.186被配为首选(prefer)
user@host# set system ntp server 78.46.194.186 version 4 prefer
user@host# set system ntp server 88.198.34.114 version 4

可配置为当设备启动后自动同步时间
user@host# set system ntp boot-server 78.46.194.186

检查
一、查询当前使用的NTP服务器
user@host# show system ntp
server 78.46.194.186
二、查询更具体的NTP服务状态
user@switch> show ntp status
status=0644 leap_none, sync_ntp, 4 events, event_peer/strat_chg,
version="ntpd 4.2.0-a Thu Feb 14 03:06:23 UTC 2008 (1)",
processor="i386", leap=00, stratum=2,
precision=-20, rootdelay=170.961, rootdispersion=21.583, peer=46724,
refid=172.17.27.46,
reftime=cbc2b0d7.b5d026c0 Wed, Apr 30 2008 10:48:23.710, poll=6,
clock=cbc2b0ef.b402b32b Wed, Apr 30 2008 10:48:47.703, state=4,
offset=18.736, frequency=58.615, jitter=1.425, stability=0.080
三、查看当前系统时间
user@host> show system uptime | match current
Current time: 2009-04-22 17:21:20 CEST
四、查询NTP对端状态
    user@host> show ntp associations no-resolve
         remote           refid      st t when poll reach   delay   offset  jitter
    ==============================================================================

    *192.53.103.104  .PTB.            1 -  504 1024  377   62.492    6.408   0.120
 windows