Juniper SRX: Configure Time and NTP Client
Let’s see how to set the system time of an SRX Series device manually and configure NTP on the device.
Setting the Time Zone
The time zone is set to the time zone for Rome, Italy:
set system time-zone Europe/Rome |
Manually Setting the System Date and Time
In the following example, the system date and time are set to January 25, 2010 and 11:15:00 a.m.:
set date 201102271100.00 |
The date and time are retrieved from the NTP server AAA.BBB.CCC.DDD:
set date ntp AAA.BBB.CCC.DDD |
Configuring NTP
Two NTP servers (AAA.BBB.CCC.DDD and EEE.FFF.GGG.HHH) using NTP version 4 are configured, AAA.BBB.CCC.DDD is the preferred one:
set system ntp server AAA.BBB.CCC.DDD version 4 prefer set system ntp server EEE.FFF.GGG.HHH version 4 |
Synchronizing System Time When a Device Boots
It is possible to specify that the system time is retrieved from NTP servers when the device boots or enters a chassis cluster backup state.
The system time is retrieved from an NTP server with an IP address of AAA.BBB.CCC.DDD when the device boots:
set system ntp boot-server AAA.BBB.CCC.DDD |
To review NTP configuration information:
show system ntp |
To review NTP service status:
show ntp status |
To get the current system time:
show system uptime | match current |
To display Network Time Protocol (NTP) peers and their states (the no-resolve option suppresses symbolic addressing):
show ntp associations no-resolve |
To troubleshoot NTP issues:
show log messages | match ntp |