If you are a network administrator then you must be familiar with the importance of querying NTP server. On the other hand, if you are fresh IT guy or a new network admin then you might not have heard about the NTP server. But, don’t worry. This article will explain what an NTP server is, why you need to query it and how to query the NTP server.
NTP stands for Network Time Protocol. Network Time Protocol is the most commonly used time protocol in the whole world. An NTP server is a server that uses the Network Time Protocol.
The main task of an NTP server is to send the time signal to any server that requests it. The NTP servers utilizes the UTC (Universal Time Coordinated) time source for its timing signals. There are many NTP servers all around the globe. You can actually click here to check the NTP servers in a specific region.
Note: NTP Server and NTP are used interchangeably. An NTP server i.e. a server that utilizes the NTP is sometimes referred to as just the NTP. So, don’t be confused by this.
Why would you use an NTP server?
NTP servers are queried by servers from all around the world. The main purpose of an NTP server is to provide the timing signal to every server that sends it a request. This helps in keeping the servers from all around the world at the same time. In short, it helps in synchronizing a network to the same time that all the other major servers and devices are using. This mainly helps in global transactions and communications.
So, it is pretty common for servers to query the NTP server to ensure that all their devices are synchronized and using the same time.
How to query the NTP Server?
Querying the NTP server is pretty easy. You can configure your Windows server to query the NTP server in just a few lines.
- Open Command Prompt or PowerShell with administrator rights.
- Type net stop w32time and press Enter. This will stop the time service
- Type w32tm /config /syncfromflags:manual /manualpeerlist:”0.us.pool.ntp.org,1.us.pool.ntp.org,2.us.pool.ntp.org,3.us.pool.ntp.org” and press Enter.
- This will set the peer list for external servers. These servers are for US. If you live outside of US then you should replace the part after “manualpeerlist:” with your own server list. You can get the server addresses from here
- Type w32tm /config /reliable:yes and press Enter. This will set your connection as reliable.
- Type net start w32time and press Enter. This will start your time service again.
That’s it. Simple as that.
Note: UDP port 123 should be open in order for the NTP traffic to reach you.
If, for some reason, the time isn’t synchronizing with the NTP servers then check the Event logs via the Event Viewer. An event with the 47 id usually means that the NTP servers aren’t reachable. This can be fixed by checking your firewall.
Some other commands that can be useful for this process are given below:
- w32tm /query /configuration (checks and shows the NTP configuration)
- w32tm /query /peers (checks and shows the list of NTP servers configured along with their status)
- w32tm /resync /nowait (forces the synchronization of time)
- w32tm /query /source (shows the source of the time)
- w32tm /query /status (shows the service status, use it to check whether the time is coming from the external NTP servers or the cmos clock)