Estimated reading time: 4 minutes
You may or may not be aware that Google provides a public NTP server. They provide a free, global time service that you can use to synchronize to Google’s atomic clocks.
What is NTP?
The Network Time Protocol (NTP) is used by hundreds of millions of computers and devices to synchronize their clocks over the Internet. If your computer sets its own clock, it likely uses NTP.
How is Google Public NTP different?
Google Public NTP serves leap-smeared time. They use this technology to smoothly handle leap seconds with no disruptive events.
They are able to implement Google Public NTP with their load balancers and their fleet of atomic clocks in data centres around the world. In addition to providing accurate and reliable time synchronization, they also utilize advanced load-balancing algorithms to ensure that client requests are evenly distributed among servers. This enables them to achieve optimal performance and a seamless user experience at scale. The implementation of Google Public NTP is just one of the many ways in which Google continuously works towards enhancing the scalability, reliability, and performance of its load-balancing service.
Try it out
- Configure your network settings to use
time.google.com
as your NTP server. - Or, read the configuration instructions.
We recommend that you don’t configure Google Public NTP together with non-leap-smearing NTP servers.
Configuring Clients
Apple macOS (OS X)
- Open System Preferences.
- Choose the “Date & Time” panel.
- Click the lock to make changes.
- Enter your password.
- Select “Date & Time”.
- In the box next to “Set date and time automatically”, enter
time.google.com
.
Cisco IOS and NX-OS
router# config t
Enter configuration commands, one per line. End with CNTL/Z.
router(config)# no ntp server
router(config)# ntp server time1.google.com
router(config)# ntp server time2.google.com
router(config)# ntp server time3.google.com
router(config)# ntp server time4.google.com
router(config)# copy running-config startup-config
Google Compute Engine
Although you can use Google Public NTP from Compute Engine, you will get better performance from the private cloud servers, which serve the same time using the same smear. Follow these instructions.
Juniper Junos
NTP is configured at the [edit system ntp]
hierarchy level:
system {
ntp {
server time1.google.com;
server time2.google.com;
server time3.google.com;
server time4.google.com;
}
}
Linux
ntpd
or chrony
- Edit
/etc/ntp.conf
or/etc/chrony/chrony.conf
(depending on the service you’re using) using your favorite text editor. - Remove or comment out any lines starting with
server
, to prevent your machine from trying to mix smeared and non-smeared servers. - Add the lines:
server time1.google.com iburst
server time2.google.com iburst
server time3.google.com iburst
server time4.google.com iburst - Restart the NTP/chrony daemon using
sudo service ntp reload
orsudo service chrony force-reload
.
systemd-timesyncd
- Edit
/etc/systemd/timesyncd.conf
- Set the content of the
[Time]
block to:[Time]
Leaving
NTP=
FallbackNTP=time.google.comNTP=
uncommented and assigned to an empty string resets the list of NTP servers, including any per-interface assignments. This prevents inadvertently moving between smeared and un-smeared time servers. Configuring Google Public NTP as the fallback server will cause it to be selected as the only NTP server. - Restart
systemd-timesyncd
usingsystemctl restart systemd-timesyncd.service
as a user with appropriate permissions - Verify that your system is using Google Public NTP with
timedatectl show-timesync | grep ServerName
. If successfully configured, the output will show:ServerName=time.google.com
Microsoft Windows
- Open the Control Panel.
- Click the “Date and Time” icon.
- Choose the “Internet Time” tab. (This will not be available if your PC is part of a domain. In that case, it will synchronize time with the domain controller. You can configure the controller to use Google Public NTP.)
- Click the “Change settings…” button.
- Check the box “Synchronize with an Internet time server”.
- Next to “Server:”, enter
time.google.com
.
Microsoft Windows Server
Follow Microsoft’s instructions to update your registry.
Feedback
Should you have any questions or feedback on the Google NTP services, please leave us a message below using our comments section.
Share this content: