NTP Server

CISCO
NTP MASTER
(config)#ip name-server 8.8.8.8
(config)#ntp server id.pool.ntp.org
(config)#clock timezone WIB 7
(config)ntp update-calendar
#show clock detail
#show calendarNTP CLIENT
(config)#clock timezone WIB 7
(config)#ntp server 12.12.12.1
# show ntp associations
# show ntp status
#show clock detail

FORTIGATE
using console, login as admin
config system global
    set fgd-alert-subscription advisory latest-threat
    set hostname “FGT1”
    set timezone 53
end
config system dns
    set primary 208.91.112.53
    set secondary 208.91.112.52
end
config system ntp
    set ntpsync enable
    set type custom
    set syncinterval 360
    config ntpserver
        edit 1
            set server “id.pool.ntp.org”
        next
    end
    set server-mode enable
    set interface “port1”
end

FGT1 # exe date
current date is: 2016-09-17
FGT1 # exe time
current time is: 19:28:04

JUNIPER
NTP MASTER
R1# show
system {
host-name R1;
domain-name poc.com;
time-zone Asia/Jakarta;
root-authentication {
encrypted-password “$1$k1Iyv6h7$zpP9XotU3WcLUU2Kf9baC.”; ## SECRET-DATA
}
name-server {
8.8.8.8;
ntp {
boot-server 202.162.32.12;
server 103.28.56.14;
}
}
interfaces {
em0 {
unit 0 {
family inet {
address 10.0.10.151/24;
}
}
}
em1 {
unit 0 {
family inet {
address 12.12.12.1/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
}
}
}
}
routing-options {
static {
route 0.0.0.0/0 next-hop 10.0.10.1;
}
}

# run show ntp associations
     remote           refid      st t when poll reach   delay   offset  jitter
=============================================================

 ns1.matrixgloba 203.123.48.219   2 –   22  512  377   19.156  2995.28 1137.12

NTP CLIENT
R2# show
system {
host-name R2;
domain-name poc.com;
time-zone Asia/Jakarta;
root-authentication {
encrypted-password “$1$ZyPyDk7D$KjTrKc1c61UuNszJ/HplX.”; ## SECRET-DATA
}
name-server {
8.8.8.8;
}
ntp {
boot-server 12.12.12.1;
server 12.12.12.1;
}
}
interfaces {
em0 {
unit 0 {
family inet {
address 12.12.12.2/24;
}
}
}
lo0 {
unit 0 {
family inet {
address 127.0.0.1/32;
}
}
}
}
routing-options {
static {
route 0.0.0.0/0 next-hop 12.12.12.1;
}
}

> show ntp status
> run show ntp associations
remote refid st t when poll reach delay offset jitter
==============================================================================
*12.12.12.1 103.28.56.14 3 – 32 64 77 1.786 1088.36 599.222

 

MIKROTIK
-download and install ntp server package inside “Extra packages from http://www.mikrotik.com/download

 

-check your LAN ip address
> ip address print
Flags: X – disabled, I – invalid, D – dynamic
 #   ADDRESS            NETWORK         INTERFACE
 0   ;;; default configuration

     10.0.46.1/24       10.0.46.0       bridge-local

-set your Mikrotik time zone
> /system clock print
                  time: 17:25:06
                  date: sep/12/2016
  time-zone-autodetect: yes
        time-zone-name: Asia/Jakarta
            gmt-offset: +07:00

            dst-active: no

-set your NTP server
> system ntp server print
              enabled: yes
            broadcast: no
            multicast: no
             manycast: yes

  broadcast-addresses:

-set your Mikrotik sync its time with id.pool.ntp.org
> system ntp client print
          enabled: yes
             mode: unicast
      primary-ntp: 202.162.32.12
    secondary-ntp: 0.0.0.0
  dynamic-servers:

           status: synchronized

-configure firewall to allow ntp traffic
/ip firewall nat print
Flags: X – disabled, I – invalid, D – dynamic
 0    ;;; default configuration
      chain=srcnat action=masquerade out-interface=ether1-gateway log=no
      log-prefix=””
 1    ;;; NTP
      chain=srcnat action=src-nat to-addresses=10.0.46.1 protocol=udp

      src-port=123

-verify current clock
> system clock print
                  time: 17:38:10
                  date: sep/12/2016
  time-zone-autodetect: yes
        time-zone-name: Asia/Jakarta
            gmt-offset: +07:00
            dst-active: no
Advertisements

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 )

Google+ photo

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

Connecting to %s