RE: Clock and NTP interaction

From: Brian McGahan (brian@cyscoexpert.com)
Date: Fri Jun 27 2003 - 15:13:42 GMT-3


Jim,

        The time is always advertised and received through NTP as UTC.
The timezone is used to offset the clock based on your local timezone.
For example, in Chicago we are Central Standard Time, which is 6 hours
behind Greenwich. During the summer, we are Central Daylight Time,
which is 5 hours behind Greenwich. The config to specify this would be
as follows:

clock timezone CST -6
clock summer-time CDT recurring

        Suppose we have two routers:

R1--16.0.0.0/8--R6

R1 specifies the time as 6pm UTC:

R1#clock set 6:00:00 27 June 2003
R1#sh clock
06:00:01.747 UTC Fri Jun 27 2003

Now let's configure R1 with Central time:

R1(config)#clock timezone CST -6
R1(config)#clock summer-time CDT recurring
R1(config)#end
R1#sh clock
.01:00:18.187 CDT Fri Jun 27 2003

Now you can see that it's 1pm in Chicago, and we're in CDT right now.

Now let's start the NTP config. R1 will be our master server:

R1(config)#ntp master 1
R1#sh ntp status
Clock is synchronized, stratum 1, reference is .LOCL.
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is
2**16
reference time is C2A65C05.CACB6FF6 (01:00:37.792 CDT Fri Jun 27 2003)
clock offset is 0.0000 msec, root delay is 0.00 msec
root dispersion is 0.02 msec, peer dispersion is 0.02 msec

Now let's configure R6 to get the time from R1:

R6#sh clock
*00:10:41.147 UTC Mon Mar 1 1993
R6(config)#ntp server 16.0.0.1
R6#sh ntp status
Clock is synchronized, stratum 2, reference is 16.0.0.1
nominal freq is 250.0000 Hz, actual freq is 250.0000 Hz, precision is
2**24
reference time is C2A65C65.CD61AE81 (06:02:13.802 UTC Fri Jun 27 2003)
clock offset is -0.0673 msec, root delay is 2.43 msec
root dispersion is 15875.12 msec, peer dispersion is 15875.02 msec
R6#sh clock
06:02:46.611 UTC Fri Jun 27 2003

        You can see from the output that R6 says it's about 6pm UTC.
Even though the master clock is in Central Daylight Time, the NTP time
is still in UTC. Now let's say that R6 is in New York. NYC is Eastern
Standard Time (EST), and during the summer it's Eastern Daylight Time
(EDT).

R6(config)#clock timezone EST -5
R6(config)#clock summer-time EDT recurring
R6#sh clock
02:04:44.075 EDT Fri Jun 27 2003

        As you can see, it's 2pm in NYC now. The timezone config is
only locally significant on that device. The router doesn't know the
difference between PST, CST, or EST. It only knows because we're
configuring it. Suppose we do the following:

R6(config)#clock timezone ABC -2
R6#sh clock
04:07:23.384 ABC Fri Jun 27 2003
R6(config)#clock summer-time XYZ recurring
R6#sh clock
05:07:29.360 XYZ Fri Jun 27 2003

The time zones ABC and XYZ don't exist, it's just what we configured.

HTH

Brian McGahan, CCIE #8593
Director of Design and Implementation
brian@cyscoexpert.com

CyscoExpert Corporation
Internetwork Consulting & Training
Toll Free: 866.CyscoXP
Fax: 847.674.2625

> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
Of
> ccie2be
> Sent: Friday, June 27, 2003 12:19 PM
> To: Group Study
> Subject: Clock and NTP interaction
>
> Hi group,
>
> When a router has it's clock, timezone, and daylight saving setting
set
> and is
> sync'ed up to a ntp server, the purpose of the clock is to display
local
> time.
> Is that correct?
>
> Also, in the clock timezone <word> command, does <word> have any
> functionality besides being what's displayed when the show clock
command
> is
> run? In other words, when PST or MST, or EST, etc is entered does the
> router
> know what these timezones mean and compute what the time should be
based
> on
> UTC time and then do a validity check based on the UTC offset entered?
It
> seems that these words have no meaning to the router but I just wanted
to
> double check with the experts.
>
> Thanks, Jim
>
>
>



This archive was generated by hypermail 2.1.4 : Fri Jul 04 2003 - 11:11:12 GMT-3