Configuring cisco with NTP server and correct timestamps

As I was setting up the cisco switches at work with SNMP and syslog traps to send messages to my PRTG server, I realized a couple of anomalies with the network. There were a couple of flapping ports and upon further investigation figured some of them are just failing cable connections. However, I still can’t figure out the reason behind the others.

At first I noticed that the clock on the switches were set back at 1993, that did not help me at all. So what I did was configured the DNS server on the router and set up ntp.

config t
ip name-server
! Yes this is not the actual dns ip address of our domain server:)
ntp server
ntp server
clock timezone AEST 10
do wr

That set the clock of our cisco switches to the correct clock. I cleared the logging buffer by typing

clear logging

Then after a few minutes issued the show logging command, yes the date was all good but the time was still wacked out. The date is synced however the time is like 10 hours delayed or something.

After further research I was missing out one command that did the trick: Under global config…

service timestamps log datetime localtime

viola! time is synced!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s