The Network Time Protocol is used to synchronize the clocks in all of our network devices. In this video, you’ll learn about NTP stratums, NTP clients and servers, and how to configure NTP on your workstation.
If you look at all of the different devices on your network– your local computer, your printer, your local router and switch– you’ll notice that all of those devices have a clock, so you can see the date and the time listed on the clock on that device. And on most networks, keeping a synchronization of all these clocks becomes incredibly important. We want to be sure that all of the log files between all of these devices are synchronized with their times.
Some servers require the time frames to be very close together for authentication purposes. And if you have an outage, you do want to be sure that you understand exactly when that outage may have occurred, and you’ll have no idea unless you have a synchronized time.
In fact, if you look at the clock that’s on your local computer, you’ll notice that it’s probably up-to-date with the latest date and time because all of these updates occur automatically behind the scenes. Your local system and network administrators get to determine how often these updates occur and to which servers are going to be used.
To be able to provide this synchronization and be able to provide it with less than a millisecond of granularity on your local network, we use a protocol called NTP, or Network Time Protocol.
On your network are going to be NTP servers and NTP clients. An NTP server is going to listen on udp port 123, and it’s going to respond with time information for anyone who makes a request to that server.
This device is not modifying their own time. They’re simply providing time updates to anyone who might need it on the network. Your device, like your local computer, is an NTP client. NTP clients make requests to the NTP server and receive responses and update their times, accordingly.
If a device is both an NTP client and server, then it’s not only making requests to another NTP server to keep its own clock up to date, but it’s providing answers to other devices on the network so that those devices can keep their clock synchronized as well. If you’re designing a network with switches, routers, and other devices, then it’s important to know what devices will be NTP clients, which devices will be in NTP servers, and which devices will act as both clients and servers.
As you’re making these changes to date and time on your local machines, it’s important to know how accurate that date and time might be. We refer to the accuracy of an NTP server as a stratum value.
For example, a stratum 0 device is, effectively, an atomic clock, providing very accurate representation of the date and time. This is the accuracy you might get from something like the clock associated with global positioning systems, or the US Naval Observatory keeps a stratum 0 atomic clock that you can reference.
If your device is getting its time frame from a stratum 0, then your device is a stratum 1 clock. It’s already synchronized to one of these stratum 0 servers. And usually, these are primary time servers on your network. If you’re synchronizing your time to a stratum 1 server, then that is a stratum 2.
And each time you go one step beyond those, you add 1 to that value. So the next layer down would be stratum 3. Generally, stratum 1 and 2 are what you might see in your environments. But it would also depend on how large your network is and where you’re providing that synchronization from.
Your computer is most likely operating as an NTP client, so if you look at the date and time configuration on your device, you’ll see the NTP servers that are used to synchronize this clock. You might also be able to put multiple servers into this list. So if you’re not able to synchronize against the first one on the list, you can choose the second one.
And if you have a large network, you may have your own NTP server. This would usually reference a particular stratum device. And you would choose the stratum level based on that value. You may have multiple NTP servers with different stratum values across those servers, and if a device is trying to decide which one to synchronize from, it would probably use the lowest stratum device because that one’s going to be the most accurate.