Accurate time synchronization across network devices is essential for log correlation, security auditing, and incident investigation. This content covers manual clock configuration and NTP server setup on network equipment.
Network Time Configuration
This is actually a pretty simplistic topic, and it's really easy to set it up on your devices, but it could have pretty big ramifications if you're dealing with larger networks, and that is time. It's important to set your time correctly.
When you're dealing with small networks, it may not be a big deal for your equipment to all be on the same time, but as your network grows it's going to become more important. There is some security that requires time to be accurate in order for the security measures to work. But really, what I'm talking about more right here with these devices is when you are aggregating logs, or you're trying to find out information about your network, or you're pulling together, you're trying to research different issues that have happened on your network. Those timestamps become more important.
Let me give you a more specific example. Let's say somebody hacks your network. If they've hacked into your network, they might have hacked a certain piece of equipment and then started leveraging other pieces of equipment and escalating their privileges. As you're going and exploring this, if you want to track what devices they compromised and when they compromised them, and find that trail out, you're going to need to know accurate timestamps. If your times are all off on your equipment, that's going to be very difficult to do.
So let's figure out how to set our time. First of all, I'm just going to do a show clock to see what my time is, and we can see the time there. I'm going to have to set this now, because obviously it's not 1993, and I can tell you it's not 11 o'clock.
So I'm going to do a clock set, and then we're going to set this time. Actually, I'm just going to use the question mark to figure out what it's prompting me for. So it needs hours, minutes, seconds. I'm going to say, well, it is three o'clock p.m., which is 1500, and it is 45, and then I'll just give it a second.
Then I can see that it's asking for the day of the month, so this is the 12th. Oops. The 12th. And what else is it asking for, the month. I'm going to say the 12th of March. Then it's asking for the year. I'm going to say 2033. It's obviously not 2033, but we're going to enter that in.
Now when I do a show clock, we can see that the time is set to a much better time here. So there, I've set this clock.
This is one way of doing it. The problem is you may see a little bit of time drift with some of these machines, and more importantly, our seconds are going to be off. If we want to have logs down to the seconds, it's going to be important that all of our devices stay on the same page, that they stay on the same clock.
So we can actually set that up. We can take all of our devices and reference one single time, and to do that we set up what's called an NTP server, a Network Time Protocol server.
To do that, I'm going to go into the global config mode, so global config, and I'm going to type in NTP and I'm going to set the server. I'll hit the question mark, and now it's just asking you for either a hostname or an IP address or some sort of source.
I could have a single source on my network that goes out to the internet and syncs with the internet, and then everything syncs to that source. Or I can have all the devices synced to something out on the internet. So there are several ways I can set this up. A lot of times what I like to do is have one or two sources within my network that have an accurate time, and then everything syncs to those two times, something that's to the core of my network.
So this is how you would set up an NTP server, so that all of your devices are on the same time and you don't ever get any drift. If there's ever any drift, then it corrects itself, because it's constantly going out there and making sure that it's got the accurate time.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →