Mastering in Time Control: NTP Configuration Made Easy for Free
NTP stands for network time protocol. It is an application layer protocol that is used to synchronize the clock between network devices and the time server. It uses UDP port number 123 for its communication. Networking devices need to make sure that logging information and timestamps have the accurate time and date. There are two ways to do its configuration. The first one is NTP client/server configuration, while the second one is NTP broadcast. In the first one, one device acts as an NTP server, which is also called the master clock and the other devices act as a client which requests time from the master server. In the broadcast scenario, the server acts as the master clock, but this time, it doesn’t listen to the requested time. It sends an NTP broadcast continuously. On the other hand, clients passively listen to NTP broadcasts.
Lab topology for NTP configuration
We connected the router directly to the time server. You can see the IP addresses in the screenshot:
![Lab topology for NTP configuration Lab topology for NTP configuration](https://ccnapracticallabs.com/wp-content/uploads/2023/12/01-Basic-topology-of-NTP.jpg)
Configure the router with the basic configurations such as the IP address.
![Router configuration Router configuration](https://ccnapracticallabs.com/wp-content/uploads/2023/12/02-basic-router-configuration.jpg)
Set the IP address of the server. The IP address of the server is 192.168.1.2/24.
![NTP Server IP NTP Server IP](https://ccnapracticallabs.com/wp-content/uploads/2023/12/03-IP-configuration-of-NTP-server.jpg)
Check the router clock by the following commands;
![wrong router time wrong router time](https://ccnapracticallabs.com/wp-content/uploads/2023/12/04-show-clock.jpg)
As the time is wrong in the router, we will set it through the network time protocol Server. Check the server setting, such as its authentication, key, and password in the NTP server.
![check NTP setting check NTP setting](https://ccnapracticallabs.com/wp-content/uploads/2023/12/05-check-NTP-server.jpg)
As the authentication is disabled. Also, there is no key, and no password is configured. Enable the authentication, set the key ‘5’ and password ‘cisco’.
![setting of NTP Server setting the Server](https://ccnapracticallabs.com/wp-content/uploads/2023/12/06-enable-ntp-server-with-authentication.jpg)
Run the following commands on the router as in the screenshot.
![show time status on a router show time status on a router](https://ccnapracticallabs.com/wp-content/uploads/2023/12/08-check-ntp-status-and-associations.jpg)
As there is no time-related configuration on the router. So, we are going to do NTP configuration on a router.
![NTP setting on router NTP setting on router](https://ccnapracticallabs.com/wp-content/uploads/2023/12/09-configuring-ntp-server-and-authentication-with-ntp-server.jpg)
It will take time from 192.168.1.2. It also enables authentication with a key value ‘5’, and password ‘cisco’.
![check status and association check time status and association](https://ccnapracticallabs.com/wp-content/uploads/2023/12/13-time-and-ntp-checkup-at-router-1024x353.jpg)
Now it displays the time Jul 31, 2023, because today’s date is 31-07-2023. It also shows time status and associations.
Suppose we want to extend our topology, then we can use the topology for our practice.
![lab topology for NTP lab topology for NTP](https://ccnapracticallabs.com/wp-content/uploads/2023/12/41-NTP-large-topology.jpg)
- Configure the IP addresses of all devices
- Configure static route on every router
- Ping from R3 to server to check connectivity
Check router timing on R3
![check time check time](https://ccnapracticallabs.com/wp-content/uploads/2023/12/42-check-time-on-R3.jpg)
As the time is wrong. So, we configure the server for time.
![server time setting server time setting](https://ccnapracticallabs.com/wp-content/uploads/2023/12/46-set-the-tiem-server.jpg)
Similarly, configure the NTP configuration on all routers R1, R2, and R3.
![Router settings Router settings](https://ccnapracticallabs.com/wp-content/uploads/2023/12/47-Routers-setting-1024x490.jpg)
Check the time on R3.
![time at R3 time at R3](https://ccnapracticallabs.com/wp-content/uploads/2023/12/48-time-at-R3-1024x377.jpg)