• Skip to main content
  • Skip to footer

NetworkJutsu

Networking & Security Services | San Francisco Bay Area

  • Blog
  • Services
  • Testimonials
  • About
    • About Us
    • Terms of Use
    • Privacy Policy
  • Contact Us

System Time And Log Time

08/07/2012 By Andrew Roderos Leave a Comment

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

As pointed out in my previous blog post, I don’t like seeing wrong time. I especially do not like seeing two different time on show log and show clock output. I’ve seen this happened several times on Cisco routers and switches and it really annoys me whenever I need to know when a specific event happened and also how long ago it happened. Having said that, I try to create a config template for every router and switches I deploy. Also, I try to go back to all the routers and switches already deployed so everything is standardized. If you have thousands of routers and switches, it’ll be a pain in the neck to do it manually so tools such as AlterPoint Device Authority or SolarWinds’ Network Configuration Manager are there to help. These products also keep backups of all your configurations also so it’s a great tool to have in an enterprise.

Below is to show an example of a router with NTP and timezone properly configured but log timestamp doesn’t match the system time.

Router#sho clock
10:39:06.730 PST Tue Jul 31 2012
Router#conf t
Router (config)#int f0/0
Router (config-if)#no shut
Jul 31 15:52:39:  %SYS-5-CONFIG_I: Configured from console by networkjutsu on console
Jul 31 15:52:39:  %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
Jul 31 15:53:39:  %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

To fix this, issue the command below.

Router(config)# service timestamps log datetime localtime msec
Router#show clock
10:40:30.360 PST Tue Jul 31 2012
Router#conf t
Router (config)#int f0/0
Router (config-if)#shut
Jul 31 10:39:53.280: %SYS-5-CONFIG_I: Configured from networkjutsu by console
Jul 31 10:39:54.280: %LINK-5-CHANGED: Interface FastEthernet0/0, changed state to administratively down
Jul 31 10:39:54.580: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to down

As you can see above, the log timestamp is now synchronized with the system time clock. Now, it’s time for you to send this config to all routers and switches in your network.

Hope this has been helpful and thank you for reading!

Disclosure

NetworkJutsu.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com.

  • Share on Twitter Share on Twitter
  • Share on Facebook Share on Facebook
  • Share on LinkedIn Share on LinkedIn
  • Share on Reddit Share on Reddit
  • Share via Email Share via Email

Filed Under: General Tagged With: Cisco, IOS

About Andrew Roderos

I am a network security engineer with a passion for networking and security. Follow me on Twitter, LinkedIn, and Instagram.

Footer

WORK WITH US

Schedule a free consultation now!

LET’S TALK

Copyright © 2011–2023 · NetworkJutsu · All Rights Reserved · Privacy Policy · Terms of Use