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.
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 22.214.171.124
clock timezone AEST 10
That set the clock of our cisco switches to the correct clock. I cleared the logging buffer by typing
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!