Configuring timezone and NTP on a Cisco MDS switch

Timezone and NTP configuration of a Cisco MDS switch

Using a GUI for configuring purposes isn’t always the best thing to do, although it most certainly provides a level of overview that cannot be obtained on the CLI.

I’ve found out the Device Manager default settings for NTP for example are that IPv4 addresses used to point to an NTP entity is set to “peer” and if you don’t use peer synchronization, but have a dedicated NTP server instead, it’s better to place a check mark on the “server” item. Also if you have several time sources, you can set a preferred one by placing a check mark at the particular entity.

Cisco Device Manager NTPSetting NTP entities

But just setting the NTP entities is one thing, you also want the logs to display the right timezone. I found the GUI way of doing things for managing the NTP entities the easiest and most reliable way, since you can also easily delete obsolete lines. To adjust a switch’s timezone configuration, I like to use the CLI.

Using your favorite telnet / SSH tool (I use PUTTY) you can adjust the NTP settings I just described as well, it’s just that deleting obsolete lines can be tricky, but can be done as well on the CLI.

After logging in, you need to enter the configuration mode by typing “config terminal”, or simply “conf t”.

The following two commands are used to set the timezone of a switch to Central European Time (CET) as well as naming the Daylight Savings time to CEST (Central European Summer time) and pointing out that the adjustments need to be done on the last Sunday of March at 2AM as well as the last Sunday of October at 3AM and adjusting the time by 60 minutes.

clock timezone CET 1 0
clock summer-time CEST 5 Sun Mar 02:00 5 Sun Oct 03:00 60

the NTP entries I did in the GUI can also be set on the CLI by typing:

ntp server 172.16.21.83 prefer
ntp server 192.168.17.5

Now exit the config mode and save the configuration by entering “copy run start” (or “copy r s”).

Exit the CLI and you’re good to go!

Would you like to comment on this post?

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Trackbacks and Pingbacks: