Today, in this section we will discuss about NTP protocol. This is commonly used in every network.
As you know time is very important parameter in monitoring of routers and any network devices.The best practices recommend having same clock synchronized between all network devices (Routers/Switches/etc).
This will help to maintain logs and troubleshoot any network incident. Suppose anything wrong happens in network and while troubleshooting we are reviewing logs. That time we will find all devices with different clocks, some are not configured. So it will be big problem when exactly the incident happened and what is status of supporting devices at that time.
The Network Time Protocol (NTP) is a protocol designed to time synchronization in network. NTP runs over UDP, which in turn runs over IP. We configure NTP to provide accurate timestamps for system log messages.
NTP versions was described in below RFCs–
- NTP v1 - RFC 958
- NTP v2 - RFC 1119
- NTP v3 - RFC 305
- NTP v4 - RFC 5905
NTPv4 overview-
NTP Version 4 (NTPv4) is an extension of NTP version 3. NTPv4 supports both IPv4 and IPv6 and is backward-compatible with NTPv3.
- NTPv4 supports IPv6, making NTP time synchronization possible over IPv6.
- Security is improved over NTPv3. The NTPv4 protocol provides a whole security framework based on public key cryptography and standard X509 certificates.
- Using specific multicast groups, NTPv4 can automatically calculate its time-distribution hierarchy through an entire network.
- NTPv4 automatically configures the hierarchy of the servers in order to achieve the best time accuracy for the lowest bandwidth cost. This feature leverages site-local IPv6 multicast addresses.
Stratum- you can see stratum levels in show ntp status.
Let see what is stratum -
Stratum levels define the distance from the reference clock to device (router). Stratum describes accuracy of your clock.
When you enable NTP, Router/network devices can learn clock from many sources in
network.
For selection of best NTP server/clock in available sources. Stratum will help router
to find most accurate clock. Whichever device is having lowest stratum that is best.
It is common to see stratum 3, 4
Detailed example of stratum levels -
- Stratum 0 - will be for GPS devices and Atomic clocks.
- Stratum 1 - These are servers/ computers which connect to GPS devices and atomic clocks. These server acts as servers which serve time in hierarchal way to downstream devices.
- Stratum 2 - These are computers/ network devices. Which send NTP request to stratum 1 devices to synchronize most accurate clock. Stratum 2 servers can serve time to stratum 2 servers also
- Stratum 3 - these devices also perform same function like Stratum 2 , These servers collects the data from startum 2 servers.
Below diagram will explain you about stratum levels.
Hope this diagram will help you for better understanding about stratum.
Working flow of NTP -
NTP communication consists of time requests and control queries. Time requests provide the standard client/server relationship in which a client requests time synchronization from an NTP server.
Control queries provide ways for remote systems to get configuration information and reconfigure NTP servers.
NTP modes -
NTP can operate in four different modes--client, server, peer, and broadcast. These modes provide NTP with a great amount of flexibility in configuration and synchronization in network.
Here is a short explanation of the NTP modes:
- Client Mode - An NTP client is configured to let its clock be set and synchronized by an external NTP timeserver (Router/server/etc). NTP clients can be configured to use multiple servers to set their local time and are able to give preference to the most accurate time sources. They will not provide synchronization services to any other devices.
- Server Mode -An NTP server is configured to synchronize NTP clients. Servers can be configured to synchronize any client or only specific clients.NTP servers will not accept synchronization information from their clients and will not let clients update or affect the server's time settings.
- Peer Mode -With NTP peers, one NTP-enabled device does not have authority over the other. With the peering model, each device shares its time information with the other, and each device can also provide time synchronization to the other.
- Broadcast/multicast Mode -Broadcast/multicast mode is a special NTP mode with which the NTP server broadcasts its synchronization information to all clients. Broadcast mode requires that clients be on the same subnet as the server.Multicast mode requires that clients and servers have multicast access available and configured.
Hope this information is informative for you..
For like and queries, Plz put comment with your mail id ...

