How to configure the NTP configuration on Ancor server

Modified on Wed, 19 Mar at 1:02 AM

Overview:
NTP Configuration: Network Time Protocol, commonly referred to as NTP, is a protocol that’s responsible for synchronizing system clocks in a network. NTP refers to both the protocol and the client system alongside the server programs residing on the networked systems.

Applicable platform:

On-Premise Deployment

The below steps show how to configure the NTP configuration on Ubuntu 
1. Before going to install the ntp package we make sure all the repositories are connected properly using the below command.
sudo apt update -y

2. Install NTP Server on Ubuntu using the below command
sudo apt install ntp
Install NTP Server on Ubuntu

How to check the NTP protocol installation status and version
sntp --version

3. Once the above steps are completed, We need the configure the NTP Server Pools on /etc/ntp.conf using any text editor and save it according to your closet location in the edit file here we used for Europe.
vim /etc/ntp.conf file

Note: The NTP Pool DNS system automatically picks time servers that are geographically close to you, but if you want to choose explicitly.

Area:HostName:
Worldwidepool.ntp.org
Asiaasia.pool.ntp.org
Europeeurope.pool.ntp.org
North Americanorth-america.pool.ntp.org
Oceaniaoceania.pool.ntp.org
South Americasouth-america.pool.ntp.org

Please refer to this URL for more details: https://support.ntp.org/bin/view/Servers/NTPPoolServers 

4.Now for the changes to take effect, Please restart the NTP service and verify its status by using these commands
systemctl restart ntp
systemctl status ntp

If any UFW firewall is enabled we need to allow NTP service across it so that client machines can access the NTP server using the below commands.
ufw allow 123/udp 
sudo ufw reload
sudo ufw status

5. Finally how to verify whether NTP is working Or not on terminal, Please run below commands
ntpstat

echo $?

Note:
If the exit status 0 – Clock is synchronised.
exit status 1 – Clock is not synchronised.
exit status 2 – If clock state is indeterminant, for example if ntpd is not contactable.

 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article