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.

enable
config t
ip name-server 10.10.10.1
! Yes this is not the actual dns ip address of our domain server:)
ntp server 192.168.1.1
ntp server 130.102.128.23
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:

WordPress.com Logo

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

Facebook photo

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

Connecting to %s