fbpx

What is Network Time Protocol & How to Configure NTP?

· >

What is Network Time Protocol (NTP)?

NTP stands for Network Time Protocol, which is responsible to sync time to a central location or server.  NTP is designed to synchronize the clocks on computers and networks across the Internet or Local Area Networks (LANs), MANs & WANs.

So why would I configure my network devices to sync its time with NTP server? Well, all network administrators require monitoring of their network and keep track record of all events happening in their network with actual timestamp. So imagine if your network got hacked then you would not know what and when it happened?

What Port does NTP uses?

NTP servers work in TCP / IP framework and use User Datagram Protocol UDP port 123.

Which time server should I use?

A good example of a NTP server is NTP POOL DOT ORG. This is a cluster of NTP servers that many servers and network devices use to synchronize their clocks.

How do I know that NTP is Accurate?

NTP uses concept of Stratum which defines how many NTP hops a device is from an authoritative time server. If a network device like router, switch or firewall is configured with multiple NTP servers it would prefer NTP server with lowest stratum.

Configure NTP Cisco

Below is the Step-by-Step Procedure to configure NTP in Cisco, optionally you can configure authentication with your NTP server. If we are using URL based NTP server like pool.ntp.org we need to configure name-server to resolve the URL to IP address as follows:

Cisco(config)#ip name-server 8.8.8.8
Cisco(config)#ntp server pool.ntp.org

NTP Verification Commands Cisco

We can verify NTP status and associations in Cisco by using below mentioned commands.

Cisco#show ntp associations
Cisco#show ntp status
Cisco#show clock

NTP Configuration JunOS

Below is the Step-by-Step Procedure to configure NTP in Juniper, optionally you can configure authentication with your NTP server.

  1. Specify the boot server:
user@juniper# set system ntp boot-server 1.2.3.4
  1. Specify the NTP server:
user@juniper# set system ntp server 1.2.3.4
  1. Specify the key number, authentication type (MD5), and key for authentication:
user@juniper# set system ntp authentication-key 2 type md5 value "ABCD$1234"

NTP Verification Commands Juniper

We can verify NTP status and associations in juniper by using below mentioned commands.

user@juniper>show ntp status
user@juniper>show ntp associations

ALSO READ:

NTP Configuration Fortigate

In our Fortigate firewall we are using our internal interface as source interface for time synchronization with NTP Server 1.2.3.4 with synchronization time of 30 minutes by default.

config system ntp
    set ntpsync enable
    set type custom
    set syncinterval 30
    config ntpserver
        edit 1
            set server “1.2.3.4”
        next
    end
    set source-ip [LAN-IP]
    set server-mode enable
    set interface “internal”
end

NTP Verification Commands Fortigate

We can verify the NTP status in Fortigate as follows

fortigate#diag sys ntp status

In this article we have learnt what NTP is, how to configure NTP for cisco, how to configure NTP for juniper & lastly how to configure NTP for Fortigate. I hope this has been informative for you, if you like our content kindly do like our Facebook page.

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments