Virtualizing NTP servers has been quite a hot topic for some time, but regardless of what some people say, you can actually virtualize NTP servers, as long as you know what you’re doing. If you examine some public NTP servers more closely, you’ll actually find that a lot of them are running on AWS, which should attest to virtualizing being a possible route to go down.
There’s some things though that you might want to consider before going down this route, and some special configurations you need to do to make sure everything works as intended.
If you haven’t noticed already, I have something of a thing for everything time synchronization related. “Proper”, exact time is something that I find important, it’s probably OCD related.
As a part of my day job, I manage a quite large network, with hundreds of different devices. And all of these require some method to synchronize their clocks. Anyone who has at some point tried to diagnose a network problem knows how absolutely critical it is to have proper time available at the devices, so that you for example have any chance to compare logs etc.
This is more for my own reference than anything else, but what follows here is a short tutorial on how to get NTP up and running on your Cisco iOS device.
First we need to get DNS working for the switch to be able to resolve the DNS name for the time server. If you run your own time server you can use the static IP for the NTP server and skip this step, but if you use one of the public NTP pools just resolving the domain name for the pool one time and hard coding that into your switch won’t do it. First of all, that NTP server might go down some time down the line, and then your time synchronization stops working. Secondly, and this is actually a far bigger problem, if you resolve the IP of a NTP pool, you’re actually only using one server in that pool constantly since the pools load balancing is constructed using DNS round robin. This skews the load on the (already heavily loaded) public NTP infrastructure, which isn’t very good. While we’re on the topic, if you are using public NTP servers, consider setting up your own internal NTP servers and have your clients sync to them, thus limiting the load you put on public NTP servers. If you, like me, run your own GPS NTP servers, then you can do as you like (but the DNS round robin trick is also useful to do internal load balancing and fail-over)
This is a short guide on how to set up NTP time synchronisation on HP Network devices. I’ll be covering SNTP settings in this guide, as well as some of the niftier things that aren’t in the manuals but still are really handy. NTP time synchronisation allows you to maintain correct time across your network, which is very important for troubleshooting when comparing logs between two switches for example.