How to Configure Date and Time in JUNOS

  • by

It’s very important to set the date and time accurately with your local time, also its better to make the same date all of your routers and switches. Because if any troubleshoot or any incident will come it’s you have to find out the exact time of the incident. Otherwise, you will be in trouble if you get different time in different router.

You can set the date and time at JUNOS in different ways. Like, you can configure the date and time exactly what the current time on your watch then does as follow:

You need to enter an operational mode in the CLI:

user@geek> set date 201802111318.00
Sun Jun 23 11:48:00 UTC 2014

Here given the date and time format:
YYYY is year 2014,
MM is month of 2 digits 06, Here 06 is Month of June
DD is the day of 2 digits 23, Here 23 is 23rd
hh is 24 hourĀ format like 11, Here 11 is 11am
mm is minutes in 2 digits like 48, Here 48 is 48 minutes
ss is second of 2 digits 00, here 00 is Zero second.

If you want to set the time zone instead of fixed local time, then you can do that in JUNOS. If you want to show the list of time-zone the enter the command “# set system time-zone?” You will find the all time zone list here. Also, you can configure your desire GMT (Greenwich Mean Time)

[edit]
user@geek# set system time-zone GMT+6

Or you can set the time zone as follows, its depend on your requirement.

[edit]
user@geek# set system time-zone America/Los_Angeles

If you are maintaining a large network and big number of router and switches, then you can use ntp server. All of your devices need to reachable the ntp server and this can be best practice for large networks.

[edit]
user@geek# set system ntp server 192.168.100.10

To show the date and time you just enter the bellow command:

user@geek> show system uptime
Current time: 2018-02-11 13:56:44 UTC
System booted: 2018-01-04 13:00:34 UTC (5w3d 00:56 ago)
Protocols started: 2018-01-04 13:01:37 UTC (5w3d 00:55 ago)
Last configured: 2018-02-10 12:50:39 UTC (1d 01:06 ago) by level3
 1:56PM  up 38 days, 56 mins, 5 users, load averages: 0.01, 0.05, 0.01 

You can find here the current date and time of this router also when the system was booted last time that you can view as well. Also, you can show here the last configuration time of this device.

Leave a Reply