An NTP server is a server that distributes standard time information to all devices on the network.
By enabling NTP, the device will automatically communicate with the NTP server and the time will be synchronized.
For “NTP server”, which is used for granted but not well understood by many people, here we will explain the basic meaning and mechanism, and how to set up an NTP server.
table of contents
- 1. What is an NTP server?
- 2. What is NTP server time synchronization?
- 3. How the NTP server works
- 4. Role of NTP server and importance of time synchronization
- 5. How should I set up the NTP server?
- 6. Typical NTP server published in Japan
What is an NTP server?
NTP is an abbreviation for “Network Time Protocol”. An NTP server is a protocol (a standard that defines communication procedures and conventions) for synchronizing the time information of all devices. Correct time information can be acquired and distributed not only to computers but also to routers, servers, various switches, etc.
The role of the NTP server is to deliver the exact time to various devices that reference the exact time. At this time, it takes time to communicate with the device to be referenced, and even if there is a slight deviation in the time on the receiving side, the NTP server has a function to adjust the deviation. Therefore, it is possible to obtain a highly accurate time.
By the way, the side that refers to the time is called the “NTP client”, and the side that is referenced is called the “NTP server”.
What is NTP server time synchronization?
The NTP server synchronizes the time using GPS or an atomic clock. Time synchronization is when an NTP client queries the NTP server to set the time over the network, and the NTP server responds to the request. At this time, the NTP server “is based on the time in Coordinated Universal Time (UTC). In the case of the time in Japan, the time in Coordinated Universal Time (JST)” is advanced by 9 hours. I’m using.
● About Coordinated Universal Time (UTC)
Coordinated Universal Time is the time that is the standard time in the world. It is determined by measuring the length of the day based on the count by the atomic clock and the rotation of the earth. If Coordinated Universal Time is translated into English, it will be “Coordinated Universal Time”. Meaning is adjusted global time.
By the way, before using Coordinated Universal Time, I used to use Greenwich Mean Time (GTM). Greenwich Mean Time was a method of calculating time by looking at the sky, but since the movement of atoms is more regular than the movement of the sky, Coordinated Universal Time using an atomic clock has become the world standard. ..
When setting the date and time on your computer, set the time zone. At this time, many people may have seen notations such as “UTC +9: 00” and “UTC-6: 00”. Coordinated Universal Time is the world standard time that we casually use daily.
● About Japan Standard Time (JST)
Japan Standard Time is the standard time in Japan. It is 9 hours ahead of Coordinated Universal Time and is written as “UTC + 9: 00” in the time zone setting. In terms of the legal system, it is not called Japan Standard Time, but “Standard Time” or “Central Standard Time”. In everyday life, it is often called “Japan time”. If Japan Standard Time is set to English, it will be “Japan Standard Time”. This “Japan Standard Time” is abbreviated as “JST”.
In Japan, the time at 135 degrees east longitude (a great circle that passes near Akashi City, Hyogo Prefecture and connects the two poles to intersect the equator of the earth at a right angle) is set as standard time. Currently operated by NICT (National Institute of Information and Communications Technology), we are announcing and distributing 9 hours ahead of Coordinated Universal Time (UTC) determined using atomic clocks through NTP servers and radio fields. It is.
About the mechanism of the NTP server
The NTP server has a hierarchical structure. Each layer is called “Stratum”.
The most reliable time using GPS or atomic clock is defined as “Stratum0”, and Stratum1 is a mechanism that receives the time of Stratum0 and distributes the time to the lower hierarchy (Stratum2 or later). As you synchronize from Stratum1 to the lower layers, the numbers increase to “Stratum2” and “Stratum3”, up to a maximum of Stratum16. By the way, when it comes to the lowest layer “Stratum 16”, synchronization is not possible because there are no more layers. Therefore, only “Stratum 15” can be synchronized as an NTP server.
In addition, after Stratum2, the time from Stratum1 must be received and delivered. The greater the number of Stratums, the greater the error, of course. Everyone should be able to configure NTP on Stratum1, but problems arise when everyone configures it on Stratum1’s NTP server. That is the load on the NTP server.
If Stratum1 is overloaded and fails, there is no point in delivering the correct time. Therefore, to distribute the load, the NTP server is set up to Stratum16 so that it can be distributed and connected.
● NTP POOL PRO JECT
By the way, NTP has launched a project (NTP POOL PROJECT) to set the server after Stratum2 instead of setting it to Stratum1. However, the NTP server-side is also increasing the server so that there is no problem even if it is set directly by an individual user.
As for how large we can handle, we can handle more than 1 million requests per second. Therefore, if you are wondering where your NTP server is set, why not check it once. In this way, each NTP server is designed to maintain accuracy by acquiring time information from the upper NTP server.
The role of the NTP server and the importance of time synchronization
Even if you don’t use an NTP server, your computer has a timer, so you can keep it a certain time. However, the accuracy is not good, so if you move it for weeks or months, it will almost always shift by seconds or minutes.
If it is a personal computer that is used by an individual as a hobby, it may be okay if there is a deviation of a few seconds or a few minutes, but it is not an accurate time for the computer that is the server on the Internet. There are many cases where problems occur.
Log collection is one reason why it is better to have the correct time.
For example, if something goes wrong or something goes wrong, you will collect computer logs to analyze the cause. At this time, the time recorded in the log is generally the time set in the computer. In the unlikely event that the computer with the error or trouble is off by more than an hour from the exact time, it will be significantly out of sync and confusing.
It is possible to predict if there is a deviation of 1 hour at all times, but if there is an error daily, first identify the day when the time is off, and then how much error is occurring. If you guess, it will take extra effort. Especially for corporate servers and personal computers, it is necessary to respond promptly when an error or trouble occurs. It is important to properly set up the NTP server and synchronize the time so that the cause of the problem can be identified and the log collection will not be hindered so that it can be dealt with immediately.
How should I set up the NTP server?
If you are using a general personal computer, you do not need to be aware of the NTP server or NTP client. This is because I usually become an NTP client and use an NTP server.
For example, if you are using a Windows OS, the default NTP server setting is “time.windows.com”. Unless you change this setting, it will automatically become an NTP client when needed and will contact the NTP server for time synchronization to make adjustments.
However, for those who want to know how to set it, “Windows NTP server settings” and “Mac NTP server settings” are introduced below.
● Windows NTP server settings
If you are using a Windows PC and want to set up an NTP server, follow the procedure below.
- 1. Click the “gear icon” in the start menu
- 2. Click “Time and Language” displayed on the Windows settings screen.
- 3. From the date and time setting screen, click “Add a clock in another time zone”
- 4. When the date and time window appears, click “Internet Time” in another tab.
- 5. When the Internet time setting is displayed, click “Change setting”.
- 6. When the Internet time setting window is displayed, check “Synchronize with Internet time server”.
- 7. In addition, enter the URL of any server and click “Update Now”
- 8. When the update is complete, click “OK” when the message “Time was successfully synchronized with OOOO (date and time, URL entered arbitrarily)” is displayed.
- 9. “Changed NTP server” and “Next synchronization” is also displayed in Internet time, so click “OK”.
This completes the Windows NTP server settings.
If you get an error in the NTP server settings (cannot synchronize with the NTP server), check the firewall settings. Check if the NTP server is blocked by the firewall settings, and change the settings if necessary.
By the way, the command to check the NTP server is as follows.
- [bash] w32tm / query / source [/ bash]
You can use this command to see which NTP server you are currently referencing. However, it is not always necessary to check with a command, so please use it when you need it.
● Mac NTP server settings
If you are using a Mac computer, set up the NTP server according to the following flow.
- 1. Click “System Preferences” in the Apple menu
- 2. Click “Time & Language” displayed in System Preferences
- 3. From the date and time setting screen, click the “lock icon (click the key to change)” displayed at the bottom left of the screen.
- 4. Then a pop-up will ask for “Username” and “Password”, so enter them to unlock.
- 5. When the lock is released, you will be returned to the date and time setting screen, so click the “Set date and time automatically” checkbox.
- 6. Click the pull-down next to the checkbox where you can select the NTP server
- 7. Select and click any NTP server (in Japan, select “Apple Asia”) or enter the URL of any NTP server.
- 8. After completing the settings, click the “lock icon” displayed at the bottom left again.
If the date and time screens are changed in the above flow, the NTP server settings are complete.
Typical NTP server published in Japan
The NTP servers released in Japan are as follows. Please use it as a reference when changing the NTP server by yourself.
- Public NTP server of the National Institute of Information and Communications Technology (NICT)
- Internet Multifeed (MFEED) time information service for Public
- Public NTP server for NTP POOL PROJECT
- NTP server published by the National Astronomical Observatory of Japan
● Public NTP server of the National Institute of Information and Communications Technology (NICT)
This is an NTP server released by the National Institute of Information and Communications Technology (NICT). NICT’s NTP server may be set by default in some network devices such as personal computers and routers.
- NTP server dress: ntp.nict.jp
● Internet Multifeed (MFEED) time information service for Public
Internet Multifeed (MFEED) is a service that provides highly accurate time information free of charge via the Internet.
- NTP server dress: mfeed.ad.jp
● Public NTP server of NTP POOL PROJECT
It is one of the most reliable NTP servers that are officially open to the public.
- NTP server dress 1: pool.ntp.org
- NTP server dress 2: jp.pool.ntp.org
The setting method of the NTP server is also introduced above, so please check it together.
If you are using a typical computer, you may not be aware of the NTP settings. However, if your business requires accurate time, setting up an NTP server can be important. If you know the basic setting method, it will be useful in case of an emergency. Why don’t you take this opportunity to deepen your understanding of NTP servers?
If you ever want to know about similar things, check out the Facebook page Maga Techs