Knowledge Center Search


 

[SRX] Getting Started - Configure Time and NTP Client

  [KB15756] Show KB Properties

  [KB15756] Hide KB Properties

Categories:
Knowledge Base ID: KB15756
Last Updated: 17 Apr 2013
Version: 5.0

Summary:

This article describes how to set the system time of an SRX Series device manually and configure Network Time Protocol (NTP) on the device.

For other topics, go to the SRX Getting Started main page.

Problem or Goal:
  • Set the time zone.
  • Manually set the system date and time.
  • Configure NTP.
  • Troubleshoot NTP.

Cause:

Solution:

This section contains the following:


J-Web Configuration

To set the time zone for the device:
  1. Select Configure>System Properties>Date Time.
  2. Click Edit.
  3. In the Timezone list, select the appropriate time zone. For example, Europe/Berlin.
  4. Click OK.
To manually set the system date and time:
  1. Select Configure>System Properties>Date Time.
  2. Click Edit.
  3. In the Set time area, click Manual.
  4. Using the calendar that appears, select the date.
  5. In the Time area, specify the time in HHMMSS format.
  6. Click OK.
To configure NTP:
  1. Select Configure>System Properties>Date Time.
  2. Click Edit.
  3. In the Set time area, click NTP servers.
  4. Click Add. The Add NTP Server dialog box appears.
  5. In the NTP server box, type the name or IP address of the NTP server. For example, 78.46.194.186.
  6. In the Version list, select the version of NTP packets to be sent to the NTP server. For example, 4 for version 4.
  7. To make the NTP server the preferred server among multiple servers, select Prefer this NTP server.
  8. Click OK.
  9. To add more NTP servers, repeat steps 4 through 8.
  10. In the Edit Date and Time Settings dialog box, click OK.
If you are finished configuring the device, click Commit to commit the configuration.


CLI Configuration


Setting the Time Zone


In this example, the time zone is set to the time zone for Berlin, Germany.
user@host# set system time-zone Europe/Berlin

Manually Setting the System Date and Time


In this example, the system date and time are set to January 25, 2010 and 11:15:00 AM.
user@host> set date 201001251115.00
In this example, the date and time are retrieved from the NTP server 78.46.194.186:
user@host> set date ntp 78.46.194.186
27 Apr 16:10:48 ntpdate[981]: step time server 213.61.224.44 offset 0.000876 sec

Configuring NTP


In this example, two NTP servers using NTP version 4, 78.46.194.186 and 88.198.34.114, are configured. The NTP server with the IP address of 78.46.194.186 is the preferred NTP server.
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

For information about NTP and finding an NTP server, see http://support.ntp.org/bin/view/Servers/WebHome.


Synchronizing System Time When a Device Boots


You can specify that the system time is retrieved from the NTP server when the device boots or enters a chassis cluster backup state. In this example, the system time is retrieved from an NTP server with an IP address of 78.46.194.186 when the device boots.
user@host# set system ntp boot-server 78.46.194.186


Technical Documentation

Junos OS System Basics Configuration Guide

Junos 10.4
  • PDF -- See Chapter 8, Configuring Time (page 121)
  • HTML
Junos 11.4
  • PDF -- See Chapter 8, Configuring Time (page 133)
  • HTML


Verification

To review NTP configuration information, use this operational mode command:
user@host# show system ntp
server 78.46.194.186

To review NTP service status, use this operational mode command:
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

To get the current system time, use the show system uptime command with the match command specified to match current.
user@host> show system uptime | match current
Current time: 2009-04-22 17:21:20 CEST

To display Network Time Protocol (NTP) peers and their states, use this operational mode command.  The no-resolve option suppresses symbolic addressing.
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



Troubleshooting

To troubleshoot NTP issues, use this command:
user@host> show log messages | match ntp

NOTE: If you are using the loopback interface with the Firewall Filters, then follow KB11436 - Why does Network Time Protocol (NTP) sometimes stop working if a loopback firewall filter is applied.

Purpose:
Implementation
Troubleshooting

Related Links:

 

 

ASK THE KB

Question or KB ID:


 


 

 
Copyright© 1999-2012 Juniper Networks, Inc. All rights reserved.