DateTime and NTP Junos

Network Time Protocol (NTP) adalah protocol yang digunakan untuk meng-sinkron-kan sistem waktu (clock) pada komputer terhadap sumber yang akurat, melalui jaringan intranet atau internet. Dalam implementasinya nanti akan ada yang namanya NTP server dan NTP client. Disini NTP server disebut sebagai server untuk sebagai sinkronisasi waktu bagi client, sedangkan NTP client disebut sebagai yang meminta waktu kepada NTP server. Dalam aplikasinya, sebaiknya jaringan mempunyai satu (atau lebih) NTP server lokal untuk semua NTP client, yang di-sinkron-kan terhadap NTP server di luar jaringan. Konfigurasi ini lebih menjamin antar sistem-sistem yang terkait dalam jaringan yang bersangkutan.

Setting the Time Zone
Time zone di sesuaikan ke time zone Asia, Jakarta:

root# set system time-zone Asia/Jakarta

Rubah tanggal dan waktu secara manual
Di contoh berikut, kita akan merubah tanggal dan waktu ke 23 November 2013 dan 1:10:00 a.m

root# run set date 201311230107.00

Atau kita bisa menggunakan NTP server untuk menyesuaikan waktu dengan juniper device kita jadi di posisi ini kita sebagai NTP client.

root# run set date ntp ntp.kim.lipi.go.id
23 Nov 01:21:03 ntpdate[4573]: step time server 203.160.128.178 offset -25176.704159 sec

Atau kita bisa juga menggunaka 2 NTP server salah satu sebagai cadangan semisal kalau yang pertama down maka akan sinkronisasi ke yang kedua. Disini yang ntp.kim.lipi sebagai pertama sedangkan yang id.pool sebagai yang kedua. Kita menggunakan NTP version 4

root# set system ntp server ntp.kim.lipi.go.id version 4 prefer
root# set system ntp server id.pool.ntp.org

Synchronizing System Time When a Device Boots
Bisa juga untuk sinkronisasi waktu dari NTP server saat device booting. Misalnya device akan meminta waktu ke NTP server ntp.kim.lipi saat device booting.

root# set system ntp boot-server ntp.kim.lipi.go.id

Untuk melihat konfigurasi NTP

root# show system ntp
boot-server ntp.kim.lipi.go.id;
server 203.160.128.178 version 4 prefer;
server 203.89.31.13;

[edit]
root#

untuk review NTP service status

root# run show ntp status

Untuk melihat current system time

root# run show system uptime | match current
Current time: 2013-11-23 02:14:36 WIT

[edit]
root#

Untuk menanpilkan Network Time Protocol (NTP) peers dan statusnya (the no-resolve option suppresses symbolic addressing):

root# run show ntp associations no-resolve
     remote           refid      st t when poll reach   delay   offset  jitter
==============================================================================
*203.160.128.178 .UTC.            1 -    7   64    3   24.704    2.158   2.123
+203.89.31.13    203.160.128.178  2 -    8   64    3   30.523    0.622   7.524

[edit]
root#

Untuk troubleshoot masalah NTP

root# run show log messages | match ntp
Nov 23 02:12:43   init: ntp (PID 4834) started

[edit]
root#

Nah kemudian kita posisikan Device junos kita sebagai NTP server, yang kemudian laptop kita sebagai NTP client yang akan meminta waktu ke NTP server (Juniper Device). Cari “Date and Time” di start menu kemudian masuk ke Tab “Internet Time”

1

Kemudian masukan IP address juniper device ke kolom server, kemudian “Update now” otomatis akan sinkronisasi waktu ke juniper devicenya.

2

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.