Basic NTP and Timezone Configuration on Cisco IOS

Configuring NTP Servers

ntp server HOST

If you are looking for NTP servers, please consult the NTP Pool Project

Configuring Timezone

clock timezone NAMEOFTIMEZONE X Y

Where “NAMEOFTIMEZONE” defines the name of the (winter) timezone, and “A” definies the offset to GMT in hours, and “B” in minutes.

You can define the summer time using one of these commands

clock summer-time NAMEOFSUMMERTIMEZONE recurring [first/last/1-4] WEEKDAY MONTH HH:MM [first/last/1-4] WEEKDAY MONTH HH:MM

clock summer-time NAMEOFSUMMERTIMEZONE date DAY MONTH YEAR HH:MM date DAY MONTH YEAH HH:MM

The first command sets the start and beginning in recurring mode. It will automatically sets the summertime every year based on the logic you define.
Using the second command you can manually set the start and end date of summertime for every year.

For example when you live in Switzerland:

clock timezone CET 1 0
clock summer-time CEST recurring last Sun Mar 2:00 last Sun Oct 3:00

Show Time
To display the current time on a Cisco IOS device, use the “show clock [detail]” command. In the detailed view, you’ll find additional information to the timezone and the time source.

RT20#sh clock
18:12:17.145 CET Sun Nov 13 2011
RT20#
RT20#sh clock detail
18:12:22.129 CET Sun Nov 13 2011
Time source is NTP
Summer time starts 02:00:00 CET Sun Mar 25 2012
Summer time ends 03:00:00 CEST Sun Oct 28 2012

Advertisements

One thought on “Basic NTP and Timezone Configuration on Cisco IOS

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s